the-cavalry / light-locker

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

light-locker-command --lock doesn't work #151

Open Mati20187 opened 5 years ago

Mati20187 commented 5 years ago

I'll keep it short. When I type in "light-locker-command --lock", I get ** Message: 20:38:09.752: Received error message from the locker: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ScreenSaver was not provided by any .service files I have no idea what to do with it.

enzingerm commented 5 years ago

I have exactly the same issue :( Interestingly, dm-tool lock works regardless.

ghost commented 4 years ago

Same issue here. dm-tool lock works, but is artificial...

amitlevy21 commented 4 years ago

I had the same issue with using i3. You must run light-locker before been able to use light-locker-command --lock This is what I added to my i3 config if anyone encounter this in the future: exec_always --no-startup-id /usr/bin/light-locker

apoorv569 commented 4 years ago

I had the same issue with using i3. You must run light-locker before been able to use light-locker-command --lock This is what I added to my i3 config if anyone encounter this in the future: exec_always --no-startup-id /usr/bin/light-locker

i have this same problem, im using xmonad. putting light-locker in the autostart section works. it locks the screen but it doesn't take to the lightm the monitor turns off i have to move mouse or press a key to wake it up. i want i to go to lightdm and not sleep. how can i do that?

amitlevy21 commented 4 years ago

I had the same issue with using i3. You must run light-locker before been able to use light-locker-command --lock This is what I added to my i3 config if anyone encounter this in the future: exec_always --no-startup-id /usr/bin/light-locker

i have this same problem, im using xmonad. putting light-locker in the autostart section works. it locks the screen but it doesn't take to the lightm the monitor turns off i have to move mouse or press a key to wake it up. i want i to go to lightdm and not sleep. how can i do that?

The issue might be in /etc/lightdm/lightdm.conf. try the following: http://rogeriodossantos.github.io/MainPage/Linux_-_Disable_Sleep/ https://unix.stackexchange.com/questions/530531/prevent-lightdm-from-turning-off-screen-when-locking-session https://askubuntu.com/questions/942366/how-to-disable-sleep-suspend-at-login-screen

apoorv569 commented 4 years ago

I had the same issue with using i3. You must run light-locker before been able to use light-locker-command --lock This is what I added to my i3 config if anyone encounter this in the future: exec_always --no-startup-id /usr/bin/light-locker

i have this same problem, im using xmonad. putting light-locker in the autostart section works. it locks the screen but it doesn't take to the lightm the monitor turns off i have to move mouse or press a key to wake it up. i want i to go to lightdm and not sleep. how can i do that?

The issue might be in /etc/lightdm/lightdm.conf. try the following: http://rogeriodossantos.github.io/MainPage/Linux_-_Disable_Sleep/ https://unix.stackexchange.com/questions/530531/prevent-lightdm-from-turning-off-screen-when-locking-session https://askubuntu.com/questions/942366/how-to-disable-sleep-suspend-at-login-screen

according to this link - http://rogeriodossantos.github.io/MainPage/Linux_-_Disable_Sleep/

i need to add this to /etc/lightdm/lightdm.conf to the [SeatDefaults] section

 # don't sleep the screen
 xserver-command=X -s 0 dpms

but there no [SeatDefaults] section in my config, there is however a [Seat:*] section where we specify which greeter we want to use. i added the above lines in this section verbatim, and after reboot lightdm wont show im stuck on systemd screen. i had to go to tty2 to comment that line and reboot again to login.

amitlevy21 commented 4 years ago

Sorry, no clue. Try to see if it reproduces with i3 and if it doesn't try to ask in xmonad repo

apoorv569 commented 4 years ago

Sorry, no clue. Try to see if it reproduces with i3 and if it doesn't try to ask in xmonad repo

i dont use i3, and i dont think this has anything to do with xmonad either.

sergiomb2 commented 4 years ago

I had the same issue with using i3. You must run light-locker before been able to use light-locker-command --lock This is what I added to my i3 config if anyone encounter this in the future: exec_always --no-startup-id /usr/bin/light-locker

and running light-locker-settings give me this error (still investigating).

light-locker-settings

(light-locker-settings.py:10794): Gtk-WARNING **: 18:06:34.602: Locale not supported by C library.
        Using the fallback 'C' locale.
/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 702, in <module>
    main = LightLockerSettings()
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 98, in __init__
    self.init_settings()
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 440, in init_settings
    settings = self.gsettings_get_settings()
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 276, in gsettings_get_settings
    settings['light-locker-enabled'] = self.get_light_locker_enabled()
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 499, in get_light_locker_enabled
    keyfile = self.get_light_locker_autostart()
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 384, in get_light_locker_autostart
    self.get_autostart('light-locker.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)
apoorv569 commented 4 years ago

I had the same issue with using i3. You must run light-locker before been able to use light-locker-command --lock This is what I added to my i3 config if anyone encounter this in the future: exec_always --no-startup-id /usr/bin/light-locker

and running light-locker-settings give me this error (still investigating).

light-locker-settings

(light-locker-settings.py:10794): Gtk-WARNING **: 18:06:34.602: Locale not supported by C library.
        Using the fallback 'C' locale.
/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 702, in <module>
    main = LightLockerSettings()
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 98, in __init__
    self.init_settings()
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 440, in init_settings
    settings = self.gsettings_get_settings()
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 276, in gsettings_get_settings
    settings['light-locker-enabled'] = self.get_light_locker_enabled()
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 499, in get_light_locker_enabled
    keyfile = self.get_light_locker_autostart()
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 384, in get_light_locker_autostart
    self.get_autostart('light-locker.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)

There is no such command on my system, when I run this command I get -

> light-locker-settings                                                                                             
zsh: command not found: light-locker-settings
sergiomb2 commented 4 years ago
apt install light-locker               
(...)
The following additional packages will be installed:
  light-locker-settings
(...)
apoorv569 commented 4 years ago
apt install light-locker               
(...)
The following additional packages will be installed:
  light-locker-settings
(...)

I'm on arch, I install with pacman -S light-locker I have 2 commands available, light-locker and light-locker-command

arthur-remy commented 2 years ago

I was facing the same issue. I eventually solved it by uninstalling xscreensaver package I had installed couple of days before. It's not a silver bullet but I hope it might help some people.