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?

9
  • 1
    Is it executable? Commented Nov 12, 2017 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. Commented Nov 12, 2017 at 17:55
  • Change Exec=watch -d sensors with Exec=sh -c "watch -d sensors" Commented Nov 12, 2017 at 18:06
  • It still doesn't run at startup. Commented Nov 12, 2017 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 Commented Nov 12, 2017 at 18:19

1 Answer 1

4
+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.

1
  • 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. Commented Nov 17, 2017 at 12:49

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.