xss-lock NoSessionForPIU 和 XDG_SESSION_ID 为空

xss-lock NoSessionForPIU 和 XDG_SESSION_ID 为空

不久前(不幸的是,我没有立即调查),我的屏幕储物柜停止工作。

当我开始时,xss-lock我收到此错误:

Error getting current session: GDBus.Error:org.freedesktop.login1.NoSessionForPID: PID 7822 does not belong to any known session

并且XDG_SESSION_ID是未定义的(根据https://www.freedesktop.org/software/systemd/man/pam_systemd.html它应该被初始化)。

Loginctl 正确显示我的会话:

$ loginctl show-session 1
Id=1
User=1000
Name=alpipego
Timestamp=Tue 2020-02-18 07:47:21 CET
TimestampMonotonic=31087168
VTNr=1
Seat=seat0
TTY=tty1
Remote=no
Service=login
Scope=session-1.scope
Leader=912
Audit=1
Type=tty
Class=user
Active=yes
State=active
IdleHint=yes
IdleSinceHint=1582008441893113
IdleSinceHintMonotonic=30869591
LockedHint=no

$ loginctl session-status
1 - alpipego (1000)
           Since: Tue 2020-02-18 07:47:21 CET; 2h 3min ago
          Leader: 912 (login)
            Seat: seat0; vc1
             TTY: tty1
         Service: login; type tty; class user
           State: active
            Unit: session-1.scope
                  ├─ 912 login -- alpipego
                  ├─4666 -bash
                  ├─5586 /bin/bash /usr/bin/tdm
                  ├─5967 /bin/sh /usr/bin/startx
                  ├─5999 xinit /home/alpipego/.xinitrc -- /etc/X11/xinit/xserverrc :0 vt1 -keeptty >
                  ├─6000 /usr/lib/Xorg -nolisten tcp :0 vt1 -keeptty -auth /tmp/serverauth.WVoS7zx4>
                  └─7322 /usr/lib/gnome-session-binary

Feb 18 07:47:21 precision login[912]: LOGIN ON tty1 BY alpipego
Feb 18 07:47:21 precision systemd[1]: Started Session 1 of user alpipego.

$ export -p | grep XDG
export XDG_CURRENT_DESKTOP=GNOME
export XDG_MENU_PREFIX=gnome-
export XDG_RUNTIME_DIR=/run/user/1000
export XDG_SESSION_CLASS=user
export XDG_SESSION_TYPE=x11

然而,当我尝试锁定我的会话时,loginctl lock-session 1或者sudo loginctl lock-sessions什么也没有发生。我怀疑这与xss-lock找不到我的会话并且XDG_SESSION_ID未设置有关。

如果您能提供有关如何xss-lock在这里工作的线索,我将不胜感激。

相关内容