[Pkg-xfce-devel] Bug#762500: Bug#762500: xfce4-power-manager-plugins: plugin icon is missing
zcalusic at bitsync.net
Tue Sep 23 16:58:19 UTC 2014
On 23.09.2014 09:20, Yves-Alexis Perez wrote:
> It might be worth running xfpm from command line, using debug:
> xfce4-power-manager -q # stop current daemon
> xfce4-power-manager --debug # run new daemon with debug mode
> And report your findings. Unfortunately I don't have an UPS so I can't
> really debug here.
Somehow you always manage to help me to help you :), really nice to work with you.
I'm not even posting the whole debug output, because I have a pretty good idea where the problem lies, I hope you can take it from there.
Since there's a difference in behaviour between battery and UPS equipped computers, I extracted debug output from both, and with a bit of filtering did a context diff. And soon it's obvious what's goin' on.
-xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/ups_hiddev0
-xfpm_power_add_device(): 'ups' device added
-xfpm_power_add_device(): Battery device type 'ups' detected at: /org/freedesktop/UPower/devices/ups_hiddev0
+xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/line_power_AC
+xfpm_power_add_device(): 'line-power' device added
+xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/battery_BAT0
+xfpm_power_add_device(): 'battery' device added
+xfpm_power_add_device(): Battery device type 'battery' detected at: /org/freedesktop/UPower/devices/battery_BAT0
So far so good... But later on...
-xfpm_battery_refresh_icon(): Battery icon xfpm-ups-charged
+xfpm_battery_refresh_icon(): Battery icon xfpm-primary-charged
So, laptop is searching for something called xfpm-ups-charged, and with a little help of locate(1), I can see lots of such named icons. But, locating xfpm-ups-charged returns nil. That's because appropriate icons are actually called:
To test it, I did 3 symbolic links (ln -s xfpm-ups-100.foo xfpm-ups-charged.foo), rebuilt icon-cache, reloaded plugin and voila, the icon is there in all its beauty. ;)
So, either icons should be renamed or the plugin should search for appropriately named icons.
More information about the Pkg-xfce-devel