If, like many, you enjoy being on the bleeding edge of Docky’s development you’ll more often than not find it crashes and/or hangs. Sometimes this requires you to manually kill it in-order to relaunch it.
OMG! reader David Raviv e-mailed me a handy script n’ tip™ he put together so that his Mum could use Docky without getting in a frazzle when it crashed.
To solve this, I wrote a small script replacing the original Docky launcher that first checks if Docky is running, if it does, it kills it and then calls the original Docky launcher. This way my mom can use Docky and whenever it hangs she just need to click its launcher!
It’s a simple yet effective way to manage Docky crashes without having to interrupt your work-flow to manually nuke and redeploy. Of course, if you don’t like docky crashes then you’ll you’ll be pleased to hear that a stable version is included in the Ubuntu 10.04 repositories!
Steps are relatively simple, folks.
- Download this script to your desktop
- Right click > Properties> ‘make executable’
- Press ALT and F2 together
- In the address bar of the now-opened Nautilus window type ‘usr/bin/’ (minus the apostrophes)
- (If you only have ‘breadcrumbs’ in Nautilus hit ‘CTRL’ and the letter ‘L’ to toggle the address bar mode)
- Move the script into this folder. This will allow you to run the script from anywhere by typing ‘docky_restart’.
- Now edit your docky menu launcher so that the command field reads ‘docky_restart’ and not ‘docky’.
Congratulations! Now when you run Docky from the apps menu it will first check that a version of Docky isn’t already running – and if it is it’ll kill it before launching.