[LightDM] systemd power support

Rex Dieter rdieter at fedoraproject.org
Mon Nov 12 08:41:30 PST 2012


On 11/12/2012 10:17 AM, Martin Briza wrote:
> Hello Robert,

>> ps the lightdm + systemd issue is being tracked in
>> https://bugs.launchpad.net/lightdm/+bug/930488 but there isn't any major
>> work in it.
>
> I know but I'm not sure I'm ready to write anything absolutely related
> to the issue before I've investigated the whole of it. But I have
> registered and will post a link to this discussion in the the thread.

I worked on a relatively easy part of adding support for power-related 
functions last weekend.

Attaching my work-in-progress.

lightdm.rules: rules for relatively-new polkit-106+ .  I install these 
to /usr/share/polkit-1/rules.d/ on my fedora 18 box.

lightdm-1.4.0-systemd_login1_power.patch : first attempt to add support 
for querying systemd dbus methods for shutdown/reboot first before 
falling back to consolekit

-- rex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lightdm-1.4.0-systemd_login1_power.patch
Type: text/x-patch
Size: 6876 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/lightdm/attachments/20121112/7a8fc974/attachment.bin>
-------------- next part --------------
polkit.addRule(function(action, subject) {
    if (subject.user == "lightdm") {
        polkit.log("action=" + action);
        polkit.log("subject=" + subject);
        if (action.id.indexOf("org.freedesktop.login1.") == 0) {
            return polkit.Result.YES;
        }
        if (action.id.indexOf("org.freedesktop.consolekit.system.") == 0) {
            return polkit.Result.YES;
        }
        if (action.id.indexOf("org.freedesktop.upower.") == 0) {
            return polkit.Result.YES;
        }
    }
});


More information about the LightDM mailing list