How to get xfce4-sensors plugin to show HDD temperature in XFCE panel?
I had the same Problem after upgrading to 13.04.
I would prefer a non-dirty solution also.
But This bugreport didn't provide any clean solution either
At least: The mentioned dirty solution worked for me:
set suid bit to hddtemp:
$
sudo chmod u+s /usr/sbin/hddtemp
$
xfce4-sensors
An alternative would be running hddtemp
as a daemon(eg. args: --listen=127.0.0.1 -dF
) listening on some TCP
port(default 7634
) on localhost
(or 127.0.0.1
) and having xfce4-sensors-plugin
query it on every refresh.
BUT, this only works if xfce4-sensors-plugin
was compiled with --disable-netcat
, otherwise(with --enable-netcat
it instead attempts to execute hddtemp
itself on every refresh! here's source code for my claims and I've also tested both ways (suid hddtemp and running hddtemp as daemon via a hddtemp.service).
Caveats:
- you have to specify all the HDD devices, that you want to monitor, when starting the
hddtemp
daemon.
ie.sudo hddtemp --listen=127.0.0.1 -dF /dev/sda /dev/sdb /dev/sdc
.
Only the specified devices will be seen byxfce4-sensors-plugin
. - If any devices specified above(at point 1) aren't present, there will be a
?
entry inxfce4-sensors-plugin
which you can keep visible at all times until the device(s) are present. This may or may not be what you want. But with a suid hddtemp and enabled netcat, it will only list the HDD devices present currently, and probably(untested) won't automatically add new ones in the future, so you'll have to enterProperties
and check/enable them yourself underSensors type: Hard disks
. -
xfce4-sensors-plugin
(latest git for today 27 Sept.2018) will lookuplocalhost
and connect(then disconnect) via TCP from the specified host/port on every refresh (eg. every 1 seconds if you haveUpdate interval (seconds)
set to1
) which means that you'll see(and I tested this) like 150 lines ofTIME_WAIT
in yournetstat -pantuW
command, so it will be hard to see anything else in there unless you pipe it throughgrep -v "127.0.0.1:7634.*TIME_WAIT"
I suppose.
I'm keeping a gist up to date with any further information here