The officially official Devuan Forum!

You are not logged in.

#1 2023-02-11 17:49:29

hunter0one
Member
Registered: 2021-12-31
Posts: 68  

Polkit issues on Xfce (with Consolekit)

I'm having problems with authentication on Devuan Chimaera with Xfce. I recently replaced elogind with consolekit2 (provided by the consolekit package). Everything seems to work fine, although when logging out not all services that were started will quit. There is also a larger issue related to the authentication.

When trying to run programs like synaptic-pkexec, I get the following error:

polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ===
Error executing command as another user: Not authorized

This incident has been reported.

This is what /var/log/auth.log says:

Feb 11 11:46:01 B550M polkitd(authority=local): Registered Authentication Agent for unix-process:7893:242677 (system bus name :1.203 [pkexec /usr/sbin/synaptic], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Feb 11 11:46:03 B550M polkitd(authority=local): Operator of unix-process:7893:242677 FAILED to authenticate to gain authorization for action com.ubuntu.pkexec.synaptic for unix-process:7893:242677 [/bin/sh /usr/bin/synaptic-pkexec] (owned by unix-user:hunter)
Feb 11 11:46:03 B550M pkexec[7894]: hunter: Error executing command as another user: Not authorized [user=root] [TTY=/dev/pts/0] [CWD=/home/hunter] [COMMAND=/usr/sbin/synaptic]
Feb 11 11:46:03 B550M polkitd(authority=local): Unregistered Authentication Agent for unix-process:7893:242677 (system bus name :1.203, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)

I've tried with both mate-polkit and gnome-polkit with the same result.

Offline

#2 2023-02-11 19:13:38

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Polkit issues on Xfce (with Consolekit)

This suggests that consolekit's DBus API is different and requires that software be built to support that instead of elogind. Looks like antiX have their own version of synaptic and they use consolekit rather than elogind, which would seem to support this theory. Shame anticapitalista doesn't visit here any more, they would probably know about this.

Any particular reason why you've switched to consolekit?


Brianna Ghey — Rest In Power

Offline

#3 2023-02-11 19:34:11

andyprough
Member
Registered: 2019-10-19
Posts: 327  

Re: Polkit issues on Xfce (with Consolekit)

Did you try just simply 'sudo synaptic'? That's what I have to do from the terminal in dwm on antiX to get synaptic running. If I recall correctly, pkexec commands just spit out errors in that environment.

Offline

#4 2023-02-11 19:41:39

hunter0one
Member
Registered: 2021-12-31
Posts: 68  

Re: Polkit issues on Xfce (with Consolekit)

Head_on_a_Stick wrote:

This suggests that consolekit's DBus API is different and requires that software be built to support that instead of elogind.

Yes, I just figured this out so I restored my timeshift snapshot from before.

Head_on_a_Stick wrote:

Any particular reason why you've switched to consolekit?

Well, elogind is extracted from systemd. I don't see why consolekit needed to be replaced, as distros I've tried that still use it (such as PCLinuxOS) work just fine, and since it was still in Devuans repositories (its not in Debians) I wanted to see if it would work. It doesn't, unless you rebuild any components that use the elogind flag.

Offline

#5 2023-02-11 19:42:20

hunter0one
Member
Registered: 2021-12-31
Posts: 68  

Re: Polkit issues on Xfce (with Consolekit)

andyprough wrote:

Did you try just simply 'sudo synaptic'? That's what I have to do from the terminal in dwm on antiX to get synaptic running. If I recall correctly, pkexec commands just spit out errors in that environment.

Yes, this works. But this bypasses the point of polkit.

Offline

#6 2023-02-11 19:49:31

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Polkit issues on Xfce (with Consolekit)

andyprough wrote:

Did you try just simply 'sudo synaptic'? That's what I have to do from the terminal in dwm on antiX to get synaptic running

pkexec should work just fine in antiX as long as consolekit is running. You probably haven't installed and autostarted a graphical authentication agent. Try installing the mate-polkit package then add this to your autostart file (~/.xsession?) before the exec dwm line:

/usr/lib/x86_64-linux-gnu/polkit-mate/polkit-mate-authentication-agent-1 &
hunter0one wrote:

I don't see why consolekit needed to be replaced

The original consolekit was abandoned upstream several years ago. The new consolekit2 version is actively maintained though.


Brianna Ghey — Rest In Power

Offline

#7 2023-02-11 20:25:57

hunter0one
Member
Registered: 2021-12-31
Posts: 68  

Re: Polkit issues on Xfce (with Consolekit)

Head_on_a_Stick wrote:

The original consolekit was abandoned upstream several years ago. The new consolekit2 version is actively maintained though.

Yes, ConsoleKit2 is what I meant. Would be nice to see it make a comeback. :-)

Offline

Board footer