docky crashes from time to time for me. How can I make it restart automatically after it crashed?
First off, I'm not using docky. But I'm assuming docky is in your $PATH. If not, then specify the full path to the binary.
Here is the awesome use of Bash:
Start off with a file, such as (vim instead of gedit if you want):
Now you can run a program like so:
and it'll launch the program once, and make sure to restart the program if you ever choose to quit it or it chooses to crash.
To add an entry to system startup so it launches the program once you logged in and won't stop until you quit, do this:
Make sure the new entry is checked. Log back out and in and you see docky all the time.
This is similar to the process monitor method, using an until loop, but just for docky itself.
Then, remove docky from your startup applications, and just add sh [path to file], such as:
I wrote a small "wrapper" script bellow. It will spawn docky and monitor it. Spawn this alone without docky in the Startup Applications.
The ./process_monitor.sh works great.
But only if i use Terminal, or yakuake...so i can just open a new shell, when i use "~/process_monitor.sh docky" or "/bin/bash ~/process_monitor.sh docky"
But if I go to the "Startup Applications", click add and follow these instructions nothing happens when my Computer is starting up. I still have to run that command manually. And it won work, when i put in /home/"username"/process_monitor.sh docky, too.
I found, or created a solution (which hasn't been posted somewhere) to get it autostarted.
Instead of using the ~/process_monitor.sh docky create a new textfile:
Now you can run the program in your terminal/yakuake or whatever you prefer to use:
and it will start the ~/process_monitor.sh docky. So it'll get startet and restarted if crashes.
You can choose any name you like for "process_monitor.sh" and "start.sh" only .sh is important. But be sure to change it in your textfiles as well.
Now go to your Dash, type in and open "Startup Applications".
Now you can restart your Computer and test it.