Polkit as an optional dependency of xfce4-session
Ali Abdallah
aliov at xfce.org
Thu Jan 28 21:35:45 CET 2010
Hi all,
So as HAL is deprecated, in order to keep supporting high level
"shutdown" services such as consolekit and upower, we are in need to
polkit in order to check if the user is allowed actually to
suspend/hibernate the machine.
The old method that consists of sending a message which should not exist
to HAL and see if the raised error is "permission denied" or a "method
doesn't exist" doesn't work here since the polkit checks are done after
the message reaches upower.
So, or we use libpolkit as an optional dependency and we can any time
ask to see if the user is allowed to do specific actions without having
to care about its details and without having to maintain extra code, or
we can use dbus-glib to ask the polkitd about information that we need.
For the second solution, there is no problem about it, i already wrote
the necessary dbus-glib types and calls to do that, but i'm always
afraid about the possible API break of averything has a name that ends
with "kit".
But anyway, in the good part, i should be able to branch from master
(thanks jeromeg) and push the code by tomorrow, i need to do more
testing, also for people without upower, consolekit, HAL, they can just
use the configure switches to switch them off, so the session will not
even try to see if HAL, consolekit, upower are running and just be using
sudo saving some milliseconds :)
Cheers,
Ali
More information about the Xfce4-dev
mailing list