5

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.

0

2 Answers 2

6

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.

2
  • 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, 2014 at 8:18
  • Hidden=true did not work well on my Raspberry Jul 25, 2016 at 22:13
2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .