Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

What is the replacement of kdesudo and gksu in Buster?

Linux Kernel, Network, and Services configuration.
Message
Author
L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: What is the replacement of kdesudo and gksu in Buster?

#16 Post by L_V »

Deb-fan wrote: Personally planning to continue using gksu/do for awhile yet.
'gksu' which is a GTK interface to open applications in iKDE5 is probably (I am even sure) not a good suggestion.

Struggling to find a solution to use "sudo" to open a graphical application in KDE5 is a very bad idea.
'sudo' should only/exclusively be used to launch commands or ncurse applications (nano/aptitude etc) in a terminal, but never a graphical application.

For example, Partitionmanager or Gparted which are administration applications can be open without any problem as user, because their policy is managed by policykit.

The good question should not be "how to open as root" a graphical application not declared in policykit, but why do you need it.
Leoncio wrote:In my system if I open a text file I'm not allowed to write, kate will not ask me for a password; it will just refuse to write
You then have something wrong in your installation (clean install ? fresh user profile ? Are you declared as sudoers ?)
-> I do not have any problem in Buster or testing with KDE5, and never need to open any graphical apps as root.

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: What is the replacement of kdesudo and gksu in Buster?

#17 Post by Deb-fan »

Yeah I know but still mainly seems silly to me overall. Someone with root/sudo privileges can do whatever they wish to a given system, polkit, policy file or no. Needless to say, I do want a convenient and straight-forward means to launch graphical apps-etc with elevated privs. That's just my views on this topic. :)
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 586
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 78 times
Been thanked: 89 times

Re: What is the replacement of kdesudo and gksu in Buster?

#18 Post by wizard10000 »

L_V wrote:Struggling to find a solution to use "sudo" to open a graphical application in KDE5 is a very bad idea.
'sudo' should only/exclusively be used to launch commands or ncurse applications (nano/aptitude etc) in a terminal, but never a graphical application.
You can use sudo -i or sudo -H to launch a graphical application.

As far as using gksu in KDE there's no technical reason not to - GTK+ and Qt are just graphics toolkits.
we see things not as they are, but as we are.
-- anais nin

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: What is the replacement of kdesudo and gksu in Buster?

#19 Post by L_V »

wizard10000 wrote:[You can use sudo -i or sudo -H to launch a graphical application.
Your view / I don't agree and will never do it (since Buster).
If you want to force the system, you can create a clean policykit rule instead of conflicting the system rules.
My rule is simply:
sudo => commands + ncurse apps in a terminal.
policykit for graphical apps.
Looks strange I do not have any issue with this rule.

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 586
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 78 times
Been thanked: 89 times

Re: What is the replacement of kdesudo and gksu in Buster?

#20 Post by wizard10000 »

L_V wrote:If you want to force the system, you can create a clean policykit rule instead of conflicting the system rules.
Or, since it's my system I can configure it however I choose :)

I think we should agree to disagree. One really great thing about Linux is choices :)
we see things not as they are, but as we are.
-- anais nin

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: What is the replacement of kdesudo and gksu in Buster?

#21 Post by L_V »

wizard10000 wrote:I think we should agree to disagree.
I fully agree.

CwF
Global Moderator
Global Moderator
Posts: 2669
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: What is the replacement of kdesudo and gksu in Buster?

#22 Post by CwF »

It seems the fancier the DE the worse the issue?

Here's my annotated list for xfce buster:

Code: Select all

user@buster:~$  ls /usr/share/polkit-1/actions
com.ubuntu.pkexec.gdebi-gtk.policy 		cl=pkexec gdebi-gtk
com.ubuntu.pkexec.synaptic.policy		cl=synaptic-pkexec
org.bleachbit.policy				        cl=pkexec bleachbit
org.dpkg.pkexec.update-alternatives.policy 
org.freedesktop.DisplayManager.AccountsService.policy
org.freedesktop.hostname1.policy
org.freedesktop.locale1.policy
org.freedesktop.login1.policy
org.freedesktop.pkexec.usbview.policy        cl=pkexec usbview
org.freedesktop.policykit.policy
org.freedesktop.RealtimeKit1.policy
org.freedesktop.resolve1.policy
org.freedesktop.systemd1.policy
org.freedesktop.timedate1.policy
org.freedesktop.UDisks2.policy
org.gnome.gparted.policy			        cl=gparted-pkexec
org.gtk.vfs.file-operations.policy
org.xfce.power.policy
org.xfce.session.policy
org.xfce.thunar.policy				        cl=pkexec thunar /path
org.xfce.xfce4-terminal.policy			cl=pkexec xfce4-terminal
org.x.xf86-video-intel.backlight-helper.policy
Perhaps I would use a root thunar to place /usr/share/pixmaps/gksu-root-terminal.png, I like it.

