Yes, we should be looking for gksu
and fixing them, at least on canonical questions. However, this fix needs to be a multi-faceted approach.
First off, it's important to know why gksu
and gksudo
doesn't come with Ubuntu anymore. You're more than welcome to read this whole post, but I'll just trim the fat:
gksu
is not recommended any more and it may be removed entirely from future issues of Ubuntu. In general the development team would prefer us not to use GUI applications as root but to use sudo and the command line instead.
Now, it's important to take this with a grain of salt, because these are developers after all, and developers aren't always the best at knowing what's good for noob users.
Therefore, we can begin to design a multi-phase solution:
Antiquate gksu
Anywhere that gksu
is used or exists, we can add a little note saying effectively the following:
Since Ubuntu 13.04, gksu
has been deprecated and is no longer installed by default with Ubuntu. It is recommended that you use alternate ways of doing . If you absolutely need this package, run sudo apt install gksu
.
However, this doesn't exactly solve the problem, as there's a very clear reason as to why gksu
is no longer really recommended. Just throwing this on won't help people, and might in fact cause weirder problems down the line (plus the fact that gksu
might stop existing any moment).
Encourage Use of Specific Tools
Source management can be taken care of using the GUI "Software and Updates" tool, which is far less risky to users if something goes wrong. Similar tools exist for other Ubuntu components. If nothing of the sort exists, it's probably something your average run-of-the-mill user should be doing, bringing me to the next point.
Just Learn The [CENSORED] Terminal!
If a user is trying to do something pretty advanced, there's no need to take root actions from the GUI. If this is the case, we can just get rid of gksu gedit
and replace it with sudo nano
or whatever preferred text editor.
This option also encourages some UX friction for root actions, which is a very good thing. Root powers are dangerous, and should be isolated. By letting any user get access to root through a GUI, it might open up a huge window to allow even more problems to sneak in (e.g. "I accidentally deleted /etc from my file manager because I had a root Nautilus open and I didn't know that it was a root one. Halp!").
As for why, see that the Ubuntu dev team says, and what this answer says. In short, root access from the GUI is bad, and sudo
in the GUI is also bad.
In short, yes, we need to get rid of gksu
and replace it with either the proper GUI solution to the problem, or a command that can run fully in the terminal. Using sudo
to bring up graphical things is just a bad idea and can lead to so much trouble that it's just not even a good idea to try.
pkexec
requires configuring for use with graphical applications, and it seems to be quite complicated. I feel it's not really helpful for new users to be told to usepkexec
for graphical applications (when they are trying to fix some critical issue especially)...pkexec
. It brings up GUI pop up automatically. Been using it in all versions, 13.04 till 16.04. Other users whom I suggested to usepkexec
also have never mentioned any issues with it.DISPLAY
, etc. was not configured. This post: askubuntu.com/a/332847/158442DISPLAY
to launch any GUI app withpkexec
. Will need to test it in VM at some point.pkexec
has never worked for me just like that on GUI applications.