Home > bash, coding, debian, xfce > XFCE 4.8 panel : Fix missing Suspend and Hibernate icons

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
Advertisements
  1. February 5, 2014 at 07:41

    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.

    • February 5, 2014 at 22:40

      Thanks Ben! I willl try that.

  2. February 12, 2014 at 20:35

    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?

  3. February 13, 2014 at 06:58

    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.

  4. xyzdragon
    December 6, 2015 at 06:52

    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

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: