主要报错是:
(polkit-gnome-authentication-agent-1:1455): polkit-gnome-1-WARNING **: 10:07:49.311: Unable to determine the session we are in: No session for pid 1455
VNC的启动日志:
https://pastebin.com/dQN9H1nm
相关auth配置
~ > cat /etc/pam.d/system-auth
#%PAM-1.0
auth required pam_unix.so try_first_pass nullok
auth optional pam_permit.so
auth required pam_env.so
account required pam_unix.so
account optional pam_permit.so
account required pam_time.so
password required pam_unix.so try_first_pass nullok sha512 shadow
password optional pam_permit.so
session required pam_limits.so
session required pam_unix.so
session optional pam_permit.so
VNC的设置
~ > cat ~/.vnc/xstartup
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
export LANG=zh_CN.UTF-8
export LANGUAGE=zh_CN:en_US
export LC_CTYPE=en_US.UTF-8
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export XKL_XMODMAP_DISABLE=1
exec dbus-launch startxfce4
最近编辑记录 Siglud (2019-12-19 15:13:26)
离线
你用的啥 VNC 服务器,支持 PAM 吗?
离线
你用的啥 VNC 服务器,支持 PAM 吗?
TigerVNC,按照Wiki配置的
启动文件:
cat /etc/systemd/system/vncserver@:1.service
[Unit]
Description=Remote desktop service (VNC)
After=multi-user.target
[Service]
Type=simple
User=siglud
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i >/dev/null 2>&1 || true'
ExecStart=/usr/bin/vncserver -fg %i -geometry 1920x1080
ExecStop=/usr/bin/vncserver -kill %i
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
最近编辑记录 Siglud (2019-12-19 15:07:35)
离线
好吧,我傻逼了,少加了一行
cat /etc/systemd/system/vncserver@:1.service
[Unit]
Description=Remote desktop service (VNC)
After=multi-user.target
[Service]
Type=simple
User=siglud
PAMName=login # 少了这里
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i >/dev/null 2>&1 || true'
ExecStart=/usr/bin/vncserver -fg %i -geometry 1920x1080
ExecStop=/usr/bin/vncserver -kill %i
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
加上之后问题解决
Thx
最近编辑记录 Siglud (2019-12-19 15:14:06)
离线