My hddtemp line reads:
HDD Temp: ${execi 2 hddtemp /dev/sda | cut -c 31-32}°C
This always displays:
HDD Temp: 50°C
No matter what the temperature actually is.
--------------------------------------------------------------------
When I use the cli, it reads properly:
#hddtemp /dev/sda
/dev/sda: Samsung SSD 850 EVO 500G B �@: 37°C
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
conky - hddtemp always displays 50c - stretch - mate
Re: conky - hddtemp always displays 50c - stretch - mate
50 is the 31-32 characters in the output... try 46-47?
Code: Select all
$ echo /dev/sda: Samsung SSD 850 EVO 500G B .�.@: 37°C | cut -c 31-32
50
$ man cut
$ echo /dev/sda: Samsung SSD 850 EVO 500G B .�.@: 37°C | cut -c 46-47
37
resigned by AI ChatGPT
Re: conky - hddtemp always displays 50c - stretch - mate
This works in the cli; but the temp field just goes blank in the conky window.
-
- Posts: 1100
- Joined: 2016-01-07 12:25
- Has thanked: 5 times
- Been thanked: 16 times
Re: conky - hddtemp always displays 50c - stretch - mate
hdtemp requires root privileges and cannot be run by conky without a tweak, you can allow this package to run for your user if you are using the sudo package by adding the following to your etc/sudoers file, replace the "<your user name>" with your actual user name. You will need to reboot for this to take effect.
And change your conky line to
Code: Select all
<your user name> ALL = (root) NOPASSWD: /usr/sbin/hddtemp
Code: Select all
HDD Temp: ${execi 2 sudo /usr/sbin/hddtemp /dev/sda | cut -c 46-47}°C