使用 LightDM 锁定暂停

使用 LightDM 锁定暂停

我正在阅读 Arch Wiki,了解如何在挂起时启动屏幕锁定器,但从我的外观来看,我无法light-locker为 LightDM找到工作[email protected],如下所示:

[Unit]
Description=Screen Locker LightDM
Before=suspend.target

[Service]
User=kevin
Type=forking
Environment=DISPLAY=:0
ExecStart=-/usr/bin/light-locker

[Install]
WantedBy=suspend.target

之后我启用该服务:

# systemctl enable [email protected]

重新启动,但是当我暂停笔记本电脑并再次恢复时,它不起作用,状态[email protected]如下所示:

[email protected] - Screen Locker LightDM
   Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: disabled)
   Active: inactive (dead)

nov 17 12:08:37 arch-kevin light-locker[1321]: failed to commit changes to dconf: Error al lanzar («spawn») el comando «dbus-launch --autolaunch=6409fcf6b77741839c02aa4
nov 17 12:08:37 arch-kevin light-locker[1321]: failed to commit changes to dconf: Error al lanzar («spawn») el comando «dbus-launch --autolaunch=6409fcf6b77741839c02aa4
nov 17 12:08:37 arch-kevin light-locker[1321]: failed to commit changes to dconf: Error al lanzar («spawn») el comando «dbus-launch --autolaunch=6409fcf6b77741839c02aa4
nov 17 12:08:37 arch-kevin light-locker[1321]: failed to commit changes to dconf: Error al lanzar («spawn») el comando «dbus-launch --autolaunch=6409fcf6b77741839c02aa4
nov 17 12:08:37 arch-kevin light-locker[1321]: failed to commit changes to dconf: Error al lanzar («spawn») el comando «dbus-launch --autolaunch=6409fcf6b77741839c02aa4
nov 17 12:08:37 arch-kevin light-locker[1321]: failed to register with the message bus

PD:light-locker之前在终端尝试过,输入:

$ light-locker --debug

输出:

[gs_debug_init] gs-debug.c:106 (12:15:13):   Debugging enabled
[main] light-locker.c:126 (12:15:13):    initializing light-locker 1.6.0
[main] light-locker.c:128 (12:15:13):    lock after screensaver 5
[main] light-locker.c:129 (12:15:13):    late locking 0
[main] light-locker.c:130 (12:15:13):    lock on suspend 1
[init_session_id] gs-listener-dbus.c:1882 (12:15:13):    Got session-id: /org/freedesktop/login1/session/c2
[init_session_id] gs-listener-dbus.c:1887 (12:15:13):    Got sd-session-id: c2
[init_seat_path] gs-listener-dbus.c:1964 (12:15:13):     Got seat: /org/freedesktop/DisplayManager/Seat0
[gs_listener_x11_acquire] gs-listener-x11.c:172 (12:15:13):  ScreenSaver Registered
[listener_dbus_handle_system_message] gs-listener-dbus.c:1084 (12:15:13):    obj_path=/org/freedesktop/DBus interface=org.freedesktop.DBus method=NameAcquired destination=:1.34

从另一个终端或只是关闭盖子并恢复,它会向我显示 LightDM 显示屏,用于解锁我的会话

有什么解决方法可以使这项工作正常进行吗?

相关内容