4

I would like to know which is the most correct way to make my Debian automatically start up a graphical application once the desktop has been loaded. The app must be started as root.

4

Create a file in your home dir called /home/$USER/.config/autostart/my_app.desktop with the following content:

[Desktop Entry]
Type=Application
Exec=gksudo my_application
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=my_app
Comment=My comment

Then login again.

  • 1
    Obviously the user also needs to have NOPASSWD defined in sudoers file (my Debian installations don't have that as a default, at least). – zagrimsan Jul 24 '14 at 8:18
  • Hidden=true did not work well on my Raspberry – Thomas Weller Jul 25 '16 at 22:13
1

You should use gksudo to start graphical apps with root rights.

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.