Polkitd + KDE Plasma on Kubuntu 20.04 - Possible to emulate local behaviour? #2306
Replies: 16 comments 17 replies
-
Hi @alexhorner
I can see where you're coming from, but as far as we can tell, this simply isn't possible. Depending on your distribution, you will need to set up ini-based pkla files (polkit <=0 0.105) or Javascript-based ones (polkit > 0.105). In both of these, actions can be wildcarded in order to increase their scope - this can make it easier to limit the number of files required. At the moment, that's the best I can give you, I'm afraid. |
Beta Was this translation helpful? Give feedback.
-
Hi @matt335672,
Ah that's a real shame. I thought it might be possible to find and copy and adapt the rules defined for the local display.
I had considered experimenting with a blanket wildcard, but as with any permissions system, it is indeed possible to give yourself too many permissions resulting in undefined or undesired consequences, which is something I am concerned about in doing this. I would imagine my only alternative is to try and find some way to find each permission for each broken element of the system and slowly build a list of corrections. Any advice would be much appreciated though I understand this is a tricky subject with caveats and oddities in all directions. Thanks! |
Beta Was this translation helpful? Give feedback.
-
You can use
|
Beta Was this translation helpful? Give feedback.
-
I don't think polkitd would affect a terminal based session would it? Just X11 forwarding, which I don't use anyway. I see what you mean by using |
Beta Was this translation helpful? Give feedback.
-
Getting the action ID can be the trickiest part of this, as different desktops present it in different ways. If you cancel a request operation this will generally get logged somewhere, like
|
Beta Was this translation helpful? Give feedback.
-
Awesome, thanks for the advice. I'll give this a try later and report back |
Beta Was this translation helpful? Give feedback.
-
Hi there, So my Kubuntu 20.04 install uses PKLA files. I feel like my understanding of this is getting better, and I think I am beginning to understand why you said
as there doesn't appear to be any INI option you can set when I have successfully used your debug command to view what I was looking for with regards to what gets triggered for these popups and the system tray controls. It does indeed state that I am not authorised to access these functions when coming in from a remote connection. When coming in from a local display, I am authorised with the message I feel like if the distro came with a newer PolkitD which supported the JavaScript based rules, I might be in with a chance of working out some rules which permit the same things remotely as are permitted locally. I have considered again doing the wildcard on literally everything to blanket permit me everything, however as I have said before I do not know the consequences of doing this, as there are a few things which are not authorised (related to backlight control for example) even when connected via a local display. I would have assumed this is because it is a desktop system without a backlight but I would say that knowledge is nothing to do with PolkitD therefore this is not the reason for not being authorised, and here stems the fear of unintended consequences if I were to do a blanket permit. It would be awesome if this issue could be kept open for now, for I am eager to post any solutions, workarounds and findings I may find, and it would also be nice to see someone else having success that they can post here too. For now I am no further along, however I do feel I have a better understanding of the complexities of PolkitD. |
Beta Was this translation helpful? Give feedback.
-
Hi @alexhorner As regards the Javascript, don't expect that in Ubuntu/Debian any time soon. Polkit 0.106 was released in June 2012. Debian continues to stick with the old style from 0.105. See this discussion for more info. The
Consequently, the
If you want to get a decent rule set to start with, you could maybe work on a local session for a bit with polkit logging enabled, and then parse the resulting log file to see what actions are implicitly authorized while you're in the session. I'll convert this issue to a discussion, as this is the best place for keeping things in the long-term. |
Beta Was this translation helpful? Give feedback.
-
I have essentially the same issue (RasPi with iPadPro as "console"). |
Beta Was this translation helpful? Give feedback.
-
So, just today, I have decided that writing a Python script for this task is out of my reasonable work ability, and have proceeded to install Debian 11 + KDE instead of Kubuntu 20.04. If someone wants to take that task on that would be cool, but to me it just seems like a lot of effort for a timewaster problem which shouldn't exist anyway. However, upon my installation and start of Debian 11 + KDE - Well what do you know, Polkit 0.105 here too. Same issues here too: I need to look further into whether this can be upgraded to 0.106, but I am not hopeful because all the rules will need to be rewritten. This basically, to my knowledge, knocks out both of the .deb/apt capable (for lack of a better definition of Debian/Ubuntu derivatives) distros that have KDE. I don't know if that makes KDE the support problem or what. At a bit of a loss with how to progress for now. Frustrated but searching will continue. |
Beta Was this translation helpful? Give feedback.
-
I think I can now basically confirm this to be a Debian scoped issue and not a KDE Plasma scoped issue. I installed another 2 installs of Debian 11, from scratch to make it as clean as possible, and one time I chose XRDP and the other I chose Cinnamon. Both of these DEs experienced the exact same popups for the exact same reasons, triggered by Polkit. |
Beta Was this translation helpful? Give feedback.
-
Edit: Okay it seems I am good at missing things! Bullseye seems to be using 0.105: https://packages.debian.org/source/bullseye/policykit-1 |
Beta Was this translation helpful? Give feedback.
-
Having the same issue with fresh-installed Debian Bookworm ( |
Beta Was this translation helpful? Give feedback.
-
This appears every time I use |
Beta Was this translation helpful? Give feedback.
-
It's the same issue. If you want your users to be able to do this, you can add a polkit rule to let them. If you don't want them to, don't add the rule, or add a rule forbidding them. We can't decide what the system management policy should be, as part of this product. |
Beta Was this translation helpful? Give feedback.
-
Anyone following this thread may be interested in this debugging aid I've put together for Polkit:- |
Beta Was this translation helpful? Give feedback.
-
Hello,
I bring another polkitd related issue I'm afraid. I have looked at #1773 and #1889 and skimmed through some others,
I have seen mentions of .conf files not working with polkitd anymore which is something I have tried without success, so that seems likely in my scenario too.
This issue is present with both XRDP and X2Go, both of which I wish to use but am struggling due to this issue.
#1773 seems to focus very much on fixing singular popup issues, however this isn't what I want to do. My machine is fully headless, and everything works perfectly when I connect a display, mouse and keyboard, but when using it headless I get varying quantities of authentication popups named
Authentication Required - PolicyKit1 KDE Agent
regarding network controls and at various other points on the system.The WiFi toggle and controls do not work, shutdown and restart do not work.
If at all possible, I would like to have XRDP (and X2Go, however understandably this is not for you to worry about) log into the system with the exact same policies applied as would be applied logging into a local display on the system. I do understand the security implications of doing such a thing, however seeing as this machine is intended to run fully headless I think this is an acceptable thing to do.
I understand this is probably not the most detailed issue, however I am really struggling to bring together the components of other issues here to get this to work as I intend, and the amount of information online is lacking with regards to actual fixes, just full of single popup removals and various workarounds for single scenarios, not something more generic. I am of course more than happy to provide any additional context requested.
Beta Was this translation helpful? Give feedback.
All reactions