void-packages icon indicating copy to clipboard operation
void-packages copied to clipboard

XFCE PolicyKit Agent error

Open Tcll opened this issue 6 years ago • 25 comments

Screenshot_2020-03-20_11-36-22

I know this is getting a bit old now, but sudo xbps-install -Su elogind dbus-elogind polkit-elogind does not fix the issue after a successful installation.

I can't even mount flash drives with nemo or xfce4-places-plugin, as if elogind was never installed.

I installed Void Linux as of yesterday with the void-live-i686-20191109-xfce.iso network install immediately installing xorg, xfce4, and lxdm on first boot. so everything's minimal and up to date

I've run this same installation a few months ago and everything worked fine, so whatever broke was recent.

Tcll avatar Mar 20 '20 15:03 Tcll

I have not followed any recent saga on this, just this post, but did a fresh install of XFCE yesterday and could not duplicate the problem. It should not matter I think, but I installed elogind, dbus-x11, polkit, instead of the packages you referenced. Elogind should work whether you activate the runit service or not. Polkitd and dbus (x11) services should be activated. Sorry it this repeats previous info.

furryfixer avatar Mar 31 '20 12:03 furryfixer

hopefully my issue caused an unnotified fix (I've been waiting for a response on the matter) I'll try again when I'm able to test, as I'm currently using the machine I tested with for other things atm. (the machine I'm installing to can't boot USB drives, and I'm having an issue burning CDs with my primary as they can't be read)

and regarding that elogind bit, I actually tried running elogind as a runit service and was greeted with repeating errors in the tty... I found out it doesn't work as a runit service, but as a dbus service, and that's the issue I'm reporting here.

and yeah dbus-elogind force-installs dbus found that out when going through some reddit issues other people were having: https://www.reddit.com/r/voidlinux/comments/cm7pt1/exercise_caution_ongoing_issues_with_polkit/

I don't have ConsoleKit2, so I didn't worry about that option hopefully the issue is fixed now :)

Tcll avatar Mar 31 '20 16:03 Tcll

I can replicate it over here, I didn't do anything special: installation was done using void-live-x86_64-musl-20191109-xfce.iso, local install, single partition with swap. After rebooting to the system that message appeared, I thought "meh, probably something to do with older packages, let me update first", but the same thing appears with an up to date system and searching around led me here.

Wouldn't this warrant new installation media to be created with sane defaults? As it stands users that choose any of the Xfce images are greeted with that message and have a faulty system upon booting.

If that PolicyKit agent is no longer needed or the login manager is to be replaced, new users would appreciate not having to deal with it.

KaoDome avatar Jun 28 '20 19:06 KaoDome

Conditionally, I would have to say YES if the iso now always leads to this error, but I have not installed with it. I did see that error when the transition to elogind from consolekit2 happened, but not recently. You should have polkit, elogind, dbus(-x11), and yes, you should still have xfce-polkit-agent. Does the notification pop-up immediately after starting xfce, or just when using thunar or other file manager and mounting drives?

furryfixer avatar Jun 28 '20 22:06 furryfixer

I still haven't been able to test as of recent, but if it's the same as when I last tested, elogind doesn't do anything like it used to

if you previously installed elogind and updated, it should still work, but if installing anew, it doesn't work at all

Tcll avatar Jun 29 '20 00:06 Tcll

It appears right when you get to the desktop @furryfixer, i.e. if you have a graphical login manager you don't see it until you log in, but it can also be seen just by booting the live media. I recorded it in virtual because it's easier to share it here, but I'm seeing the same behavior in the machine:

Void, live boot

For the machine I resorted to installing a base system with the minimal image and build from there. I'm using lightdm with both dbus and elogind services installed and enabled. polkit is installed, but I didn't need to install the Xfce agent. Mounting or rebooting for example work fine.

KaoDome avatar Jun 29 '20 15:06 KaoDome

^ same with me on the i386 machine I last tested with and yes that's with elogind installed

if you updated packages back when elogind actually worked, then it would still continue to work I have another installation with exactly this on another i386 machine that works just fine after updates. but any new installations don't work

Tcll avatar Jun 29 '20 16:06 Tcll

So the iso should definitely be updated. It is interesting to realize how seldom a polkit agent comes into play in XFCE. However we need to have the pokit agent working correctly instead of not having one installed. At the risk of being slightly off-topic, at some point a polkit agent will likely be needed for XFCE or any of the common graphical DEs. Arch uses polkit-gnome instead for this I believe. Any polkit action which has authorization set to "auth_admin" will fail without an agent. The obvious example is Gparted.

furryfixer avatar Jun 30 '20 00:06 furryfixer

