Ksensors still not working with hddtemp for normal users
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
hddtemp (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
Binary package hint: ksensors
Back in the Dapper days, ksensors used to work fine with hddtemp, to monitor the hard drive temperature. A regression was introduced in Edgy, and a <a href="https:/
There is a quick (dangerous) solution: chmod +s to the hddtemp binary. The better solution would be to patch ksensors so that it gets the temperature via the hddtemp daemon. This deamon is listening on port 7634 by default, as the following command can verify:
netcat localhost 7634
Now, I took a brief look at the ksensors code, and changing the hdsensorslist.cpp file so that it instead of invoking "hddtemp", it invokes "netcat localhost 7634" might be enough to do the trick (though you might want to add an option to configure the actual port). Also, don't forget to change the regex that does the parsing, since the output from the hddtemp daemon is different from the command line utility.
Changed in ksensors: | |
importance: | Undecided → Low |
status: | New → Confirmed |
I am attaching a workaround to this bug which avoids the unpleasantness of setuid-ing the hddtemp binary. The idea: to place a small bash script in the users private bin directory, with the same name as the hddtemp binary. This script invokes "netcat localhost 7634" to get the raw hard drive temperature info from the hddtemp daemon, parses this data, and outputs it in exactly the same format used by hddtemp. When ksensors invokes "hddtemp", this script gets executed instead of the real hddemp binary. It's simple and it works!