Gksu-related issues in 18.04

I’ve been using Gnome-Commander file manager for years and like it – a lot!

But, in 18.04, the menu option to launch it as root fails because it wants one of the following: xdg-su, gksu, gnomesu,kdesu – and, as far as I can tell, NONE of those are available. anymore.

I am able to open a terminal and enter “sudo gnome-commander” , so I thought I could add a menu item with the same entry, but that does not do anything.

I read that I could use"pkexec" – but that does not work, either.

And yeah, I know there is a way to use “admin” to edit files as su, but that’s not what I am trying to do.

I need a way to launch an app using sudo with a graphics environment – what gksu used to do.

Any ideas?

Want it back? sudo apt install gksu

Except that gksu has been dropped by Debian and isn’t in the Ubuntu 18.04 repos anymore. I guess it can still be installed manually by grabbing the deb from the Artful repos but it might stop working in the future or have broken dependancies.

Strange. Using Synaptic, I see “gksu 2.02.2-9ubuntu2 296kB graphical front-end to su and sudo”. Does Synaptic (and apt by the way) manage to bring in something that does not belong in 18.04? If so, how?

Edit: Read this for some information -

It’s possible that it was kept from your previous version of UM (either because you chose during the upgrade to keep obsolete packages or because of related dependancies that were kept). Check the properties of the package in Synaptic, Version tab: if the only version displayed is “now”, it means that the package is orphaned, it doesn’t come from a repository. It’s also possible (though unlikely for gksu) that yours comes from a 3rd-party repo.

In Synaptic, you can also check Status → “Installed (local or obsoletes)” (my system is in french so the name of the section could be a bit different) for orphaned packages. Beware, though, some might still be in the repos but with an older version. Don’t remove them without checking in details but it’s a good idea to be clean on orphaned packages as they can lead to dependancies issues and break APT.

Sorry - fresh install. I don’t 'believe in" OS upgrades. This was found in the three fresh beta installs that I maintain.

That’s weird, then. If you installed the beta and upgraded it, it’s quite possible that gksu was removed late in the development cycle so you have a package that is now orphaned. If it’s a fresh install from the official 18.04 release (that went out yesterday), it’s really strange.

In any case, if you check on packages.ubuntu.com, you’ll see that there are no packages related to gksu in the 18.04 repos.

I’ll do a fresh install and see what’s what. Thanks terzag.

Edit: Using a live usb of ubuntu-mate-18.04-desktop-amd64.iso, terzag is correct, gksu is gone from the repos. However, using sudo -H caja seemed like much the same as gksu caja. I’ll look at it more as time goes by. I learned something today - thanks terzag.

Edit2: When launching sudo -H caja from terminal, I get the following:

michael@D830:~$ sudo -H caja
[sudo] password for michael: 
Initializing caja-xattr-tags extension
Initializing caja-open-terminal extension

So it would seem that these two caja extensions must be installed. They probably came along with my install.

Edit3: In using a panel launcher, I’ve found that pkexec caja seems to work quite well as a replacement for gksudo caja.

Sorry, should have mentioned that I tried that right off – and got the indication that gksu is not in the repos anymore.

Make sure that caja extensions are installed, particularly the two I mentioned above. Then reboot if needed and pkexec caja should work.

Edit: Also you might try sudo apt install caja-admin.

Your suggestions do work – when I use caja.

But … I want to use gnome-commander and, apart from opening a terminal and launching it manually from there, nothing else works – including menu add-ons and launchers.

Also, I checked and caja-admin is already installed.

UPDATE: Discovered that if I change the Launcher to “open in terminal”, then a terminal opens, prompting for the password, and when I enter that, the app then DOES open! So, there is a workaround – of sorts.

I just installed gnome-commander and noticed that it has an option to open as root - File, Start Gnome Comander as Root. Do you use this? I’m not sure what we’re talking about…

That was the option I tried – that fails, mentioning it needs one of the “su” components.

OK, gotcha. I’ll look around and see what I can find out. If you launch gnome commander from terminal, what command do you use? I just read your update Mark.

From terminal, I enter “sudo gnome-commander” – and it works just fine.

So, I was surprised when using the same command, either from a menu item entry, or from a launcher, would NOT work.

Because sudo expects that you enter the password in a terminal, it doesn’t display the prompt otherwise. That’s why there was gksu: it’s the same thing but it opens a window for the prompt.

If gnome-commander isn’t compatible with pkexec, I’m not sure there’s a solution apart manually reinstalling gksu from the debs grabbed in the Artful repos. It’s probably possible as I still had gksu after upgrading to 18.04 when I chose to keep obsolete packages, which means that at least there aren’t dependancies that break everything. For now, at least.