Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Many times nautilus crashes because of various reasons. When nautilus crash, it crashes with conky. The only way to get back conky and active desktop is to start nautilus and conky from terminal.

How can I make nautilus and conky re-start automatically whenever a crash occurs ?

Some peoples are advising to use Upstart. But the upstart cook-book is too heavy for me, as Im a Windows user and Im not accustomed of cli/.conf things.

If anyone can give me exactly what I need to change then it would be a great help. In the mean while I will do try to figure out how to make things work using upstart daemon.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Create a file in /etc/init with the following commands:

#!upstart
description "Conky"

# Start job via the daemon control script. Replace "soham" with your username.
exec su -l soham -c 'export DISPLAY=:0; /usr/bin/conky'

# Restart the process if it dies with a signal
# or exit code not given by the 'normal exit' stanza.
respawn

# Give up if restart occurs 10 times in 30 seconds.
respawn limit 15 30

Now after logging in: sudo start conky


#!upstart
description "nautilus"

# Start job via the daemon control script. Replace "soham" with your username.
exec su -l soham -c 'export DISPLAY=:0; /usr/bin/nautilus'

# Restart the process if it dies with a signal
# or exit code not given by the 'normal exit' stanza.
respawn

# Give up if restart occurs 10 times in 30 seconds.
respawn limit 15 30
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.