Quantcast
Channel: Pinguy OS Forum - All Forums
Viewing all articles
Browse latest Browse all 1646

How to get docky to work on 14.04 after suspend and laptop unplug

$
0
0
Docky can't restart after suspend or if you plug/unplug power cable from your laptop on some Ubuntu distributions including Ubuntu 14.04 LTS.

Here is a solution for these problems:

Create /etc/pm/sleep.d/20_docky file with root access and make it executable (chmod 755) to solve problem for suspend:

Code:
#!/bin/sh
case $1 in
  resume)
    USER=`who | grep ":0" | head -1 | cut -d" " -f1`
    USERHOME=/home/$USER
    export XAUTHORITY="$USERHOME/.Xauthority"
    export DISPLAY=":0"
    su $USER - -c "dbus-launch /usr/bin/docky >/dev/null" &
    exit 0;
    ;;
esac

Create /etc/pm/power.d/20_docky file with root access and make it executable (chmod 755) to solve problem for plug/unplug power cable:

Code:
#!/bin/sh
USER=`who | grep ":0" | head -1 | cut -d" " -f1`
USERHOME=/home/$USER
export XAUTHORITY="$USERHOME/.Xauthority"
export DISPLAY=":0"
su $USER - -c "dbus-launch /usr/bin/docky >/dev/null" &
exit 0;

You may remove >/dev/null part if you want to examine docky log messages inside pm log files.

Viewing all articles
Browse latest Browse all 1646

Trending Articles