How to be granted root rights while browsing files/directories with Nautilus

I'd like to know if there a way to be granted root rights while using Nautilus 2.30 ?

For example I'd like to move some old folders of long unused users from the home directory - remains of previous distros (Debian).

Of course I can open a terminal, but I want to know if it is possible to do that with a mouse in Nautilus.


For Ubuntu <= 10.10 , 10.04

nautilus-gksu Install nautilus-gksu

Is an extension that grants root privileges using gksu nautilus.

It enables an option when you right-click on a file (also directories and other...) in nautilus: "Open as administrator". After installing it restart Nautilus (killall nautilus) and it will have the new feature.

enter image description here

Ubuntu 11.04 and 11.10,

install nautilus-gksu and copy and paste the libnautilus-gksu.so file from /usr/lib/nautilus/extensions-2.0/ to /usr/lib/nautilus/extensions-3.0/

Ubuntu 12.04 & 12.10:

The nautilus-gksu package has been dropped in Ubuntu 12.04 and 12.10 since gksu 2.0.2-6ubuntu1 release, so you can not install it easily. Here I’m going to use a nautilus script to add Open As Administrator functionality.

First download the libnautilus-gksu.so file:

Click to Download libnautilus-gksu.so

Then, run gksudo nautilus in terminal Ctrl+Alt+T to open the file browser with root privilege, copy and paste this file to /usr/lib/nautilus/extensions-3.0/. Or do it with this command:

sudo cp ~/Downloads/libnautilus-gksu.so /usr/lib/nautilus/extensions-3.0/

Log out and back in, or run this command to take effect:

nautilus -q

enter image description here

Source


If all you need is mouse, I'd try opening a terminal and then:

$gksudo nautilus

I don't see the need to install anything

edit: this was covered here


Ubuntu 12.04 and later

Nautilus Admin (nautilus-admin) is a simple Python extension for the Nautilus file manager that adds some administrative actions to the right-click menu:

  • Open as Administrator: opens a folder in a new Nautilus window running with administrator (root) privileges.
  • Edit as Administrator: opens a file in a Gedit window running with administrator (root) privileges.

To install Nautilus Admin in all currently supported versions of Ubuntu open the terminal and type:

sudo apt install nautilus-admin

gksu is discontinued in the official 18.04 and later repositories.

Alternatively open the directory in nautilus as root from the terminal with a command of the form:

sudo -H nautilus /path/to/directory 

Ubuntu 16.04 and earlier

gksudo is a frontend to sudo. Its primary purpose is to run graphical programs as root.

Open the terminal and type:

sudo apt-get install gksu # install gksu if it is not already installed
gksudo nautilus 

Enter your password in the window that pops up.

enter image description here