Menu

#1 Support for hddtemp's server protocol

open
nobody
None
5
2003-02-14
2003-02-14
No

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.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Ksensors don't stop if hddtemp cannot be executed.
    Maybe you have another problem.

    Greetings,

     
  • Ville Skyttä

    Ville Skyttä - 2003-02-24

    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... :)

     
  • Nobody/Anonymous

    Logged In: NO

    I've write a patch for hddtemp (and apcupsd). It's avilable on http://palacsint.hu/progz/ksensors

    palacsint

     
  • Ville Skyttä

    Ville Skyttä - 2005-08-07

    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?

     
  • Nobody/Anonymous

    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

     
  • Ville Skyttä

    Ville Skyttä - 2005-08-09

    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.

     
  • Nobody/Anonymous

    Logged In: NO

    I'd also like this patch to be part of ksensors! :)

     
  • Nobody/Anonymous

    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! :(

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.