You are not logged in.
pkexe does not recognize my password, but sudo does.
I started using Linux in '07 and sudo was the thing.
Learning when to and when not to use it was the thing but wouldn't that also apply to pkexe?
I fail to see how it was not dangerous then but is now.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Sudo was always deprecated for launching graphic apps. There used to be a command 'gksudo' to use instead, but that's since passed away.
Pkexec is trickier, and won't just launch any app you give it - there has to be some config set up declaring that it's OK for that particular graphics app to do what you're asking as root. Apps usually install that themselves, though BL adds a bit for our "generic text editor" so whatever editor you choose will be able to open files as root. More and more, graphics apps are going to root just for the part of their work that actually needs it, not for the whole window. Examples are gdebi or galternatives - you can open them without pkexec but when it comes to actually doing some system work they will pop up a password window to get the root permission. OTOH there's no way to run just part of eg gparted as root - it needs root permissions for the whole thing. So it's a bit messy.
It's not so much that things are more dangerous now (though that might even be true for all I know) as that people are finding safer ways to do things.
Last edited by johnraff (2024-11-23 04:19:35)
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline