If you don't want to have hddtemp
running in daemon mode all the time, you could also run hddtemp
as an external command instead. However, hddtemp
needs to be run as root:
$ hddtemp /dev/sda
/dev/sda: open: Permission denied
$ sudo hddtemp /dev/sda
/dev/sda: ST3500418AS: 35°C
So, you will first need to give your user permission to run the command. Run visudo
and add this line to the sudoers
file (change linofex
to your actual username):
linofex ALL=NOPASSWD:/usr/sbin/hddtemp
That should let you run sudo hddtemp
without needing to enter a password.
Now, replace the line from your conkyrc
file with:
${alignr 10}${color}SSD M500 Crucial 120GB Temp ${color1}${exec sudo hddtemp /dev/sda | awk '{print $NF}'}