[Pkg-xfce-devel] Bug#842378: Xfce needs a policykit authentication agent

Hartmut Buhrmester hbuhrmester-01 at t-online.de
Sat Jul 8 22:07:13 UTC 2017


I also noticed, that I can mount external USB drives in Thunar, but I 
cannot mount partitions on the internal hard disk drive, which require 
root privileges. Then I get the same error message: "Authentication failed".

The problem with Xfce and Thunar is, that they use gvfs and policykit, 
but they don't provide any policykit authentication agent. This agent is 
what displays the authorization dialog. It is usually left to the 
desktop environment to provide a policykit authentication agent, because 
it should match the user interface of the other applications:

LXDE uses lxpolkit (GTK2)
https://packages.debian.org/stretch/lxpolkit

LXQt uses lxqt-policykit (Qt5)
https://packages.debian.org/stretch/lxqt-policykit

MATE uses mate-polkit (GTK3)
https://packages.debian.org/stretch/mate-polkit

GNOME uses policykit-1-gnome (GTK3)
https://packages.debian.org/stretch/policykit-1-gnome

Xfce just doesn't have any policykit authentication agent. I searched 
for it, but I didn't find any.


Actually, lxpolkit works fine for Xfce, because it also uses GTK2 and is 
rather lightweight. It is not started automatically, because the file 
/etc/xdg/autostart/lxpolkit.desktop has the line "Hidden=true" in it. If 
it is launched manually, it will provide the authorization dialog for 
Thunar, and then I can mount any partitions, which requires root privileges.

Any other policykit authentication agent will also work, because they 
all use the same dbus interface.

So, to completely reveal this bug, you should do these steps:

1) Quit any other policykit agent, which may be running

2) Try to mount a partition in Thunar, which requires root privileges. 
This should fail at this point.

3) Launch lxpolkit

4) Try again to mount the partition. lxpolkit shows the dialog to enter 
the root password.


I'm sure, that in Debian 8 Jessie, somehow policykit-1-gnome would be 
installed. Then at least one working authentication agent would be 
available. But with its dependency on GTK3, it was not the best solution 
for lightweight desktop environments.

Regards,
Hartmut Buhrmester



More information about the Pkg-xfce-devel mailing list