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

Posted on 2007-10-19
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 87

    Accepted Solution

    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.
    LVL 9

    Assisted Solution

    And if you don't mind the security risks involved, you can setUID the binary.  

    LVL 3

    Assisted Solution

    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


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

    LVL 87

    Expert Comment

    your welcome

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
    This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
    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.

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now