Instead of the current model of invoking hddtemp, it
would be useful to support the server protocol that's
available in hddtemp 0.3.
In addition, a non-suid-root hddtemp and running
ksensors as non-root should not prevent ksensors from
starting up. Currently, I get:
HddTemp Error:
ERROR: You must be root to run the command,
ERROR: or the root must set the suid bit for the
executable.
If running hddtemp fails, an error could be output, but
ksensors should run.
Logged In: NO
Ksensors don't stop if hddtemp cannot be executed.
Maybe you have another problem.
Greetings,
Logged In: YES
user_id=32457
Yes, you're right, I was confused for whatever reason. It
runs fine. But I still miss the hddtemp server protocol
support... :)
Logged In: NO
I've write a patch for hddtemp (and apcupsd). It's avilable on http://palacsint.hu/progz/ksensors
palacsint
Logged In: YES
user_id=32457
I took a look at your patch, and see three problems:
- 127.0.0.1 and port 7634 is hardcoded, they should be made
configurable in the GUI.
- Why not just add the networked hddtemp support in addition to the
command line one, why does the command line one have to be
removed?
- What if hddtemp reports the temperature in fahrenheit instead of
celsius?
Logged In: NO
> I took a look at your patch, and see three problems:
> - 127.0.0.1 and port 7634 is hardcoded, they should be made
> configurable in the GUI.
I don't have too much kdevelop, kde, qt programming experience.
How shall I do this? I think about inherit a new class from
lmsensorscfgdesign.ui or just copy that. What's your opinion?
And have no idea how I can inherit it, so if you have same useful
link I'll thanks it.
> - Why not just add the networked hddtemp support in addition
> to the command line one, why does the command line one have
> to be removed?
I think networked hddtemp support much better than processexec.
You don't need the suid bit and it's faster. Why shall we keep the
processexec version?
> - What if hddtemp reports the temperature in fahrenheit instead
> of celsius?
You're right, it's a bug, I'll fix it soon.
palacsint
Logged In: YES
user_id=32457
I don't have an opinion how to implement that UI; I'm pretty sure I
have much less C++ programming experience than you.
Also, on a second thought, maybe it's not a bad thing to drop the
command line support if the networked version works fine.
Please note that I am not a member of the ksensors project in any
way, but just another user who requested an enhancement, so I can
certainly not promise anything. That's up to the ksensors authors.
Logged In: NO
I'd also like this patch to be part of ksensors! :)
Logged In: NO
Here is a quick and dirty workaround:
========
#!/bin/sh
# Mimics the output of the hddtemp command-line utility,
# but invokes the hddtemp daemon instead of hddtemp directly.
# Make sure that the hddtemp daemon is running, and configure
# the correct port if you are not using the default 7634.
PORT=7634
for PATTERN in "$@"
do
cat < /dev/tcp/localhost/$PORT | sed "s:|\([^|]*\)|\([^|]*\)|\([^|]*\)|\([^|]*\)|:\1\: \2\: \3 \4\n:g" | grep --colour=never "$PATTERN"
done
========
Just put this script into your ~/bin or basically some path that takes precedence over the real hddtemp and it will work.
It's ugly 'tho... a proper source-code solution would be better but the upstream seems dead and not accepting patches! :(