3

I'm trying to get the sensors command to run in a console on startup on my Linux Mint 18.2 setup. I've put the following sensors.desktop file into my login user's .config/autostart directory:

[Desktop Entry]
Name=Monitor sensors
Comment=Monitor temperature sensors
Exec=watch -d sensors
Icon=utilities-system-monitor
Terminal=true
Type=Application
StartupNotify=true
Categories=GNOME;GTK;System;Monitor;
NotShowIn=KDE;
NoDisplay=false
Hidden=false
X-GNOME-Autostart-Delay=0

I have another .desktop file in there that does run on startup, and this one runs if I double click it from the file explorer, so why does it not run on startup?

  • 1
    Is it executable? – Arpit Agarwal Nov 12 '17 at 14:46
  • It wasn't, but then nor was the other working .desktop file. I made it ugo+x and it still doesn't run on startup. – Jez Nov 12 '17 at 17:55
  • Change Exec=watch -d sensors with Exec=sh -c "watch -d sensors" – Arpit Agarwal Nov 12 '17 at 18:06
  • It still doesn't run at startup. – Jez Nov 12 '17 at 18:13
  • 1
    I just tried your script and it worked fine on login. I am using Xfce4. Maybe the problem is in cinnamon, you can try someother DE – Arpit Agarwal Nov 12 '17 at 18:19
3
+50

Solved the issue. Change the content of sensor.desktop to this

[Desktop Entry]
Name=Monitor sensors
Comment=Monitor temperature sensors
Exec=gnome-terminal -e 'watch -d sensors'
Icon=utilities-system-monitor
Type=Application
Categories=GNOME;GTK;Monitor;
NotShowIn=KDE;
NoDisplay=false
Hidden=false
X-GNOME-Autostart-Delay=0

Make sure you have gnome-terminal already installed. If you use some other terminal than replace it accordingly.

  • Thanks, works great. I did suggest an edit though which changes the suggested .desktop file a bit to the one I actually used to get it working. – Jez Nov 17 '17 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.