How can I install nautilus-gksu?
Solution 1
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.
Solution 2
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
Solution 3
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
Related videos on Youtube
Glemi
Updated on September 18, 2022Comments
-
Glemi almost 2 years
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 almost 11 yearsThank 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. -
Manishearth almost 11 years@Glemi Did
apt-get update
work or did it return an error too? If not, then I don't know what the issue is. -
Glemi almost 11 yearsIt seems to work like a charm - no errors. Does installing
nautilus-gksu
work on your computer? -
Manishearth almost 11 years@Glemi yes, it does
-
Glemi almost 11 yearsExcellent 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 almost 11 yearsI would up-vote your answer if I had the required reputation.
-
Gaʀʀʏ about 10 yearsI received "E: unable to locate package nautilus-gksu" on the third step.
-
GSazheniuk over 8 yearsIt 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.
-
Eben Kadile almost 6 yearsThanks for this. Maybe an obvious question, but is the alias you wrote supposed to go in
~/.bashrc
? After writing it and saving I triedgksu 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. -
Matteo Gaggiano almost 6 years@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 toexport
part, it's important to know that the export will make alias available in the current environment.