Tips & Tricks, Tutorials, Hacking, Troubleshooting,

Do you need to access files as root often in Ubuntu, but prefer to work in a graphical file browser? There are ways to open the Nautilus File Browser with root access.

One way is to press Alt + F2 to open the Run Application dialog box. Enter the following into the edit box and click Run.

gksu nautilus

Running Nautilus using gksu

The File Browser opens into the root home directory.

Nautilus opened into the root home directory

You can navigate to your own home directory by clicking on File System under Places.

Selecting the File System

Then, click the home folder icon and then the folder icon with your user name.

Navigating to your home directory

Another method of accessing the Nautilus File Browser as root, is to add an item to the Applications | System Tools menu to open Nautilus as root. To do this, open a Terminal window by selecting Accessories | Terminal from the Applications menu.

Opening a Terminal window

Enter the following line at the prompt and press Enter.

gksudo gedit /usr/share/applications/Nautilus-root.desktop

Creating the file for the new menu item

Gedit opens with the Nautilus-root.desktop file active. Enter the following lines into the file and click Save.

[Desktop Entry]

Name=File Browser (Root)

Comment=Browse the filesystem with the file manager

Exec=gksudo “nautilus –browser %U”

Icon=file-manager

Terminal=false

Type=Application

Categories=Application;System;

Editing and saving the new menu item file

Close gedit by selecting Quit from the File menu.

Closing gedit

Close the Terminal window by typing “exit” (without the quotes) at the prompt and pressing Enter.

Closing the Terminal window

You should now have a File Browser (Root) option on the Applications | System Tools menu.

The new File Browser (root) option

This new option allows you to enter a session of Nautilus with full write permissions.

No comments:

Post a Comment