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
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:
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.
- Download Ubuntu Linux 18.04 LTS (Bionic Beaver) CD/DVD
- How to Install Laravel 5.6 PHP Framework with Nginx on Ubuntu 18.04
- How to Install Magnolia CMS on Ubuntu 18.04 LTS
- Using Flatpak on Ubuntu and Other Linux Distributions [Complete Guide]
- How to Set Different Wallpaper for Each Monitor in Linux
- How to Remove Trash Icon From Desktop in Ubuntu 17.10 and 18.04
- How to Fix Right Click Touchpad Not Working on Ubuntu 18.04 [Quick Tip]
- Add ‘New Document’ Option in Right Click Context Menu in Ubuntu 18.04 [Quick Tip]
- Getting Real GNOME Back in Ubuntu 18.04 [Quick Tip]
- Things to do After Installing Ubuntu 18.04