Created attachment 420886 [details] emerge --info When using the __Gentoo emerge process__ of: xfce-extra/xfce4-sensors-plugin-1.2.6::gentoo USE="acpi hddtemp libnotify lm_sensors -debug" The resulting binary plugin insists on trying to exec 'hddtemp', which requires root privileges, instead of using netcat to read from the hddtemp daemon. A properly setup system is: (root) rc-config add hddtemp default (root) /etc/init.d/hddtemp start (non root user) netcat localhost 7634 (sample output) |/dev/sda|ST3200822AS|31|C||/dev/sdb|Generic USB SD Reader|NA|*| When the plugin is built from the sources: /usr/portage/distfiles/xfce4-sensors-plugin-1.2.6.tar.bz2 With: ./configure, make, make install Results: /usr/bin/netcat is detected and is used, #ifdef NETCAT is 1 in the sources, resulting in correct non-root-user operation. Conclusion: The cryptic ebuild lines '(hddtemp) (hddtemp netcat)' are resulting in #ifdef NETCAT 0 for unknown reasons. The EBUILD creates an incorrect build config that ./configure from the same source does not have. Why this has never been fixed: Poor workarounds for this bug are easily found on stackexchange, etc., such as 'chmod u+s hddtemp' for Arch Linux, etc. The goal is not to spawn hddtemp as a non-root user frequently. The /etc/init.d/hddtemp is designed to provide the information correctly to non-root users. Obligatory emerge --info attahced, but irrelevant
netcat is not used if hddtemp daemon is not running at time of build, even if --enable-netcat is specified. this has got to be one of the dumbest ideas I've ever seen.
(In reply to Alex Xu (Hello71) from comment #1) > netcat is not used if hddtemp daemon is not running at time of build, even > if --enable-netcat is specified. > > this has got to be one of the dumbest ideas I've ever seen. The bug report gives sample output of netcat reading a line of "netcat/hddtemp" (as a non-root-user) temperature data from the hddtemp daemon showing the temperature of /dev/sda and /dev/sdb AT THE VERY TIME that the xfce-plugin is throwing up dialog boxes that a non-root-user cannot spawn hddtemp. Please re-read the bug report, it is the ebuild that is breaking the test (hddtemp netcat) --> "ifdef NETCAT 0" IN C SOURCE CODE".
Sorry, I didn't understand Alex Hu's comment, I thought it was directed at the bug report and not at the ./configure script of upstream. Examining config.log we see the upstream problem: configure:13568: checking for netcat path configure:13575: result: /usr/bin/netcat configure:13584: checking for hddtemp being queryable via netcat configure:13587: result: |/dev/sda|ST3200822AS|30|C||/dev/sdb|Generic The builds work correctly if 'emerge hddtemp' and '/etc/init.d/hddtemp start' have already been run before 'USE=hddtemp emerge xfce4-sensors-plugin' (or ./configure; make; make install for that matter). In the hddtemp ebuild (src_install()) we see: newinitd "${FILESDIR}"/hddtemp-init hddtemp systemd_install_serviced "${FILESDIR}"/hddtemp.service.conf If there isn't a better solution, printing a message at the end of the xfce4-sensors-plugin build would be a workaround: "The package author intended that hddtemp is installed and the hddtemp service is started before building "xfce4-sensors-plugin (USE=hddtemp)". If you experience problems with the sensors plugin reading disk temperatures (especially as a non-root user) please start the hddtemp service and then rebuild xfce4-sensors-plugin, then restart xfce."
Note that this would fail even with hddtemp running if you have FEATURES='network-sandbox'.
This is now fixed in upstream: https://github.com/xfce-mirror/xfce4-sensors-plugin/commit/1fe2ce36aa0a363b02102d8f487d7c5dfa9e9b3c