Polkit not working for Kate

Hi there,

i've noticed an issue with kate lately: i can't edit root-files anymore. Usually Kate would prompt the password on an attempted save (afaik thats done using polkit?), now i just get the message that i don't have the permissions.

The only thing i can remember changing between the last time i remember it working and the first time i remember it not working is removing systemd from passwd and group in /etc/nsswitch.conf due to an ongoing issue - but that shouldn't interfere with polkit, should it?

polkit,polkit-kde-agent,polkit-qt5,kauth is installed and from what i found that should be enough?

i've checked /etc/polkit-1/ and /usr/share/polkit-1 and noticed that the ./rules.d/ folder hat 750 permissions - changing it to 755 didn't help though.

I'm kind of lost on how to approach this - all search results are old ones from before kate supported polkit :confused:

I hope someone has a suggestion, thanks in advance :wink:

Maybe using the admin command

kate admin:/etc/hosts

KDE and maybe others are slowly removing the option of running x or wayland apps as root.

And reverting back to default, rebooting, does make Kate ask for password when changing/saving system files?

Can we know what issue is that?

That will end with an io-slave error as klauncher has no idea what admin means :slight_smile:

Also, since polkit is a systemd service, removing systemd from that file might be the clue. Works fine here on testing and unstable.

2 Likes

Nice to know - thank you.

1 Like

i guess it might be wise to rule that out, even if i doubt it - will report back shortly


is the issue

wise - rule out - doubt
You lost me there.
I disabled NetworkManager-wait-online.service long ago, is not actually needed.

oh man - it's really caused by that, would have never guessed that ^^
i didn't know the service was not needed - i'll give disabling it a try!
edit: even with wait-online.service disabled, the issue still persists - so it's either minutes of boot time or no Polkit in kate :expressionless:

Can i see the inxi -Nx ?
And since you are on KDE Plasma, do you use this general settings for network ?

image

I disable IPv6 and i restrict the MAC address. Still never seen this before (except a couple of old reports on redhat)

Network: Device-1: Intel Dual Band Wireless-AC 3168NGW [Stone Peak] driver: iwlwifi v: kernel port: e000 bus ID: 08:00.0
Device-2: Intel I211 Gigabit Network vendor: ASRock driver: igb v: 5.6.0-k port: d000 bus ID: 0a:00.0

yes i use this settings.
If i understand correctly, the nm-stuff is just a symptom, not the cause. ( see https://github.com/systemd/systemd/issues/15316 )
enabling systemd-userdbd.socket didn't help either.

I guess it is normal that dbus.service and dbus.socket are marked as "static" when systemctl list-unit-files? Edit: it is

edit2: Interestingly, after i installed dbus-broker and enabled it, the boot-issue is gone even with systemd back in /etc/nsswitch.conf, but the kate polkit-issue is still there?!
Can anyone confirm that kate/polkit is supposed to work with dbus-broker?

Forum kindly sponsored by