In anticipation of the end of life for Linux Mint 17, I have settled on trying Ubuntu Mate 18.04. In Linux Mint, there is a ‘root terminal’ which is quite useful for me. I fully understand the caveats regarding safety when using a ‘root terminal,’ but I have not been able to find the ‘root terminal’ in Ubuntu Mate 18.04. The command for launching the ‘root terminal’ in Linux Mint 17.3 is “gksu /usr/bin/x-terminal-emulator.”
When I try to install ‘gksu’, the apt cli complains that it can’t find a candidate for gksu, but that gksu is referred to by other programs. However, it does not say in which other program gksu might be included.
The dependencies for gksu on Mint 17 are; libc6, libgksu2-0, libglib2.0-0, libgtk2.0-0. Even though these dependencies are satisfied on Ubuntu Mate 18, I still have not found the larger or “meta” package which might contain gksu.
Does anyone have any leads about this?
Thanks in advance for your help.
owa
gksu was deprecated and from what I’ve read, there is no exact replacement. There is pkexec but you have to tweak some things to make it work.
I’ve found that pkexec works pretty much as expected, that is in every case that I’ve needed a graphical root. What kind of tweaks have you used @pavlos_kairis ?
some .desktop files would not run on X11 with pkexec and I had to modify/add a policy.
GKSU not being present and a drop in replacement not being in place when it was removed is a giant pain in the *rse. It can be partially fixed by reinstalling GKSU. But, this is not achieved trivially and, even then, for some reason, it still doesn’t work completely correctly. For example, if I click on a deb online a dialog box would ask me if I wanted to save it or open it directly in gedbi. Before GKSU was deprecated, I could choose to load it directly in gdebi and the GKSU password box would come up. Now, even with GKSU reinstalled this does not happen and I have to download the deb. Additionally, even after downloading it, I cannot simply double click the deb to load it in gdebi. If I do, gdebi opens as a normal user and will not install the deb. Instead, I must open gebi as root first, then navigate to the deb and load it from within gdebi
What GKSU does do, though, is allow me to prefix the gdebi-gtk command in the main menu entry with “GKSU” so that it opens as a root user.
Oh, well. There is always the terminal.
sudo apt install /path/to/app.deb
Jokes aside, pkexec works with gdebi-gtk
pkexec gdebi-gtk
in the desktop file the relevant line would be
Exec=pkexec gdebi-gtk
and for terminal
pkexec mate-terminal
Policy files for those applications are allready in /usr/share/polkit-1/actions.
From the terminal, without the policy file , setting DISPLAY and XAUTHORITY variables will make pkexec allow GUI to launch.
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY appname
Very nice explanation @anon94368460