Summary: | Pkexec does not work with Dolphin service menus on 20.04 | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Don B. Cilly <donbcilly> |
Component: | general | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED DOWNSTREAM | ||
Severity: | normal | CC: | alexander.lohnau, kfm-devel, nate, sitter |
Priority: | NOR | Keywords: | regression |
Version: | 20.04.1 | ||
Target Milestone: | --- | ||
Platform: | Kubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Don B. Cilly
2020-05-24 19:56:43 UTC
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. |