Easily Sudo-open that File

  • November 11, 2007
  • Avatar for jacob
    Jacob
    Peddicord

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.

gksu-launcher.png

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

Home » Articles »