When my computer comes back from slumber, my program, cairo-dock, looks terrible. I don't know why the icons on it look like a bunch of noise, but I can't fix the problem. The best way I know how to is to restart the program.
I have tried automating this. I have placed a script in the
/lib/systemd/system-sleep directory to stop the current running version of
cairo-dock and restart it under my user account. The problem I have encountered is that cairo-dock doesn't start. I'm not entirely certain, but the script may be firing off before the X server is running.
FWIW, here's the script:
#!/bin/sh set -e case $1 in post) logger "Now killing cairo-dock." killall cairo-dock logger "Now starting cairo-dock." sudo -u user cairo-dock & ;; esac
Another reason for why it's not starting up is that I may not be able to start programs on my account with sudo and systemd.