SUMMARY On Kubuntu 20.04, service menus requiring elevated privileges. No pkexec pop-up. If I try pkexec <command> from konsole, it works. In a Dolphin service menu, it does not. The same exact service menus work on neon 5.18 and and Kubuntu 18.04 and not on K20 STEPS TO REPRODUCE 1. Run a service menu that requires pkexec on Kubuntu 20.04 2. Run it on neon 5.18 or Kubuntu 18.04 3. OBSERVED RESULT They don't work on K20. No password pop-up. EXPECTED RESULT They should :·) SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: Kubuntu 20.04/5.18.5 (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION I'm on neon ATM, I guess Qt and FW version not relevant, Plasma is the same on both, one works, the other doesn't.
100% of people who have tried it (3 of 3 :·) confirm it. I tried it on TWO 20.04 machines.
> 1. Run a service menu that requires pkexec on Kubuntu 20.04 Could you please give an example?
Sure. Take this simple service menu. It touches a file that requires elevated privileges as in the case it is, say, owned by root. You run that on an 18.04-based system, it works. You run it on 20.04, it doesn't. The polkit window for the password does not come up. [Desktop Entry] Type=Service X-KDE-ServiceTypes=KonqPopupMenu/Plugin MimeType=all/all; #MimeType=all; Actions=stouch; Encoding=UTF-8 Icon=application-x-cd-image [Desktop Action stouch] Name=Sudo touch Icon=edit-redo Exec=pkexec touch %f; kdialog --title="Touch" --passivepopup="Touched";fi
Does it work if you run that command by hand in a terminal window?
Yes. As I say in the OP, >If I try pkexec <command> from konsole, it works. In a Dolphin service menu, it does not. Pkexec also works from bash scripts. Only with Dolphin service menus it fails - on K20. Please try.
Thanks!
On further testing: If I remove/comment-out the "; kdialog" bit, that is, if I only have the single "Exec=pkexec touch %f" command, it works on 20.04. Which is still buggy. I want the kdialog pop-up. It works on 18.04/neon. So the issue seems to be multiple commands. I tried "pkexec bash -c...", no luck.
> Exec=pkexec touch %f; kdialog --title="Touch" --passivepopup="Touched";fi That line is invalid. It has a trailing ;fi that means nothing
It means nothing. It works perfectly - on Neon/18.04. Removing the ;fi makes it work on 20.04 too. It was obviously a "leftover". And just as obviously, the fact that it *did* work on neon, made me overlook it. Sorry. Good job.