the-cavalry / light-locker

A simple session-locker for lightdm
GNU General Public License v2.0
224 stars 22 forks source link

light-locker does not save settings #99

Closed timrichardson closed 7 years ago

timrichardson commented 7 years ago

I have gnome 3.24 under ubuntu 17.04 I am using lightdm because gdm3 doesn't work with my Nvidia hardware. Gnome is not blanking my screen regardless of power saver settings so I want to use light-locker.

However, something is resetting my light-locker screen blank to "None". That is, I go to light-locker-settings, and choose 10 minutes for Blank Screen After. If I run this from the command prompt, I see a python error. None the less, if I exit the dialog and then start it again immediately, my setting is saved. However, if I open it a few minutes later, Blank Screen After is None. This happens all the time.

Below is the message I get when clicking Apply. Despite the message, the setting appears to save: if I exit and immediately restart, the setting is visible. After some time (< 5 minutes) it is back to None.

tim@raffles:~$ light-locker-settings
/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py:29: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk, GLib, Gio
Traceback (most recent call last):
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 176, in apply_cb
    self.apply_settings()
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 629, in apply_settings
    self.apply_screen_blank_settings(settings)
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 691, in apply_screen_blank_settings
    keyfile = self.get_screensaver_autostart()
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 400, in get_screensaver_autostart
    self.get_autostart('screensaver-settings.desktop', defaults)
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 358, in get_autostart
    GLib.KeyFileFlags.KEEP_TRANSLATIONS)
GLib.Error: g-key-file-error-quark: Valid key file could not be found in search dirs (2)
cavalier38 commented 7 years ago

light-locker-settings is a separate project: https://launchpad.net/light-locker-settings It was developed when light-locker didn't have gsettings backend. I think light-locker-settings used xfconf to store the settings. I'm not sure it was updated when light-locker started using gsettings.

timrichardson commented 7 years ago

Oh, thanks. Didn't expect that!