Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Till Ubuntu 11.10 there the context or edit menu had an option to open a specific folder as administrator. This option came with the package nautilus-gksu. Now it vanished. Does anybody know how to get it back?

share|improve this question
add comment

9 Answers

up vote 11 down vote accepted
+50

Are you sure you mean 11.04? In any event the package is still in the repos & should still work as is through 11.04 (the last version built was "nautilus-gksu (2.0.2-5ubuntu2) natty"

In 11.10 it would install but not work, as of the other day it finally was noted in the current 12.04 build

  • Patches dropped:
    • debian/patches/21_strip_blank_space.patch: No longer needed since we don't build nautilus-gksu anymore.

As far as 11.10 & probably 12.04 the extensions will work fine, you can install the package & either copy or link to proper dir.

Ex. of linking after install

sudo ln -s /usr/lib/nautilus/extensions-2.0/libnautilus-gksu.so /usr/lib/nautilus/extensions-3.0/libnautilus-gksu.so

To copy just replace ln -s with cp.

You actually don't even need to install the package, just place a copy of libnautilus-gksu.so in /usr/lib/nautilus/extensions-3.0

A bug I had on - at this point just hoping someone with auth will mark "Won't Fix" https://bugs.launchpad.net/ubuntu/+source/gksu/+bug/817383

For 12.04

You can no longer just install the 11.10 package & move or link the .so. -

Easiest way is to download the nautilus-gksu package for your architecture from either of these 2 locations, and save it in your downloads folder

http://packages.ubuntu.com/oneiric/nautilus-gksu pick architecture at bottom of page

32 bit- Direct link from ubuntu.mirror.cambrium.nl

64 bit- Direct link from ubuntu.mirror.cambrium.nl

https://launchpad.net/ubuntu/+source/gksu/2.0.2-5ubuntu2 pick architecture under "Builds" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Once downloaded right click on the .deb > extract here. In the extracted contents, Browse to usr/lib/nautilus/extensions-2.0, inside will be libnautilus-gksu.so

As root (To enter root open terminal and enter gksu nautilus) copy the file from above in to /usr/lib/nautilus/extensions-3.0 folder in your filesystem +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Example from terminal, automated commands if you extracted in Downloads folder-

On my 64 bit install downloaded nautilus-gksu_2.0.2-5ubuntu2_amd64.deb & extracted right in my Downloads folder

sudo cp ~/Downloads/nautilus-gksu_2.0.2-5ubuntu2_amd64/usr/lib/nautilus/extensions-2.0/libnautilus-gksu.so /usr/lib/nautilus/extensions-3.0

On my 32 bit install downloaded nautilus-gksu_2.0.2-5ubuntu2_i386.deb & again extracted in Downloads folder so terminal command

sudo cp ~/Downloads/nautilus-gksu_2.0.2-5ubuntu2_i386/usr/lib/nautilus/extensions-2.0/libnautilus-gksu.so /usr/lib/nautilus/extensions-3.0   
share|improve this answer
1  
You are right, I meant Ubuntu 11.10. I correct that in my question. Tanks a lot. –  user5950 Nov 11 '11 at 5:09
1  
Ewww, no Open as Admin Nautilus package anymore, really? Gnome 3 is more than an year old, and such a basic feature wasn't ported yet to official repos? –  MestreLion May 4 '12 at 15:54
    
After you do this, do "sudo nautilus -q" and "nautilus -q" to see the new option. –  Erel Segal Halevi Nov 26 '12 at 7:27
    
This doesn't work anymore with Ubuntu 13.10. –  Khurshid Alam Oct 17 '13 at 6:17
    
I don't like using gksu with nautilus anymore, have switched to pkexec. If really inclined - install gksu : open gksu-properties & make sure it's set to sudo authenication mode, not su, Then place libnautilus-gksu.so in /usr/lib/nautilus/extensions-3.0, restart nautilus –  doug Oct 17 '13 at 23:45
show 3 more comments

Working For 12.04

You can accomplish Open as Admin with a Nautilus script placed in ~/.gnome2/nautilus-scripts. The name you give the file will be placed in the Scripts menu.

1. Right click on desktop, Select > Create New Document > Empty Document. Name the file "Open As Administrator" , Open the file and paste the following text into it,

for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do
gksudo "gnome-open $uri" &
done

Click save and close out.

2. Now mark the file as executable, right click > Properties > Permissions > look down for "Execute" and check "Allow executing file as program" -

enter image description here

3. Open the file browser, go to > View > Show Hidden Files, now navigate to you home folder, and Place the file in ~/.gnome2/nautilus-scripts . Shown below -

enter image description here

4. Now right click on your folder or file of choice and select > Scripts > Open As Administrator , you then will get a screen prompting for your password, and the file/folder will open in their respective program as administrator-

enter image description here

This method shouldn't break from updates to Nautilus, because it is a custom script and will be in the right click menu under Scripts, will work on desktop files, and files and folders in Nautilus, however does not work on the left folder pane in nautilus.

share|improve this answer
    
Thx!! Works also with Ubuntu 14.04. I use the folder ~/.local/share/nautilus/scripts/ –  MC Basstard Apr 20 at 10:13
add comment

You can open nautilus from the command line as administrator with sudo. For example if you run

sudo nautilus /etc/

It allows you to right-click and create folder where you normally wouldn't be able to.

If you just want to open a nautilus window which has administrator privileges you do not have to specify the folder:

sudo nautilus
share|improve this answer
add comment

You can run gksudo nautilus to run Nautilus as a super-user. I would recommend against using sudo to open graphical applications as root as they will often inherit your current user's environment and possibly create files in your home directory with root ownership.

Edit; in response to OP's comment

Install nautilus-actions, then logoff/login or reboot (whichever you prefer). Run nautilus-actions-config-tool.

Hit the +page icon on the toolbar in the dialog. Give it the name you want.

Under actions tab, enter context label to whatever you want it to show up as in your right-click. If you want it to show up as a tool bar, be sure to check "Display item in the toolbar". This may not work in Unity (it didn't for me).

Under command tab; give it a unique label. Supposedly this appears as the tool tip. In Path, specify 'gksudo' (without quotes). in parameters, supply 'nautilus %b' (without quotes). In Working directory, give '%d'. Click on the Save Icon and rightclick your directory/file.. under Nautilus Actions, you will see your new item.

That's the closest I've found, I think, in what you're looking for.

share|improve this answer
    
I already knew this way, but I want to open it while I'm browsing. –  Wietse de Vries Apr 30 '12 at 18:28
    
Updated my answer- I think this may be what you're looking to achieve. –  papashou Apr 30 '12 at 20:26
add comment

Try this (whatever version of Ubuntu)

http://gnome-look.org/content/show.php?content=100703

share|improve this answer
add comment

for ubuntu 12.04, which uses dolphin as its folder system, you can use the following command to open a folder under root:

kdesudo dolphin /.../...

or just:

kdesudo dolphin 

then browse through your filesystem for the folder your looking for.

share|improve this answer
add comment

open terminal and type

gksu -s

it will ask for password and then a window will pop up asking for which program to run and to chose user
write nautilus in the program option and choose root in user option

share|improve this answer
add comment

You actually don't even need to install the package, just place a copy of libnautilus-gksu.so in /usr/lib/nautilus/extensions-3.0

I found the libnautilus-gksu.so file here

on 12 Precise there is no nautilus2.0 folder so the copy or link to commands wont work because the file is not there ....you must manually download and put in .... /usr/lib/nautilus/extensions-3.0/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.