Create An Application Shortcut To Open Nautilus As Root In Ubuntu

You need root access to edit a lot of files in Linux, but terminal work can get tedious. Here''s a simple way to add a shortcut to your applications menu for a root-enabled Nautilus.

Sometimes, no matter which way you slice it, you have to roll up your sleeves and edit some system files in Linux. While you could always just use Terminal commands to copy, paste or edit files, sometimes it gets tedious. Furthermore, sometimes you're working with similarly-named files and it's just easier to look them in the eye as you edit (so you don't wind up editing the wrong file). Opening up a Terminal every time to run Nautilus as root isn't ideal, though, and luckily, technology blog GHacks has an easy way to create an application shortcut for root-enabled Nautilus instead.

All you need to do is open up a Terminal window and type in this command: sudo nano /usr/share/applications/Nautilus-root.desktop. Paste this text in the editor that comes up in Terminal:

[Desktop Entry]

Name=File Browser (Root)

Comment=Browse the filesystem with the file manager

Exec=gksudo nautilus





Note that my version is slightly different than GHacks'; theirs didn't seem to work for me.

Hit Ctrl+X, then press y and hit enter to save the file. After this, you should have a shortcut under Applications > System Tools > File Browser (Root), from which you can enter a session of Nautilus with full write permissions. Hit the link for more cool Nautilus tips, and share your own in the comments.

Tweak Nautilus to better suit your needs [GHacks]


    Ubuntu tweak, in my opinion, has a better way of accomplishing this.

    After you download and install it, go down the list to "Manage Scripts" and drag the "Browse as root" script from disabled to under nautilus-scripts.

    Now under the right click menu in the file browser you will have a scripts option, and browse as root will appear under it. This has the added advantage of opening a root permission window on an "as needed" basis, and will open the new window up at the exact location that you right clicked from.

Join the discussion!

Trending Stories Right Now