Friday 16 April 2010

Browsing files in Ubuntu with superuser / root status

The file browser in Ubuntu is called Nautilus, and it works just like the Windows Explorer or Mac Finder. However, using Nautilus, I found that I was only able to move and delete files and folders within my home folder. To do anything outside this folder, I need "superuser" status. In the terminal, this "create folder"operation will not work:

mkdir /usr/share/newfolder

because I don't have write access to /usr/share. However, if I use "sudo" before the command, like this;

sudo mkdir /usr/share/newfolder

I am prompted for my password, and after entering it, I get superuser status and the folder is created. This works well for manipulating files and folders from the terminal, but I want to do the same using the graphical file browser Nautilus. The solution? Create a launcher on the desktop with the command

gksudo nautilus

gksudo is similar to sudo, but is used for graphical applications, as explained here. A window will pop up, asking for the password, and after entering it, Nautilus opens with superuser status.

0 comments:

Post a Comment