2

I'm trying to port a script to Ubuntu 18.04 that uses gksudo to prompt the user for admin password in order to run a GUI program with the admin permissions.
Now, gksudo has been removed from Ubuntu 18.04 and I understand that gvfs with the admin backend is the recommended alternative (as described in this article and elsewhere).
However, I am having trouble running it (My current environment is 16.04, haven't tried on 18.04 yet)

:~$ ls -l /home/luke/test
-rw--w---- 1 root root 22 Jan 23 10:36 /home/luke/test
:~$ gedit admin:///home/luke/test
** (gedit:32552): WARNING **: The specified location is not supported

gedit itself runs, saying:

Could not open the file “admin:///home/luke/test”.
Unable to handle “admin:” locations

Trying to run nautilus fails similarly.
How do I use gvfs to launch an X program with super user permissions?

ezekiel
  • 337

0 Answers0