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.
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 
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.
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?
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
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:
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.
^ 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
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.
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 
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.
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
elogindand 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 😆
I’ve been following this thread from a distance for a few days. Is the conclusion that xfce should include elogind?
@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
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.
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):
@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. 
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.
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
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: 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, 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 
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: i’m definitely sympathetic to where you’re coming from, as i made a similar argument in #21862. 
xfce4, or whichever other DEs require it. (Whether pkg-committers think that’s a good idea is another issue.)
Also, yeah, CK2 is unmaintained (last commit to the repo was in December 2017).
- Install
elogindand enable its service (ln -s /etc/sv/elogind /var/service/).
if you do
Ctrl+Alt+F1I get a constant error log every second, I forget what with
welp, finally got a chance to test this, and it looks like whatever updates were done «fixed» the error
guess we’ll never know what was logged in tty1 cause it no longer shows
buuuuut the polkit error still shows up, and that’s with both dbus-elogind and polkit-elogind installed as well
it seems I have fixed my issue
what you want is dbus and elogind separately
what you don’t want is dbus-elogind as that’s broken and does nothing
polkit-elogind is not needed
when creating services, you specifically want dbus as a service, not elogind as dbus starts that
my issue was that dbus was not a service after installation
which is weird as I don’t believe it’s a service on my other installation
but this wouldn’t be my first time dealing with inconsistent results after having nemo fix itself without internet
(I’ll post a screenshot if anyone wants me to)
EDIT:
nvm, I just got my other installation hooked up
and I’m wrong, dbus is very much a service
but I don’t remember setting it up >.>
welp… there ya go, ya need dbus as a service with elogind installed to fix the issue
pbui
added a commit
to pbui/void-packages
that referenced
this issue
Jul 20, 2020
With the removal of ConsoleKit2, elogind is required for some session functionality as reported in void-linux#20245.
pbui
mentioned this issue
Jul 20, 2020
Piraty
pushed a commit
that referenced
this issue
Aug 15, 2020
With the removal of ConsoleKit2, elogind is required for some session functionality as reported in #20245.
I read the polkit and xfce wiki a couple of times and I still can’t figure out what the problem is.
It says that in xfce everything should work automagically, unfortunately that is not true in my case.
Under Settings Manager > Session and Statup > Application Autostart
PolicyKit Authentication Agent is checked to autostart.
I also tried xfce-polkit-git from aur and during install removed polkit-gnome because of conflict.
It worked great after installation but after reboot I get error dialog and it stops working again.
The error just says «error xfce policykit agent» and I clicked ok on the dialog.
The error did not appear when I unchecked /usr/lib/xfce-polkit/xfce-polkit in xfce autostart menu but I still didn’t username/password popup when starting gparted from menu or trying to mount hdd (w/ gvfs) within thunar.
I went back to polkit-gnome, still not working but no error popup on login.
In the past I haven’t had this issue and I don’t know why it started with this install of arch.
From searching everywhere I can’t find a solution. Maybe I need to configure something but I don’t know what.
systemctl status polkit.service
● polkit.service - Authorization Manager
Loaded: loaded (/usr/lib/systemd/system/polkit.service; static; vendor preset: disabled)
Active: active (running) since Fri 2015-08-21 10:11:58 PDT; 1 day 20h ago
Docs: man:polkit(8)
Main PID: 511
CGroup: /system.slice/polkit.service
└─511 n/a
Aug 21 10:50:33 corn polkitd[511]: Registered Authentication Agent for unix-process:3121:244360 (system bus name :1.27 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.utf8)
Aug 21 10:50:33 corn polkitd[511]: Unregistered Authentication Agent for unix-process:3121:244360 (system bus name :1.27, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.utf8) (disconnected from bus)
Aug 21 10:50:37 corn polkitd[511]: Registered Authentication Agent for unix-process:3187:244729 (system bus name :1.28 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.utf8)
Aug 21 10:50:37 corn polkitd[511]: Unregistered Authentication Agent for unix-process:3187:244729 (system bus name :1.28, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.utf8) (disconnected from bus)
Aug 21 10:50:44 corn polkitd[511]: Registered Authentication Agent for unix-process:2224:142928 (system bus name :1.29 [pkexec --user root gparted], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Aug 21 10:50:47 corn polkitd[511]: Unregistered Authentication Agent for unix-process:2224:142928 (system bus name :1.29, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Aug 21 10:50:47 corn polkitd[511]: Operator of unix-process:2224:142928 FAILED to authenticate to gain authorization for action org.archlinux.pkexec.gparted for unix-process:2224:142928 [bash] (owned by unix-user:b)
Aug 21 10:50:57 corn polkitd[511]: Registered Authentication Agent for unix-process:2224:142928 (system bus name :1.30 [pkexec --user root gparted], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Aug 21 10:50:58 corn polkitd[511]: Unregistered Authentication Agent for unix-process:2224:142928 (system bus name :1.30, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Aug 21 10:50:58 corn polkitd[511]: Operator of unix-process:2224:142928 FAILED to authenticate to gain authorization for action org.archlinux.pkexec.gparted for unix-process:2224:142928 [bash] (owned by unix-user:b)
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
(polkit-gnome-authentication-agent-1:7121): polkit-gnome-1-WARNING **: Unable to determine the session we are in: No session for pid 7121
gparted_polkit
Error executing command as another user: No authentication agent found.
Last edited by rehono (2015-09-06 21:28:54)
Обновил/выложил сборку xfce-sysv по просьбе одного человека:
http://nightly.altlinux.org/p8/beta/basealt-p8-xfce-sysv-20160812-x86_64.iso
http://nightly.altlinux.org/p8/beta/basealt-p8-xfce-sysv-20160812-i586.isoУ меня при запуске жалуется на что-то про polkit agent, имейте в виду. Ну и #31501 всё так же пока на месте.
Ошибка в Сизифе и p8/branch найдена?
Положил i586 на флешку. Посмотрел лайвом.
Ошибка одна и та же, что в сизифном, что в этом на базе p8:
— При подключении к usb-порту устройств подключаемых в другое место (терминология udisks2), устройства в thunar не обнаруживаются, хотя ‘fdisk -l’ их видит.
— В вызванном из Xfce4-меню окне xfce4-sesson-logout все опции кроме опции Выйти, заблокированы и неактивны, — затенены.
Т.е. как минимум в этих двух случаях не отрабатываются рулезы 60-* polkit:
# ls /etc/polkit-1/rules.d/
50-default.rules 60-sysvinit-mount.rules 60-xfsm-shutdown-helper.rules
60-sysvinit-console-kit.rules 60-sysvinit-nm.rules
Смотрел долго. До отупения.
И.., не увидел в загруженном лайве процесса:
$ ps -eo pid,user,s,cmd|grep polkit|grep -v grep
1911 polkitd S /usr/libexec/polkit-1/polkitd --no-debug
Т.е. демон не поднялся.
Подозреваю что именно из-за этого опции которые разрешаются рулезами и заблокированы:
man polkitd
DESCRIPTION
polkitd provides the org.freedesktop.PolicyKit1 D-Bus service on the system message
bus. Users or administrators should never need to start this daemon as it will be
automatically started by dbus-daemon(1) or systemd(1) whenever an application calls
into the service.
polkitd must be started with superuser privileges but drops privileges early by
switching to the unprivileged polkitd system user.
See the polkit(8) man page for more information.
man polkit
AUTHORIZATION RULES
polkitd reads .rules files from the /etc/polkit-1/rules.d and
/usr/share/polkit-1/rules.d directories by sorting the files in lexical order based on
the basename on each file (if there's a tie, files in /etc are processed before files
in /usr). For example, for the following four files, the order is
Т.е. нет демона polkitd в процессах — нет и рулезов.
+-------------------+
| Authentication |
| Agent |
+-------------------+
| libpolkit-agent-1 |
+-------------------+
^ +---------+
| | Subject |
+--------------+ +---------+
| ^
| |
User Session | |
=======================|========================|=============
System Context | |
| |
| +---+
V |
/------------ |
| System Bus | |
------------/ |
^ ^ V
| | +---------------------+
+--------------+ | | Mechanism |
| | +---------------------+
V +----> | libpolkit-gobject-1 |
+------------------+ +---------------------+
| polkitd(8) |
+------------------+
| org.freedesktop. |
| PolicyKit1 |<---------+
+------------------+ |
^ |
| +--------------------------------------+
| | /usr/share/polkit-1/actions/*.policy |
| +--------------------------------------+
|
+--------------------------------------+
| /etc/polkit-1/rules.d/*.rules |
| /usr/share/polkit-1/rules.d/*.rules |
+--------------------------------------+
Похоже что пересекается с этим багом:
Ошибка 32364 — апгрейд, xfce4-sesson-logout, жуткие тормоза и слом опций
https://bugzilla.altlinux.org/show_bug.cgi?id=32364
Дополнил.
Упс-с…
dbus-демон не смог поднять демон polkitd:
# grep 'Aug 14 01' /run/media/user/alt-live-storage/var/log/auth/messages
Aug 14 01:04:23 localhost dbus[9306]: [system] Failed to activate service 'org.freedesktop.PolicyKit1': timed out
Aug 14 01:04:48 localhost dbus[9306]: [system] Failed to activate service 'org.freedesktop.PolicyKit1': timed out
Aug 14 01:05:13 localhost dbus[9306]: [system] Failed to activate service 'org.freedesktop.UPower': timed out
# mount /dev/sdb1 /mnt/disk1 -o loop
mount: /dev/loop0 is write-protected, mounting read-only
# mount /mnt/disk1/live /mnt/disk2/ -o loop
# cat /mnt/disk2/etc/altlinux-release
ALT Linux starter kit (Hypericum)
# grep '^rpm' /mnt/disk2/etc/apt/sources.list.d/alt.list
rpm [p8] http://ftp.altlinux.org/pub/distributions/ALTLinux p8/branch/i586 classic
rpm [p8] http://ftp.altlinux.org/pub/distributions/ALTLinux p8/branch/noarch classic
classic
# find /mnt/disk2/usr/ -name "*org.freedesktop.PolicyKit1*"
/mnt/disk2/usr/share/dbus-1/system-services/org.freedesktop.PolicyKit1.service
# cat /mnt/disk2/usr/share/dbus-1/system-services/org.freedesktop.PolicyKit1.service
[D-BUS Service]
Name=org.freedesktop.PolicyKit1
Exec=/usr/libexec/polkit-1/polkitd --no-debug
User=root
SystemdService=polkit.service
# groups
root bin daemon sys adm disk wheel proc


