?
Solved

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

Posted on 2007-10-19
5
Medium Priority
?
267 Views
Last Modified: 2013-12-16
Experts:

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?

Thanks,
Tnic
0
Comment
Question by:tayloenic
5 Comments
 
LVL 88

Accepted Solution

by:
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.
0
 
LVL 9

Assisted Solution

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

0
 
LVL 3

Assisted Solution

by:4dimach
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.
0
 

Author Comment

by:tayloenic
ID: 20215444
Experts:

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

Tnic
0
 
LVL 88

Expert Comment

by:rindi
ID: 20215558
your welcome
0

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