Easily Sudo-open that File

If you are using GNOME and a distribution that supports either sudo or su, then we have a quick tip for you.

Right-click on your panel and select Add to Panel... and then Custom Application Launcher. A window similar to the one displayed below should appear.


Give it a short name, and then type in one of the following commands for Command, depending on your distribution type.

Sudo-based distributions such as Debian, Ubuntu, or Gentoo should use the following:

gksudo "gnome-open %u"

Su-based distributions like Fedora can use:

gksu "gnome-open %u"

You might need to type in the quotes manually due to the formatting used on this site.

gksu might also work just as well for sudo-based distributions, but to be specific, use gksudo.

Now when you need to open a file or folder as root, just drag it to the icon on your panel and type in your password. Enjoy.

Avatar for jacob Jacob Peddicord - http://jacob.peddicord.net/

Jacob is a web developer, student, and programmer from Ohio. He is a staff member at the Ubuntu Forums and is most likely a fanboy of the distribution. He loves to write in code and words, play video games, and rant about topics most would have abandoned long ago. Jacob uses GNOME and is never seen running stable software, much to the demise of his laptop.

Home » Articles »

Discussion: Easily Sudo-open that File

  1. moot (guest)

    # Posted on 27 February 2010 at 09:56 PM

    thank you. This is really convenient, I use it a lot.

Home » Articles » Easily Sudo-open that File