How can I run a program (selected from menu) as root?

Posted on 2007-10-19
Medium Priority
Last Modified: 2013-12-16

I am normally NOT logged in (I use Ubuntu 6.something) as root.  If I want to run a command line program as root, I can use su or sudo.  But if I choose to run a program from the gnome menu, it seems to always run as the user I am logged in as.  My question:  How can I select a program to run from a menu and tell the computer that I want to run it as root?

Question by:tayloenic
LVL 88

Accepted Solution

rindi earned 240 total points
ID: 20109307
If you have gksu installed, you can use that, if not you could install it.

Another method would be to install Krusader, a file manager similar to midnight commander, but it runs under the GUI, and you can start it as root, then just point it at the file you want to start and hit enter to start it.

Assisted Solution

chingmd earned 100 total points
ID: 20110037
And if you don't mind the security risks involved, you can setUID the binary.  


Assisted Solution

4dimach earned 160 total points
ID: 20111497
There is no simple way of doing this for every application. But this what you can do:

Right click on the panel> add to panel > click custom app luncher, put the name and the command( gksu your_application). Don't forget to select a icon, you can click were it says icon or drop a icon on the word icon.

Hope it helps.

Author Comment

ID: 20215444

I will try these suggestions.  Thanks to all of you for responding

LVL 88

Expert Comment

ID: 20215558
your welcome

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month15 days, 6 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question