What’s up with polkit in Qt and KDE?

Jaroslav Řezník asked on #fedora-kde a few days ago if anyone was interested in taking over polkit-qt and polkit-kde-agent as he doesn’t have enough time to maintain them aside with his other duties and when I met him in the kitchen, we discussed the matter. He was very convincing with the reasons to take the package and made the ugly bugs seem really interesting so here I stand. 🙂

What I’m intending to do

Bug reports quite stacked in the tracker in the meantime so the plan how to deal with them in the following weeks is:

There’s a LOT of bug reports in the tracker for both components and it seems most of them were caused by the underlying libraries or misuse of the authentication agents as I wasn’t able to reproduce most of them. I’m requesting information from the reporters though to be sure and possibly work on solutions with them. Hopefully, Drs. Albert Spijkers will respond if Jawid Asefi and others died young or stopped attempting to hack him…  (https://bugs.kde.org/show_bug.cgi?id=316514)

Of course most of the reports are coming from software managers like Apper or Muon and looking into the reports, I’m afraid many bugs in polkit related packages were worked around in the invoking applications.

I already closed a few of them though, the ones confirmed to be fixed and the ones apparently caused by something else and fixed by now. However, it’s interesting how for every closed bug I receive an informative mail starting with “[Red Hat – Possible Forgery]” but the comments go through clear.

At the first glance it seems handling signals and cancellations may be done in a bit unlucky way in polkit-qt but I have to be sure before I’m making any chances to the code.


When I will have triaged most of the bugs, there will be time for some enhancements to the overall usability of the agent. Currently, there is a problem with the authentication dialog window appearing beneath the “parent” window (quotes because it’s technically not its parent) often causing the user to not notice he needs to enter a password to proceed and failing the authentication process.

Regarding this, Jaroslav spoke about moving the dialog into KRunner which would look very nice (maybe just my impression but I really like KRunner and think it should be used more). I’m leaving this for further discussion. And with that we can start right here, please tell me what you think about it in the comments!

Besides that, I think using the notifier area as KWallet is doing now would make the behavior nicely consistent with it as both components are quite closely related.

I also see there are some parts still unimplemented but planned, for example the “Remember authorization” checkbox or display of which application invoked the dialog. These are still planned and I’m going to implement them over time.

However, I won’t be doing anything about the KCM module for rule editing. I don’t even have rights for the repository and am not planning to obtain them. If you’re willing to take up the work and continue to maintain the project, you’re free and welcome to do so!


6 thoughts on “What’s up with polkit in Qt and KDE?

  1. Does the Redhat system tell you why it suspects the email to be a forgery?
    I am guessing you are using a @redhat.com address with Bugzilla

  2. Hi,
    I was one of the polkit-kde 0.9 devs, I gave up on maintaining it when polkit1 was release just after we had finally finished the 0.9 api 😛
    Anyway there is an important thing you must understand Apper or Muon or any application that calls polkit, doesn’t call the -kde tools directly, so there’s nothing we can workaround, Apper calls PackageKit which calls Polkit (system) which call Polkit-kde-agent (session), I see that the bugs might be glued with the caller application but if it’s fixed it’s not because we did something.
    About the dialog the fix is quite easy imo, I have already made the suggestion to delete the KDialog once closed and create a new one instead of reusing, this way KWin will see it as a new window and won’t prevent focus…

    Best for your workings on it 😀

  3. Thank you for the update on this and your dedication to this technology. It’s not an easy thing to work on I assume and I’m very glad you stepped up. Good luck and thank you for helping KDE!

  4. Hi guys,
    thank you for your kind answers 🙂
    Ben, I’m suspecting the Bugzilla for doing it, not our mailsystem. But no, there’s no information about that and after a few bugs, it stopped marking even the closed bugs and everything goes through smooth.
    Daniel, I’m completely aware of that but the applications are of course intended mainly for use in the KDE environment so most bugs and fixes for them are bonded. And by the workarounds I meant things like moving error handling out of polkit-{kde,qt} into the components using polkit. But that’s just my impression now, I’ll have to find out more about the whole process. Thanks for the suggestion about the dialog!

  5. Hello Martin,

    as much as I appreciate your intention to take over maintainership of a KDE component, it would be nice to at least notify the previous maintainers (which include me) of your intention, especially given I’m already working on a qt5 port together with other people. You can reach me at my mail address.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s