我的机器上只安装了 Ubuntu 21.04。之前是 20.04,我使用 tigerVNC 来运行 VNC。当我执行升级命令时,一切都正常,但它将我移至 21.04,这是我没有想到的。现在其他一切都正常,但我的 vncserver 命令无法启动 vnc 会话。相反,我收到错误:
New Xtigervnc server 'EmilieServer:3 (michel)' on port 5903 for display :3.
Use xtigervncviewer -SecurityTypes VncAuth,TLSVnc -passwd /home/michel/.vnc/passwd EmilieServer:3 to connect to the VNC server.
=================== tail /home/michel/.vnc/EmilieServer:5903.log ===================
====================================================================================
Session startup via '/home/michel/.vnc/xstartup' cleanly exited too early (< 3 seconds)!
Maybe try something simple first, e.g.,
tigervncserver -xstartup /usr/bin/xterm
The X session cleanly exited!
Killing Xtigervnc process ID 23027... success!
查看此 vnc 会话的日志我得到了此信息。
Xnvc TigerVNC 1.11.0 - built 2021-09-20 18:41
Copyright (C) 1999-2020 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12011000, The X.Org Foundation
Thu Oct 28 22:03:30 2021
vncext: VNC extension running!
vncext: Listening for VNC connections on all interface(s), port 5903
vncext: created VNC server for screen 0
3NI3X0 New Xtigervnc server 'EmilieServer:3 (michel)' on port 5903 for display :3.
3NI3X0 Use xtigervncviewer -SecurityTypes VncAuth,TLSVnc -passwd /home/michel/.vnc/passwd EmilieServer:3 to connect to the VNC server.
ComparingUpdateTracker: 0 pixels in / 0 pixels out
ComparingUpdateTracker: (1:-nan ratio)
/usr/bin/startxfce4: X server already running on display :3
xrdb: Connection refused
xrdb: Can't open display ':3'
dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1
exited with status 1
Unable to init server: Could not connect: Connection refused
xfce4-session: Cannot open display: .
Type 'xfce4-session --help' for usage.
我的启动文件很简单,它在 20.04 中运行。
#!/bin/sh
set -xv
xrdb $HOME/.Xresources
xsetroot -solid grey
#exec /etc/X11/xinit/xinitrc
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
#export XKL_XMODMAP_DISABLE=1
dbus-launch /usr/bin/startxfce4
有人知道为什么我在升级后遇到了这个问题吗?我花了两天时间解决此问题,但找不到任何有用的信息。设置此服务器是为了让我的女儿可以做大学研究项目,她需要它来继续工作。任何帮助都将不胜感激。