You should not ever need to do this.
Big bold print to emphasize the following:
gksuis an obsolete piece of technology superseded by the GNOME virtual filesystem suite and GNOME PolicyKit (via
pkexec). You seriously shouldn't have to use this, except in select instances where
gksuis (for some reason) a package depend-ency. Wait on software to be updated, or make the tags of any developer blink for eons until they give a damn enough to fix it.
Note to developers with actively-iterated software using
Really, give a damn and fix it. Save your inbox the burden of bearing the wrath of a thousand suns and recode your authentication routine in a GTK app to use GNOME PolicyKit.
Wasn't this already answered?
Yes, yes it was. Right here. But this is a terrible method as it involves mixing Ubuntu repositories from different versions. As one SX member put it:
There shall be misery and gnashing of teeth to the end of the age and beyond.
I will instead detail another answer from the same source material appended onto that very post with a different, more safe method which will ensure your chompers don't suffer from bruxism.
Risk of malicious software intervention
There have been software which had been able to work around, and even use
gksuwithout user consent which until the recent removal of this software was becoming a more likely threat. Use of this software assumes such risk, and should only ever remain in your system at your own peril.
If you are alright with this, you may continue reading.
Speculation about the name aside, the purpose of
gksu (and by extension,
gksudo though they are slightly different) is to provide a graphical frontend for the
su command, so that software using GTK can prompt for authentication and provide a modal / dialog for users to provide their login credentials for superuser tasks. In instances where this was possible, it is usually for acting as
Why was it removed?
The GNOME developers believed that their PolicyKit implementation is a better alternative to
gksu, as many behind the decision believed there isn't ever a reason a user would technically need to run a graphical application as a superuser, as its capability to be used with elevated privileges may not had been properly audited. See source at bottom for a more detailed answer from Ask Ubuntu.
Installation in modern Ubuntu
You will need the following packages. After following the links for each, select your system architecture, then the repository nearest your geographical location (or whatever is fastest).
If you save these files in a separate directory, installation can go much quicker.
Once all of those files are downloaded, you can then install as follows:
cdor use full paths to relevant location of files.
Assumes regex. If this isn't something your shell allows, Tab-complete instead.
sudo dpkg -i ./libgtop-2.0-10_2.32.0-1_*.deb sudo dpkg -i ./libgksu2-0_2.0.13_pre1-6ubuntu8_*.deb sudo dpkg -i ./gksu_2.0.2-9ubuntu1_*.deb
You can edit this command down further to a space-delimited list of packages in a single invocation of
dpkgfor this job, but wrap-around is disabled for code blocks here.
Remember what I said earlier about installing this more quickly? If you keep the three packages for making
gksuuseful in an entirely separate directory, you only need to do this:
Do not do this unless you are sure only the packages you need exist where you had saved them. Unforeseen consequences may occur otherwise!
sudo dpkg -i ./*