Howto: Fix Kali Linux Xfce Genmon plugin not working
By SecBurg
After one the latest updates of Kali Linux (rolling release), I’ve encountered that my Xfce Desktop was displaying something weird in the menu:
The reason for this is: the Xfce Genmon plugin was updated to a version >= 4.20 (in my case 4.3.0).
The documentation page for this plugin shows a note about this:
Important Note about version 4.2.0
In version 4.2.0, the backend settings have been migrated from rc files to xfconf. Individual plugin settings will not be automatically migrated to xfconf and each plugin will need to be manually re-configured. A script has been developed (https://gitlab.xfce.org/panel-plugins/xfce4-genmon-plugin/-/blob/master/scripts/migrate_to_xfconf.sh) that can offer assistance for the migration.
To fix this, I needed to
- download the referenced shell script and make it executable
- change the first line from #!/bin/sh to
#!/bin/bash (otherwise it will default to dash on Kali and does not work properly) - run the script with the option show
./migrate_to_xfconf.sh show
which gives an output similar to this:
Processing genmon ID 15
/home/user/.config/xfce4/panel/genmon-15.rc
ID= 15
COMMAND= /usr/share/kali-themes/xfce4-panel-genmon-vpnip.sh
SINGLEROW= true
FONT= FiraCode Nerd Font 8
TEXT= (genmon)
UPDATEPERIOD=1000
USELABEL= false
COMMANDS TO BE RUN:
xfconf-query -c xfce4-panel -p /plugins/plugin-15/command -t string -s "/usr/share/kali-themes/xfce4-panel-genmon-vpnip.sh" --create
xfconf-query -c xfce4-panel -p /plugins/plugin-15/enable-single-row -t bool -s true --create
xfconf-query -c xfce4-panel -p /plugins/plugin-15/font -t string -s "FiraCode Nerd Font 8" --create
xfconf-query -c xfce4-panel -p /plugins/plugin-15/text -t string -s "(genmon)" --create
xfconf-query -c xfce4-panel -p /plugins/plugin-15/update-period -t int -s 1000 --create
xfconf-query -c xfce4-panel -p /plugins/plugin-15/use-label -t bool -s false --create
- run the commands shown in the output above manually. Running the script again with the option doit did not work for me as expected.
- restart the Desktop
After this procedure, my Xfce Genmon plugin was working again as before.