terraspace
Posts: 76
Joined: Mon Dec 03, 2018 3:56 pm

gksudo deprecated

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 ?

fruitoftheloom
Posts: 20125
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: gksudo deprecated

Tue Jul 16, 2019 3:28 pm

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/
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

terraspace
Posts: 76
Joined: Mon Dec 03, 2018 3:56 pm

Re: gksudo deprecated

Wed Jul 17, 2019 9:03 am

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 ?

User avatar
jojopi
Posts: 3078
Joined: Tue Oct 11, 2011 8:38 pm

Re: gksudo deprecated

Wed Jul 17, 2019 10:26 am

"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

klricks
Posts: 6495
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: gksudo deprecated

Wed Jul 17, 2019 12:27 pm

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
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

User avatar
HawaiianPi
Posts: 4441
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: gksudo deprecated

Wed Jul 17, 2019 6:44 pm

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).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

andylh
Posts: 6
Joined: Thu Apr 26, 2012 5:32 pm

Re: gksudo deprecated

Wed Jul 17, 2019 11:05 pm

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.

User avatar
ksharindam
Posts: 118
Joined: Sat Jan 09, 2016 4:16 pm

Re: gksudo deprecated

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
My Qt projects at ... https://github.com/ksharindam

User avatar
jojopi
Posts: 3078
Joined: Tue Oct 11, 2011 8:38 pm

Re: gksudo deprecated

Thu Jul 18, 2019 11:00 pm

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.)

PaPaTheGMan
Posts: 3
Joined: Mon May 20, 2019 2:33 pm

Re: gksudo deprecated

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.

User avatar
thagrol
Posts: 1678
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: gksudo deprecated

Mon Aug 12, 2019 7:02 pm

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
This space unintentionally left blank.

Return to “Raspbian”