Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Mati20187 opened this issue Nov 17, 2019 · 13 comments
Open

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

Mati20187 opened this issue Nov 17, 2019 · 13 comments

Comments

@Mati20187
Copy link

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
Copy link

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

@ghost
Copy link

ghost commented Apr 16, 2020

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

@amitlevy21
Copy link

amitlevy21 commented Jun 2, 2020

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
Copy link

apoorv569 commented Jun 22, 2020

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
Copy link

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
Copy link

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
Copy link

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

@apoorv569
Copy link

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
Copy link

sergiomb2 commented Jul 15, 2020

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
Copy link

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
Copy link

apt install light-locker               
(...)
The following additional packages will be installed:
  light-locker-settings
(...)

@apoorv569
Copy link

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

RA-Kooi added a commit to RA-Kooi/light-locker that referenced this issue Oct 19, 2020
The previous developer left in a debug remnant breaking systemd support.
Fixes: the-cavalry#145, the-cavalry#141, possibly the-cavalry#151
@arthur-remy
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants