XFCE 4.8 panel : Fix missing Suspend and Hibernate icons

The “Action Buttons” panel plugin of XFCE 4.8 on Debian “wheezy” has a known bug regarding missing icons for the Suspend and Hibernate actions and users will only see a generic placeholder icon.

Ognyan Kulev who reported the bug says this is because most icon themes do not provide icons named “system-suspend” and “system-hibernate”.

As a work-around he suggests linking to the corresponding xfce4-power-manager icons. This fixed the issue on my Debian laptop:

sudo apt-get install xfce4-power-manager-data
cd /usr/share/icons/hicolor/scalable/actions
sudo ln -s xfpm-suspend.svg system-suspend.svg
sudo ln -s xfpm-hibernate.svg system-hibernate.svg
sudo gtk-update-icon-cache-3.0 -f ../..

I saved save the commands into a shell script so I can run it again if the symbolic links get deleted during an apt-get update or accidental apt-get remove:

echo "#! /bin/sh" > /usr/local/bin/fix-xfce-action-icons.sh
chmod ugo+x /usr/local/bin/fix-xfce-action-icons.sh
sudo vim /usr/local/bin/fix-xfce-action-icons.sh