! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Support for light-locker's settings
Status:
RESOLVED: FIXED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Simon Steinbeiss editbugs 2015-01-30 13:08:24 CET
It would be nice to support light-locker's settings by default in xfce4-power-manager. There already is a downstream patch in Xubuntu that does runtime-detection of light-locker and in case it is detected, a "Security" tab is shown that shows locking-settings and allows the user to modify it. Furthermore, it moves the "lock on suspend" option from the "System" tab over, in order to have all related options in one place.

Note: This can only work with light-locker >= 1.5.1 (the gsettings backend was added in that release).

This could also be a first step to more properly support locking features/settings for other screenlockers too and to try to deprecate xflock4 for those who use xfpm.
Comment 1 Sean Davis editbugs 2015-01-30 13:18:07 CET
Created attachment 5885 
Light Locker Integration

Attached is the patch that we are using in Xubuntu for the 15.04 release. It uses runtime detection to determine if light-locker is installed and configured to use the GSettings backend. The patch behavior is outlined below.

* light-locker not installed, light-locker installed but not using GSettings, light-locker GSettings is installed, but the light-locker binary cannot be found (user configured light-locker then uninstalled):
 - Functions exactly as it does without the patch. Looks entirely the same, works entirely the same.

* light-locker 1.5.1 is installed, configured to use GSettings, and the GSettings schema is found (system-wide or for the running user)
 - A new "Security" tab is added to Xfce Power Manager Settings
 - The existing "Lock screen when system is going for sleep" is relocated to the Security tab, under the other light-locker configuration.

Existing Light Locker configuration:
 - Automatically lock the session (Never, when screensaver starts, when screensaver ends (late locking)
 - Delay locking of screensaver for X seconds
 - Lock screen when system is going for sleep

Configuring Light Locker in this method allows proper settings synchronization between the two applications and eliminates some of the hackiness used in Light Locker Settings to accomplish the same effect, and streamlines similar tools into a single location.
Comment 2 Eric Koegel editbugs 2015-02-03 17:04:12 CET
I'm +1, there's a couple minor warnings that would be nice to clean up. Hopefully I/we can look into xscreensaver support next...
Comment 3 Harald Judt editbugs 2015-02-03 22:48:08 CET
This get's my +1 too if it doesn't break existing functionality. Sorry, don't have time for a review nor testing at the moment.
Comment 4 Eric Koegel editbugs 2015-02-07 15:16:04 CET
Pushed to master in:
commit 10076da7caa49320b3e907d319a9f27ee6702969
Author: Sean Davis <bluesabre@ubuntu.com>
Date:   Sat Feb 7 11:49:31 2015 +0300

    Light Locker Integration (Bug #11488)
    
    Integrate Light Locker configuration into Xfce Power Manager. This
    allows proper settings synchronization between the two applications
    and eliminates some of the hackiness used in Light Locker Settings
    to accomplish the same effect, and streamlines similar tools into
    a single location. This depends on light-locker 1.5.1 configured
    with the GSettings backend.

http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=10076da7caa49320b3e907d319a9f27ee6702969

I'll get to the warnings when I get a chance (unless someone beats me to it).
Comment 5 Rob McCathie 2015-02-10 10:31:52 CET
Thanks from Manjaro devs and community. :)

https://forum.manjaro.org/index.php?topic=20342.msg183091#msg183091
Comment 6 Yves-Alexis Perez editbugs 2015-04-23 22:57:25 CEST
It actually doesn't work here. The call to g_settings_schema_source_lookup() returns NULL. Changing the recursive argument to true makes it behaves correctly.

Looking at https://developer.gnome.org/gio/stable/gio-GSettingsSchema-GSettingsSchemaSource.html#g-settings-schema-source-get-default it seems that doing recursive queries might be a good idea anyway.
Comment 7 Simon Steinbeiss editbugs 2015-04-24 01:00:54 CEST
Thanks for catching that, since it was simple enough I just pushed it to the 4.12 branch, so it'll be part of 1.4.5:
http://git.xfce.org/xfce/xfce4-power-manager/commit/?h=xfce-4.12&id=d058daf755f2ea28e6405975f3c7e7957d9d4df6

..and 1.5.0:
http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=c5acaa8649c8f5eaca14fd7e507b286d5ec68d82

Bug #11488

Reported by:
Simon Steinbeiss
Reported on: 2015-01-30
Last modified on: 2015-04-24

People

Assignee:
Eric Koegel
CC List:
8 users

Version

Attachments

Light Locker Integration (25.21 KB, patch)
2015-01-30 13:18 CET , Sean Davis
no flags

Additional information