6

I heard about nautilus-gksu and would like to install it. Unfortunately, when I try, I get this:

glemi@XPS:~$ sudo apt-get install nautilus-gksu
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package nautilus-gksu

How and where can I get this package?

Glemi
  • 203
  • 1
  • 2
  • 7

4 Answers4

5

nautilus-gksu don't work anymore for a long time since version 12.04 of Ubuntu.

In replace for this use "Nautilus Admin" extension where is available in the official Ubuntu repositories:

sudo apt-get install nautilus-admin

What it do?

Runs Nautilus As Root for any folder and for files open as root with gedit

How to use?

Inside Nautilus, Right-click on any Nautilus file/folder and then Open as Administrator/Edit as Administrator

Maxwel Leite
  • 2,334
  • 3
  • 20
  • 28
4

Apparently nautilus-gksu has not been in the Ubuntu repositories since 12.04.

I got the below from: http://www.upubuntu.com/2012/09/open-files-and-folders-as-root-from.html

sudo apt-add-repository ppa:upubuntu-com/ppa
sudo apt-get update
sudo apt-get install nautilus-gksu

Then restart nautilus with this command:

nautilus -q

I didn't try this myself, and don't know if there's a better repository to add than upubuntu; it's also supposed to be available from the Linux Mint repositories from my quick Google search. If you Google for alternates, I would recommend limiting the results to the last year, to avoid obsolete references.

Borax Bob
  • 64
  • 4
  • Excellent answer - thank you very much Borax Bob! I used the upubuntu repository and it worked right away. I wonder why they would remove such a useful package from the standard repository. – Glemi Jul 06 '13 at 14:30
  • I would up-vote your answer if I had the required reputation. – Glemi Jul 06 '13 at 14:31
  • 3
    I received "E: unable to locate package nautilus-gksu" on the third step. – Gaʀʀʏ Apr 21 '14 at 20:37
  • It seems it is no more located in that repository. Could you please update your answer or comment where one can get 'gksu' from? Thank you. – GSazheniuk Nov 20 '15 at 18:22
1

In Ubuntu 18.04 you cannot use nautilus-gksu anymore.

Alternative way to use a gksu command is to alias it as follows:

function __gksufn() {
  "$1" admin://"$2"
}

export alias gksu=__gksufn

In this way you can open files as gksu gedit /path/to/your/file.txt

Matteo Gaggiano
  • 111
  • 1
  • 4
  • 1
    Thanks for this. Maybe an obvious question, but is the alias you wrote supposed to go in `~/.bashrc`? After writing it and saving I tried `gksu nautilus` in the terminal and it was unrecognized. I tried making a `.bash_aliases` file, which is accessed by `.bashrc`, and putting it in there but it still didn't work. – Eben Kadile Jul 30 '18 at 23:31
  • 1
    @EbenCowley Is important to notice that the `__gksufn()` function **must** exists in the same environment of the alias, so I advice you to put the script into the `.bash_rc` at the end of the file. Just pay attention to `export ` part, it's important to know that the export will make alias available in the current environment. – Matteo Gaggiano Jul 31 '18 at 07:17
0

Check your internet connection. If you are behind a proxy server, configure APT from /etc/apt/apt.conf to use the proxy.

Then, run sudo apt-get update to update the sources.

This should fix your problem.

Manishearth
  • 413
  • 8
  • 30
  • Thank you for the suggestion Manishearth - I believe my Internet connection works just fine (otherwise I couldn't have posted this question here, right?). There is no proxy that I know of that I'm behind (if there were I wouldn't know how to configure it). I ran `sudo apt-get update` though but it didn't help. By the way, I can install other packages without problem so I doubt it has anything to do with the Internet connection or how apt is configured. – Glemi Jun 29 '13 at 15:08
  • @Glemi Did `apt-get update` work or did it return an error too? If not, then I don't know what the issue is. – Manishearth Jun 29 '13 at 15:14
  • It seems to work like a charm - no errors. Does installing `nautilus-gksu` work on your computer? – Glemi Jun 29 '13 at 15:56
  • @Glemi yes, it does – Manishearth Jun 29 '13 at 16:02