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
This doesn’t seem to work anymore. When looking over $(dpkg -L xfce4-power-manager-data) then no system-suspend.svg or system-hibernate.svg are included in the package
Sure:
# dpkg-divert –local /usr/share/icons/hicolor/scalable/actions/system-suspend.svg
Adding ‘local diversion of /usr/share/icons/hicolor/scalable/actions/system-suspend.svg to /usr/share/icons/hicolor/scalable/actions/system-suspend.svg.distrib’
Now any package trying to add this file will not collide with your symlink, but instead will divert to system-suspend.svg.distrib. You can then symlink as shown in your article. If you needed to do a local diversion of an existing file, you would use –rename as well. When you’re done, you can remove the diversion with –remove.
Ben, I just looked at the dpkg-divert man page and decided to stick with the fixup script approach. I am more likely to notice a missing icon after an update than to remember to check if the package was fixed and remove the local diversion(s).
However, for completeness and for visitors of this blog who want to use the “proper way” using dpkg-divert, could you give the concrete command lines one would use in the particular case of these icons?
There’s a more elegant solution that doesn’t require running a fixup script when you upgrade. Use dpkg-divert –local (see dpkg-divert(8)).
http://manpages.debian.net/cgi-bin/man.cgi?query=dpkg-divert
Use sparingly! In particular, you need a review process for your local diversions so that when the problem is eventually properly resolved within the package, you remove your local diversion.
Thanks Ben! I willl try that.