Bug#842378: Xfce needs a policykit authentication agent

2017-07-11 Thread Hartmut Buhrmester
The virtual package, which is provided by all policykit authentication 
agents, is now "polkit-1-auth-agent":


hb1@debian:~$ aptitude show polkit-1-auth-agent
No candidate version found for polkit-1-auth-agent
Package: polkit-1-auth-agent
State: not a real package
Provided by: gnome-flashback (3.22.0-3), gnome-shell (3.22.3-3),
 lxpolkit (0.5.3-2), lxqt-policykit (0.11.1-1),
 mate-polkit (1.16.0-2), policykit-1-gnome (0.105-6),
 polkit-kde-agent-1 (4:5.8.4-1)


A new dependency for Thunar could then be:

thunar recommends lxpolkit|polkit-1-auth-agent

But since the XDG autostart file for lxpolkit is effectively disabled by 
adding "Hidden=true", thunar would have to provide an own autostart 
file. It could be defined as /etc/xdg/autostart/xfpolkit.desktop with 
the contents:


[Desktop Entry]
Type=Application
Name=LXPolKit for XFCE
Comment=Policykit Authentication Agent
Exec=lxpolkit
TryExec=lxpolkit
Icon=gtk-dialog-authentication
OnlyShowIn=XFCE;


Or, for the canonical solution, you could add the recommendation:

thunar recommends policykit-1-gnome|polkit-1-auth-agent

The file /etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop 
is already configured for XFCE (but surprisingly not for GNOME):


OnlyShowIn=XFCE;Unity;X-Cinnamon;


I would add this dependency to Thunar, because the package thunar 
already recommends gvfs, and that uses policykit for authorization.


--
Regards,
Hartmut Buhrmester



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

2017-07-09 Thread Yves-Alexis Perez
On Sun, 2017-07-09 at 00:07 +0200, Hartmut Buhrmester wrote:
> 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.

Considering Xfce is slowly beeing ported to GTK3, it doesn't really matter
actually.

Regards,
-- 
Yves-Alexis

signature.asc
Description: This is a digitally signed message part


Bug#842378: Xfce needs a policykit authentication agent

2017-07-08 Thread Hartmut Buhrmester

I think, in Debian 8 Jessie it worked like this:

gvfs always depends on gvfs-daemons.

gvfs-daemons recommends policykit-1-gnome, which was also a virtual 
package, provided by lxsession and mate-polkit.


https://packages.debian.org/jessie/gvfs-daemons


This dependency is lost in Debian 9 Stretch:

https://packages.debian.org/stretch/gvfs-daemons


But I don't think, that this recommendation should be restored. lxpolkit 
would be a much better solution for Xfce, if it could be launched 
automatically.


Regards,
Hartmut Buhrmester



Bug#842378: Xfce needs a policykit authentication agent

2017-07-08 Thread Hartmut Buhrmester
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