gdebi, usbview, and up until recently bleachbit as root may use older methods for the command line, expect that to change. The policy file still affects the authority.

spacefm may have an option soon.

In all of the above files 'auth_admin' can also be 'no'
for "I have the ******* keyboard" authority;

Code: Select all

      <allow_active>yes</allow_active>
And to make it easy, navigate to this directory with a root thunar, click to open any of the files in mousepad with inherited permissions, edit the allow_active to yes, and get on with your life.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: What is the replacement of kdesudo and gksu in Buster?

#23 Post by Head_on_a_Stick »

Leoncio wrote:How can that be used to run gparted, gsmartcontrol, synaptic, thunar and others?
Gparted already uses polkit in buster (and will run under Wayland) and synaptic will be fixed soon[1] — gnome-software works fine now and is better than synaptic anyway.

In respect of file managers I think you may be SOL. Isn't the future wonderful? :mrgreen:

Also:
Leoncio wrote:computers (and machines in general) must adapt to humans, not the other way round
I don't understand.
deadbang

Leoncio
Posts: 33
Joined: 2012-01-07 18:14

Re: What is the replacement of kdesudo and gksu in Buster?

#24 Post by Leoncio »

Head_on_a_Stick wrote: In respect of file managers I think you may be SOL. Isn't the future wonderful? :mrgreen:
In respect to Debian, if it continues like this, users will start to move to other distros. Isn't the future wonderful? :mrgreen:

Old-school Linux users and developers, that are elitist by nature, will really love it, for sure (no sarcasm here).

Time ago, I had Ubuntu and I moved to Debian because I was fed up with some things of Ubuntu. Till now I was really happy with the change; a smart move. Now, let's see how Debian evolves from now on, but I smell that the old-school developers, strongly elitists, are in control. Maybe it is time to find another distro (not Ubuntu, I had enough with it). Maybe I am not the only one. But let's see how it evolves.
Head_on_a_Stick wrote: Also:
Leoncio wrote:computers (and machines in general) must adapt to humans, not the other way round
I don't understand.
Ha ha ha!!! :D :D :D

User avatar
sunrat
Administrator
Administrator
Posts: 6458
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 472 times

Re: What is the replacement of kdesudo and gksu in Buster?

#25 Post by sunrat »

Every day there is a post where someone wants ${something} changed or else they will move to another distro. And every day the world's tiniest violin plays.

I've been using Debian for ~14 years. There have been many changes for security, visual, workflow, or sometimes unfathomable reasons. I sometimes lament the passing of old ways but there are always new ways which can be easily learnt.

The answer to the topic is the replacement of kdesudo and gksu is most commonly policykit but pkexec files have not been included for all software. Your mission, if you choose to accept it, is to learn to write pkexec rules for applications you need them for and share them with the world.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

CwF
Global Moderator
Global Moderator
Posts: 2669
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: What is the replacement of kdesudo and gksu in Buster?

#26 Post by CwF »

sunrat wrote: write pkexec rules for applications you need them for and share them with the world.
I tried, guess nobody was paying attention...

It's not a debian issue at all, so swapping distro's won't help. In this particular thread the culprit is kde. A DE does not a distro make.

Leoncio
Posts: 33
Joined: 2012-01-07 18:14

Re: What is the replacement of kdesudo and gksu in Buster?

#27 Post by Leoncio »

sunrat wrote: The answer to the topic is the replacement of kdesudo and gksu is most commonly policykit but pkexec files have not been included for all software. Your mission, if you choose to accept it, is to learn to write pkexec rules for applications you need them for and share them with the world.
Good point indeed!! :) But I have not time. The day has only 24 hours. By the way, does anybody know who was the idiot that made the days with only 24 hours? :mrgreen:

User avatar
sunrat
Administrator
Administrator
Posts: 6458
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 472 times

Re: What is the replacement of kdesudo and gksu in Buster?

