gksu Removed From Ubuntu, Here's The Recommended Replacement

Ubuntu 18.04 no gksu

The gksu package, which provides GTK+ front-ends for su (gksu) and sudo (gksudo), was removed from the Ubuntu 18.04 repositories, so it won't be available starting with this Ubuntu release.

gksu is used to allow elevating your permissions when running graphical applications, for example in case you want to run a graphical text editor as root to edit a system file, or to be able to remove or add a file to a system folder.

How to edit system files using a GUI without gksu?

Enter admin://. The recommended way of performing operations that require elevated permissions using a GUI is by using the gvfs admin backend, which is available in both Ubuntu 18.04 LTS and 17.10, by using the admin:// prefix.

All you have to do is open Nautilus, press Ctrl + L so you can type in its address bar, and type admin:// followed by the path of the folder containing the file you want to edit, and enter your password. After doing this, you can use any GUI application to alter system files, like Nautilus to add / delete files or folders, Gedit to edit text file, and so on.

admin instead of gksu ubuntu

Here's an example. Let's say you want to edit the Grub file. Instead of using gksu gedit /etc/default/grub, you can open Nautilus and type: admin:///etc/default. You'll be asked for your password and after you enter it, you can open the grub file with Gedit, then save it.

Note that there are 3 forward slashes after admin: because 2 are required by default and the 3rd is from the path that follows, which begins with a slash: /etc/default. One more thing: in Nautilus, don't enter the direct path to a file but to a folder containing the file you want to edit.

In the same way you can run Gedit from a terminal to open a system file and edit it, for example:

gedit admin:///etc/default/grub

This will prompt for your password and then open the file in Gedit, allowing you to edit it.


  1. Or you can do the old same way.....

    pkexec yourprogram......

    This will behave like straight old gksudo.

    For the die-hard old-timers, you can creat an alias to pkexec named gksudo. It will do.

    1. For pkexec, you need policy files or else you cannot use it. For instance, you can get policy files for Nautilus by installing nautilus-admin.

  2. If you like gksu you can use an alias. You can see the answer here: https://askubuntu.com/a/1045252/752945

    1. That's nice and probably the best solution if they would have included this by default in Ubuntu, but I don't see the point if it requires an extra step from the user... you can just use admin instead.

    2. sometimes you want to do remote admin on the machine then gksudo-like commands come in handy.

  3. where from can i install gksudo from ppa?

    1. gksu is not recommended any more (you should use admin:// as explained in the article) but if you really really want to install it from a PPA, here is one that has gksu for Ubuntu 18.04 / Linux Mint 19: http://launchpad.net/~mark-pcnetspec/+archive/gksu


Powered by Blogger.