gksu Removed From Ubuntu, Here’s What You Can Use Instead


I am exploring Ubuntu 18.04 these days. And when I was trying to suppress the Ubuntu crash report, I tried to use a command with gksu.

I was slightly surprised to find it not installed by default so I went on to install it. And this is where my surprise turned into a shock.

When I tried using sudo apt install gksu, my system told me “Package ‘gksu’ has no installation candidate“.

The complete error was this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package gksu is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'gksu' has no installation candidate

gksu not available in Ubuntu 18.04

This made me do some little investigation and I found that gksu has been deprecated. It was first removed from Debian and then Canonical decided to drop it from Ubuntu 18.04. Application developers are suggested to use PolicyKit instead.

What was gksu?

gksu was the program that provided a GTK frontend for su and sudo. This way graphical applications were allowed to be run with root privileges.

As an end user, you might have used gksu to run Gedit editor for modifying some system files that required root privileges.

Since gksu is no more, what can you do if you need to open a program like Gedit as superuser?

Editing system files without gksu in Ubuntu 18.04 and other Linux

Users have been advised to use gvfs admin backend. Keeping technical jargon aside, it means that you should add admin:// prefix to the path of the file you want to edit.

So, if you were using a command like this with gksu:

gksu gedit /etc/default/apport

You can use the following command instead:

gedit admin:///etc/default/apport

replacing gksu in Ubuntu 18.04

This way you can still edit system files without gksu.

I know a lot of us Linux users got used of gksu and as gksu is deprecated, it does pose a little inconvenience. There is little we can do at our end except for using admin:// prefix.

I hope this article helped you with gksu issue in Ubuntu 18.04 and other Linux distributions. If you have questions or suggestions, please feel free to use the comment section below.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.