#28 Post by sunrat »

CwF wrote:
sunrat wrote: write pkexec rules for applications you need them for and share them with the world.
I tried, guess nobody was paying attention...
I tried a couple too, one worked and another didn't. Which is one of the points I was making - I found a different way to accomplish the same task, different software IIRC maybe even CLI :o .
It's not a debian issue at all, so swapping distro's won't help. In this particular thread the culprit is kde. A DE does not a distro make.
policykit is not KDE specific. There have been posts about other DEs changing their authority protocols.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Leoncio
Posts: 33
Joined: 2012-01-07 18:14

Re: What is the replacement of kdesudo and gksu in Buster?

#29 Post by Leoncio »

It looks that running graphical programs with sudo poses a security hazard so, this workaround is not good, but IMO the worst of the worst is to rely on deprecated packages like kdesudo and gksu that are not maintained anymore. We have synaptic using kdesudo and who knows how many more are using gksu or kdesudo.

Here is a tiny script as a (bad) workaround to the problem:

Code: Select all

#!/bin/bash

export SUDO_ASKPASS=/usr/bin/ssh-askpass
sudo -A $1
I have named it xsudo.sh. But you can name it whatever you want, for example:
script_to_replace_kdesudo_because_Buster_was_released_without_a_replacement.sh :(
Short and easy-to-remember names like this one are the best ones, right? :wink:

After changing its ownership to root and giving it execution permission copy it to /usr/local/bin
Remove the kdesudo and gksu packages.
Make these symlinks:

Code: Select all

ln -s /usr/local/bin/xsudo.sh /usr/local/bin/kdesudo
ln -s /usr/local/bin/xsudo.sh /usr/local/bin/gksudo
ln -s /usr/local/bin/xsudo.sh /usr/local/bin/gksu
ln -s /usr/local/bin/xsudo.sh /usr/local/bin/xsudo
The last symlink is for convenience, or you could name the script xsudo in the first place.

Again: This is not good but using not maintained any more programs like kdesudo and gksu is worse IMO.

And again: a new STABLE version of Debian should NOT have been released having synaptic and who knows how many more programs relying on outdated and not maintained anymore programs like gksu and kdesudo. We users of the stable version accept the drawbacks of using a bit outdated programs in the Stable version because we expect a polished version of Debian without the small problems of Testing and Sid. :evil:

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: What is the replacement of kdesudo and gksu in Buster?

#30 Post by Deb-fan »

Not to come off as overly harsh but as an end-user, unless a very active developer or contributor has zero rightful say in what/when Debian does or releases. Agreed with this situation being an inconvenience though it's also reasonable that people be expected to learn and find work around's for whatever it is they wish open source software to do for them. Anyone would have to acknowledge all the efforts (for decades) Debian + others have contributed to the open source movement or revolution or whatever.

Yeah switching to another distro may in fact help you out in your situation. That being one whose maintainers have already addressed this issue to whichever extent. Already include polkit/policy files for you OR spend a little time and learn what you need to do, to get Debian gnu/Linux to do what you prefer it to do. Almost never had any problems launching graphical apps with the appropriate use of sudo and was always easy to sort it out with chown. If file ownership issues cropped up.(Even when was more newbish. Which was user error through ignorance at the time.)

Mentioned am planning on continued use of the gksu/do packages in Buster (or lxqt-sudo). Thanks Wizard10000 for confirming it'll work. I'm still using Stretch at the moment here. Personally will also continue using Xorg instead of Wayland for awhile. There's always a solution or more like MANY solutions when dealing with gnu/Linux. Am sure these changes aren't being implemented for no reason(s) too. This development is no exception.
Most powerful FREE tech-support tool on the planet * HERE. *

CwF
Global Moderator
Global Moderator
Posts: 2669
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: What is the replacement of kdesudo and gksu in Buster?

#31 Post by CwF »

sunrat wrote:policykit is not KDE specific. There have been posts about other DEs changing their authority protocols.
Backwards to my point. pkexec is fully working in my debian, so I do know it's not specific to any DE. I have no permission issues at all. If some file manager doesn't work, it's not debians fault. Thunar works fine, so the issue is with the file managers not yet compliant with polkit. So, in this case, kde is the issue. gksu has been gone for awhile now. spacefm still works fine with sudo.

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: What is the replacement of kdesudo and gksu in Buster?

#32 Post by Deb-fan »

Am bored so going to ramble some more on this. :)

