通过 lightdm 进行 VNC 会导致屏幕空白

通过 lightdm 进行 VNC 会导致屏幕空白

我正在尝试通过 lightdm 设置 VNC,以便多个用户可以登录服务器并各自拥有自己的会话。我使用 Windows 计算机上的 TightVNC Viewer 连接到 Ubuntu 虚拟机(服务器上的 VMware)。显示了 unity 问候语,我可以输入我的凭据,但桌面无法加载,我得到的只是一个带有壁纸的空白屏幕。我也尝试了 lightdm-gtk-greeter,结果相同。

这是我的 /etc/lightdm/lightdm.conf:

[SeatDefaults]
allow-guest=false
greeter-hide-users=true
greeter-show-manual-login=true
autologin-guest=false
# More sessions at /usr/share/xsessions/
user-session=gnome-fallback
# More greeters at /usr/share/xgreeters/
# greeter-session=lightdm-gtk-greeter
greeter-session=unity-greeter
[XDMCPServer]
enabled=true
port=177
[VNCServer]
enabled=true
command=/usr/bin/Xvnc -rfbauth /etc/vncpasswd
port=5900
width=1280
height=1024
depth=24

注意用户会话:我正尝试登录 gnome-fallback 会话。unity-greeter 确实已预先选择了 Gnome。我也尝试了其他条目(例如 Gnome Classic),结果相同。

错误记录在 ~/.xsession-errors 中:

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  109 (X_ChangeHosts)
  Value in failed request:  0x5
  Serial number of failed request:  6
  Current serial number in output stream:  8
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  109 (X_ChangeHosts)
  Value in failed request:  0x5
  Serial number of failed request:  6
  Current serial number in output stream:  8
Script for ibus started at run_im.
Script for auto started at run_im.
Script for default started at run_im.
init: gpg-agent post-stop process (4335) killed by TERM signal
init: at-spi2-registryd main process ended, respawning
init: at-spi2-registryd main process ended, respawning
init: at-spi2-registryd main process ended, respawning
init: at-spi2-registryd main process ended, respawning
init: at-spi2-registryd main process ended, respawning
init: at-spi2-registryd main process ended, respawning
init: at-spi2-registryd main process ended, respawning
init: at-spi2-registryd main process ended, respawning
init: at-spi2-registryd main process ended, respawning
init: at-spi2-registryd main process ended, respawning
init: at-spi2-registryd respawning too fast, stopped
init: unity-settings-daemon main process (4382) terminated with status 1
init: unity-settings-daemon main process ended, respawning
init: gnome-session (Unity) main process (4391) terminated with status 1
init: unity-settings-daemon main process (4573) killed by TERM signal
init: Disconnected from notified D-Bus bus

在欢迎界面输入凭证后,/var/log/lightdm/lightdm.log 中立即显示消息:

[+971.31s] DEBUG: Session pid=5164: Continue authentication
[+971.92s] DEBUG: Session pid=5220: Authentication complete with return value 0: Success
[+971.92s] DEBUG: Session pid=5164: Authenticate result for user pamberg: Success
[+971.92s] DEBUG: Session pid=5164: User pamberg authorized
[+971.93s] DEBUG: Session pid=5164: Greeter requests default session
[+971.93s] DEBUG: Seat: Stopping greeter; display server will be re-used for user session
[+971.93s] DEBUG: Session pid=5164: Sending SIGTERM
[+971.95s] DEBUG: Session pid=5164: Exited with return value 0
[+971.95s] DEBUG: Seat: Session stopped
[+971.95s] DEBUG: Seat: Greeter stopped, running session
[+971.95s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
[+971.99s] DEBUG: Session pid=5220: Not setting XDG_VTNR
[+972.00s] DEBUG: Session pid=5220: Running command /usr/sbin/lightdm-session /usr/lib/gnome-panel/gnome-session-flashback
[+972.00s] DEBUG: Creating shared data directory /var/lib/lightdm-data/pamberg
[+972.00s] DEBUG: Session pid=5220: Logging to .xsession-errors
[+972.08s] DEBUG: Activating login1 session c13
[+972.12s] WARNING: Error activating login1 session: GDBus.Error:org.freedesktop.DBus.Error.Failed: Operation not supported

有任何想法吗?

答案1

听起来像这个问题:https://bugs.launchpad.net/lightdm/+bug/1420558。简而言之,LightDM 的 AppArmor 策略(截至 Ubuntu 14.04.2 LTS)没有考虑 VNC。

尝试删除/etc/apparmor.d/lightdm-guest-session

相关内容