The obvious example is Gparted.

or mounting drives with nemo (and likely other FMs) or the Places panel plugin flash drives are a nightmare without elogind ;)

Tcll avatar Jun 30 '20 00:06 Tcll

Any polkit action which has authorization set to "auth_admin" will fail without an agent. The obvious example is Gparted.

Indeed! I just checked, installed GParted and unless there was a polkit agent installed and running I wasn't able to run it as an unprivileged user through the menu.

xfce-polkit worked just fine however... It was the only change I performed besides installing GParted. After a reboot (for some reason it didn't like just logging out) I could launch GParted as expected. Maybe the only thing missing in the live environment and installations from it is elogind? I'll make an installation from the Xfce live in a VM and see if I can pinpoint the issue.

Everything is working fine for me so far otherwise.

KaoDome avatar Jun 30 '20 00:06 KaoDome

Well, that was fast, it seems installing and enabling elogind is enough to have the system running as expected.

  • Local install from the live media.
  • Update the system (xbps-install -Syu) and reboot.
  • Install elogind and enable its service (ln -s /etc/sv/elogind /var/service/).
  • I just rebooted at this point, but done, no more polkit error when entering the desktop.

Checked GParted as well and the authentication dialog appears as expected. I wonder what I did or didn't do when I installed the system, but it wasn't that big of a deal installing things manually 😆

KaoDome avatar Jun 30 '20 00:06 KaoDome

I've been following this thread from a distance for a few days. Is the conclusion that xfce should include elogind?

ericonr avatar Jun 30 '20 01:06 ericonr

@KaoDome that actually doesn't work for me if you do Ctrl+Alt+F1 I get a constant error log every second, I forget what with

Tcll avatar Jun 30 '20 01:06 Tcll

Oops. I did not fully realize that the forementioned iso did not install it. Yes, going forward, I think nearly any Void installation would need elogind to be installed as the default. I question whether the runit elogind service needs to be activated in many cases though.

furryfixer avatar Jun 30 '20 01:06 furryfixer

And you're correct once again @furryfixer! The service seems not to be needed, as long as it is installed xfce-polkit acts as expected. @ericonr's conclusion is correct as well, at least that's what I see here.

What do you have in tty1 @Tcll? Mine don't show anything out of the ordinary, both the VM and machine running Void (elogind was still enabled at the time of the recording):

Void, polkit

KaoDome avatar Jun 30 '20 01:06 KaoDome

@furryfixer:

Yes, going forward, I think nearly any Void installation would need elogind to be installed as the default.

Well, i wouldn't go that far. :-) We actively support people not wanting to use elogind. (i don't use it myself - it's a large piece of software, with a large attack surface, that i simply don't need.) Merely having it installed, without the service enabled and running, is enough for it to get activated via D-BUS, which people might not want, and which might cause surprises, e.g. when they find that acpid and elogind are fighting over power management.

That said, it does seem to me that elogind should be included in flavours that apparently need it, such as the XFCE flavour.

flexibeast avatar Jun 30 '20 02:06 flexibeast

What do you have in tty1

unfortunately the machine I need to switch HDDs on to test the OS with has been in constant use for more than 26 days... I'll need either some free time or a new machine capable of running a VM before I'll be able to answer that. :(

EDIT: but to describe, every second it prints an error in tty1

Tcll avatar Jun 30 '20 02:06 Tcll

I'll have to do some reading on elogind, didn't know it had such a bad reputation.

It is part of systemd right? If memory still serves polkit existed before that, it may be possible to look at the code of xfce-polkit and find out what's up, but for now I have found no way to have it work without elogind.

Switching to other authentication agents seems to require more dependencies, at least the ones of GNOME and MATE require something else (they complain about being unable to determine the session they're in when run through a terminal).

@Tcll: I wonder what the problem could be on your end, but there's no hurry we'll see it at one point or another ;)

KaoDome avatar Jun 30 '20 02:06 KaoDome

@KaoDome: elogind is a standalone version of systemd-logind; it can be used to provide a logind for things which require one, like GNOME, without having to pull in the entire systemd system.

flexibeast avatar Jun 30 '20 02:06 flexibeast

Flexibeast, I understand. However for live-installs or most installation iso's, I think the default should be to include it, with rare exceptions. There are likely to be far fewer issues/complaints from the casual user, and the well-informed such as yourself :) can easily remove it.

KaoDome, elogind is a substitute for systemd/logind, which allows software developed with a logind dependency, to run without systemd itself. There are pros and cons, but the consolekit2 alternative is becoming more difficult to use all the time.

furryfixer avatar Jun 30 '20 02:06 furryfixer