End of the day believe personal users aren't the focus when it comes to the future of gnu/Linux and much other FOSS. Huge chunks of the upstream and major components are paid for by commercial interests. From the kernel to so much else, Wayland, audio etc etc etc. So since they have the skillset, the standing and the check book, needless to say they're going to push their agenda, with I'm guessing an emphasis on commercial, industrial, business applications rather than joe-smoe end user who gets to use all this kickbutt software for free. So whether that be as in this case trying to make the platform more secure, or the focus is stability or whatever else, think the relevant parties will continue to focus on commercial implications. Stuff like this is a walk in the park for any seasoned sys-admin. For that matter any desktop nixer willing to invest some effort. They'll either embrace it or employ whichever work-around suits their needs. Not that there aren't still plenty of volunteer contributors, nor that Debian doesn't care about the personal computing users anymore either. Am sure they do, as well as who knows how many open source projects dev'ed by kickbutt people too. Though still are going to be subject to major decisions made upstream. Just that it is, what it is and overall what we have to work with or around.

Mentioned (and it was confirmed by Wizard10000) no reason gksu won't continue working fine in Buster, not sure what issue you're having with lxqt-sudo either. Can't fathom why there'd be any problem, in particular if someone opts to continue using Xorg vs Wayland. Should be business as usual in such a case. Could be desktop dependent I guess, don't know, have always prefered windows managers anyway so haven't invested much effort in keeping up with Kde/Gnome developments. To me it's totally reasonable that end-users (particulary those which contribute nothing meaningful, other than their free use and enjoyment of the available software)be expected to learn and do something for ourselves. Rather than "I don't like this, change it, do it automagically for me." Yep, only 24hrs in a day and Google is open 24/7/365. Solutions are never far away in my experience.

I don't quite get it either, if someone with the creds wants to launch processes as root, with no "finer grained control", they can do it. If someone with the system credentials wants to nuke a node or an entire network, they can do it, shrugs. Somehow polkit with policy files is better. It's above my pay grade, I don't have a fraction of the skills or understanding of the FOSS big picture that the people behind such decisions do. So just have to find a setup that fits my preferences and get on with life. Which in my particular case will likely be lxqt-sudo (with a bash alias.) or some similar work around. This has been a pointless brainfart babbling moment about some of my views on FOSS.
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 586
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 78 times
Been thanked: 89 times

Re: What is the replacement of kdesudo and gksu in Buster?

#33 Post by wizard10000 »

I had an amusing thought - wonder how many people are running X under the root account?

The only display manager I know of that runs X as an unprivileged user is GDM, and is the reason I don't use a display manager :mrgreen:
we see things not as they are, but as we are.
-- anais nin

CwF
Global Moderator
Global Moderator
Posts: 2669
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: What is the replacement of kdesudo and gksu in Buster?

#34 Post by CwF »

wizard10000 wrote:wonder how many people are running X under the root account?
I can. I have not checked lately, but I did put complete root accounts on each of my 4 rolling images. The last time I check one was a basic amd64 image after upgraded to buster. There were a handful of changes and a few things no longer worked as were set up. I cleaned it up to be focused on only emergency use, but it is a full graphical logon using lightdm and xfce. I used to do all root stuff in that environment, but don't need to any more. As stated, I have root at the click of the trackball, no keyboard required.

Running everything in a vm, those OS's are completed before use so they rarely need any root access after that. I use root during maintainance of the images and run bleachbit as root for example within the image right before I compress it down into a backing file. On hypervisors I use all pkexec root things, especially thunar, a file manager btw... I click to open a root terminal frequently and never type sudo, su, su-, suplease shoot me...

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: What is the replacement of kdesudo and gksu in Buster?

#35 Post by Deb-fan »

LMAO Wizard, good point. Doesn't really matter to me in a personal computing environment, though a multi-user situation it likely would. Have two Debian installs, one with (lightdm), one without and using this approach on that OS.

Though thanks, now that you bring it up, may go ahead and scrub lightdm there too. Though am saving up my strength, as I've yet to migrate over to Buster and it's going to be a massive pita, setting up the netinstall(s.) Am putting it off for awhile.
Most powerful FREE tech-support tool on the planet * HERE. *

Post Reply