Home » Questions » Computers [ Ask a new question ]

How can I start a program as root using the window manager?

How can I start a program as root using the window manager?

I sometimes want to start a graphical program explicitly as root. For now I'm starting a terminal and sudo the desired applicaton.

Asked by: Guest | Views: 286
Total answers/comments: 2
bert [Entry]

"Linux has something but not exactly what you want, when you want ti Run GUI program as root you can press:

ALT + F2

then write the program name with prefix gksudo

gksudo firefox

you can add it to the right click of the mouse by writing some script."
bert [Entry]

Edit the launcher that opens the program. If you are using GNOME, put gksudo before the command. If you are using KDE, put kdesudo before the command. You could write a little script and add that to your right-click menu, if you really wanted to, but it might be easier to edit the launcher so you don't have to right click it every time.