Fixing “Docky crashes on suspend or unplug” in Ubuntu 14.04

in short

download and install this deb file; or do it yourself in just seven lines (see below)! 🙂

intro

On Ubuntu 14.04, my docky crashes extremely often (on any power status changes — suspend, disconnecting from the charger, etc.).

The fix has been known for a while, but after several months and no new Docky package (perhaps it is no longer maintained?), I decided to dig in and figure out how to fix this.

This time I googled it, and someone else had written up how to apply the fix to source code, build, and re-install. Turns out to only take a handful of lines! Here, I’m documenting with pictures.

Basically, we apply the one-liner fix using the “classic” instructions here How to download, modify, build and install a Debian source package? .

Ready?

Fixing Docky

Let’s get the source and edit the file “Docky.Services/Docky.Services/SystemService.cs”, as described in “Comment 2 for bug 1309706“:

apt-get source docky
cd docky-2.2.0/
vim Docky.Services/Docky.Services/SystemService.cs

For me, the fix was on line 281. Change

[Interface(UPowerName)]

to

[Interface("org.freedesktop.DBus.Properties")]

See pictures below.

Before

dockysrc

After

dockysrc-fixed

Build it~

sudo apt-get build-dep docky
dch -i

This last step is to update the package number. I don’t know anything about this, but it auto-inserted a new package number so I just wrote a quick comment and called it good.

dockysrc-dch

debuild -us -uc -b
sudo dpkg -i ../docky_2.2.0-2ubuntu1_all.deb

Whoo! That’s it 🙂

Deb File

Here’s my file: https://drive.google.com/open?id=0B9r0HZeoMbmgVDhubWxFM0doMms

and its SHA sum follows, although obviously just doing the seven command-line steps above yourself is easy and way more secure…

nrw@nrw-PC:~/docky-2.2.0$ sha256sum ../docky_2.2.0-2ubuntu1_all.deb
92f631efbeabd85496b359de6884dc21061b6d52ee8a4b34759c5dd8960e7146