Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Ubuntu This forum is for the discussion of Ubuntu Linux.


  Search this Thread
Old 03-02-2007, 10:08 AM   #1
Registered: Jun 2004
Posts: 31

Rep: Reputation: 15
How to open a file explorer session in GNOME as root?

Is there a way to explore/change files in GNOME as root/su/sudo??

Whenever I want to add replacment icons I have to phaff about with the terminal as root changing permissions, copying files and making backups - surely there must be an easier way?

From what I recall from KDE, it was possible to open a file explorer window as superuser, is their an equivalent in GNOME?


Old 03-02-2007, 10:27 AM   #2
Senior Member
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
You'll need to find the Gnome equivalent to kdesu.

Old 03-02-2007, 02:01 PM   #3
LQ Newbie
Registered: Feb 2007
Location: NL
Distribution: Ubuntu
Posts: 20

Rep: Reputation: 0
try sudo nautilus
(Or if you aren't using nautilus as filemanager, use the other name)
Old 03-02-2007, 05:47 PM   #4
Senior Member
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466

Rep: Reputation: 51
I have what I'd consider a more elegent solution to your problem. The answer lay in Nautilus Scripts. Create the folowing 3 line text file, name it "Open as Administrator" and store it in /home/{user ID}/.gnome2/nautilus-scripts/ folder. Set the permission to execute.

gksudo "gnome-open $uri" &

To use in Nautilus or on the Desktop, right click the file or directory you want root access to and in the drop down menu select Scripts-> Open as Administrator. The file will be opened as root with whatever application is default for that file type. Open a text file this way and you get Gedit as root. To help me keep track of this I've changed the background color as root in Gedit and Nautilus. If you've opened a folder as root, any file selected in that window will also be opened as root. Nautilus scripts are very handy and can even be written in bash.
Old 03-02-2007, 06:01 PM   #5
Registered: Jun 2004
Posts: 31

Original Poster
Rep: Reputation: 15
Thanks alot people, your help is much appreciated. Its these little things that help me get by in Linux.
I am really trying to make the leap - my windows xp now sits next to me in the 'power off' position most of the time so that Linux can become my everyday machine!

Old 03-02-2007, 08:18 PM   #6
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,161

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
I just created an icon on the desktop, and make the launcher "gksudo nautilus".


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
(gnome-session:26232): Gtk-WARNING **: cannot open display: genthree Linux - Software 1 04-14-2006 04:08 AM
how do i open a session window in gnome in order to install a program. sleekmason Linux - Newbie 3 03-27-2006 03:30 PM
Gnome Session Manager crashes for non-root users teegee543 Linux - Software 0 07-01-2005 02:08 PM
gnome-session file namish Linux - Software 2 06-29-2005 05:38 PM
Can't use startx or gnome-session in slack 9.1: Can't open display. PF_The_Wall Slackware 6 11-22-2003 05:53 AM > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 12:07 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration