Page 1 of 1

gksudo deprecated

Posted: Tue Jul 16, 2019 2:51 pm
by terraspace
gksudo has been deprecated in Debian and thus in Buster.. what is the proposed alternative for example to run pcmanfm ?

Re: gksudo deprecated

Posted: Tue Jul 16, 2019 3:28 pm
by fruitoftheloom
terraspace wrote:
Tue Jul 16, 2019 2:51 pm
gksudo has been deprecated in Debian and thus in Buster.. what is the proposed alternative for example to run pcmanfm ?

https://itsfoss.com/gksu-replacement-ubuntu/

Re: gksudo deprecated

Posted: Wed Jul 17, 2019 9:03 am
by terraspace
I had seen that link and tried those options, but neither pkexec or admin: style ports seems viable.

pkexec pcmanfm gives cannot open display and there isn't a valid admin: URI to just open the app without a file ref ?

Re: gksudo deprecated

Posted: Wed Jul 17, 2019 10:26 am
by jojopi
"sudo sudo -V" shows that DISPLAY and XAUTHORITY variables are preserved by default, and I cannot find any evidence that gksudo was ever really needed in Debian/Raspbian:

Code: Select all

sudo pcmanfm
I do notice that "ssh -X" sessions first require:

Code: Select all

export XAUTHORITY=~/.Xauthority

Re: gksudo deprecated

Posted: Wed Jul 17, 2019 12:27 pm
by klricks
terraspace wrote:
Tue Jul 16, 2019 2:51 pm
gksudo has been deprecated in Debian and thus in Buster.. what is the proposed alternative for example to run pcmanfm ?
What's wrong with just sudo?

Code: Select all

sudo pcmanfm

Re: gksudo deprecated

Posted: Wed Jul 17, 2019 6:44 pm
by HawaiianPi
klricks wrote:
Wed Jul 17, 2019 12:27 pm
What's wrong with just sudo?

Code: Select all

sudo pcmanfm
It doesn't protect files in your /home directory and some configuration files may end up owned by root (see link above).

Re: gksudo deprecated

Posted: Wed Jul 17, 2019 11:05 pm
by andylh
I added the stretch repository to the sources.list in /etc/apt. Just copied the line for buster replacing "buster" with "stretch"

Updated the cache, and installed gksu with "sudo apt-get install gksu".

After installing gksu I recommend commenting out the line added in sources.list to avoid future problems of wrong versions being incorporated.

Used main menu editor to create a menu item for "gksudo pcmanfm"

Have still to find a way to successfully add a menu item into the pcmanfm's list of commands to open as root - notwithstanding finding several such ways documented on the www - unfortunately, none have worked.

Re: gksudo deprecated

Posted: Thu Jul 18, 2019 5:10 pm
by ksharindam
The only proper alternative for gksu I found is lxqt-sudo.

Code: Select all

sudo apt install lxqt-sudo

Re: gksudo deprecated

Posted: Thu Jul 18, 2019 11:00 pm
by jojopi
HawaiianPi wrote:
Wed Jul 17, 2019 6:44 pm
It doesn't protect files in your /home directory and some configuration files may end up owned by root (see link above).
gksudo does nothing to reduce that risk, compared with regular sudo. The only file it treats specially is .Xauthority, and that file is never written to by normal clients.

The reason for copying the cookie to /tmp is that that is the only way it will be readable when the target user is not root, or the home filesystem is on NFS or FUSE, or any MAC scheme is in force. None of these are typical in Raspbian.

I do not recommend running any GUI application as root. But if you must, plain "sudo" should be fine.

(As for menu-based root-launching, that is an even worse idea. The complaint presumably is that plain sudo fails in those contexts, rather than that it damages the home directory.)

Re: gksudo deprecated

Posted: Mon Aug 12, 2019 2:30 pm
by PaPaTheGMan
ksharindam wrote:
Thu Jul 18, 2019 5:10 pm
The only proper alternative for gksu I found is lxqt-sudo.

Code: Select all

sudo apt install lxqt-sudo
Would like to explore. I installed it, but have no clue how to use. Could not find examples. Help would be greatly appreciated.

Re: gksudo deprecated

Posted: Mon Aug 12, 2019 7:02 pm
by thagrol
PaPaTheGMan wrote:
Mon Aug 12, 2019 2:30 pm
ksharindam wrote:
Thu Jul 18, 2019 5:10 pm
The only proper alternative for gksu I found is lxqt-sudo.

Code: Select all

sudo apt install lxqt-sudo
Would like to explore. I installed it, but have no clue how to use. Could not find examples. Help would be greatly appreciated.
I imagine something like

Code: Select all

lxqt-sudo [command [arguments]]
is all you need. Though if you're not familiar with what sudo/gksudo/lxqt-sudo do I'd advise against random experimentation.

You could try reading the man page for it:

Code: Select all

man lxqt-sudo