This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Pkexec and service menus on 20.04

Tags: None
(comma "," separated)
User avatar
Don B. Cilly
Registered Member
Posts
31
Karma
0
OS

Pkexec and service menus on 20.04

Sat May 23, 2020 3:16 am
I don't believe this has been addressed before - I've searched.

I have a few service menus that use pkexec. They work just fine on neon.

On Kubuntu 20.04, I used one. No pkexec pop-up.
I tried them all. No pkexec pop-up.
If I try pkexec <command> from konsole, it works.

So: the same exact service menus work on neon and not on K20 (they share the same /home).
I have groogled around extensively and found nothing.

Upon further testing, I tried it on K20.04 on the laptop. Practically virgin installation (never use it). They don't work.
I tried it on Kubuntu 18.04. They work just fine.
Now, has nobody really noticed that pkexec doesn't work with service menus on Kubuntu 20.04?
Or what's going on?

If anyone would like to try and hasn't got one handy that needs pkexec, here's a simple one to "touch" root-owned files.

Code: Select all
[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
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
Moved to the "Linux" subforum, as this is not specific to Dolphin or KDE as a whole. It should probably be addressed to the distribution anyway


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
Just to make sure: is the polkit package installed?


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
User avatar
Don B. Cilly
Registered Member
Posts
31
Karma
0
OS

Re: Pkexec and service menus on 20.04

Sat May 23, 2020 12:10 pm
I guess it is installed.
As I said, If I try pkexec <command> from konsole, it works.
It's just when I run it from a Dophin service menu that it does not. On Kubuntu 20.04. On neon 5.18 (18.04 base) and on K18.04, it does.

I would appreciate it if someone would try that (or any other service menu that needs elevated privileges) on K 20.04 and let me know if it works.
Even though it's unlikely that two separate and unrelated installations (my desktop and laptop) would do the same... I'd like to understand what is happening.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]