vncserver: Failed command ‘/etc/X11/Xvnc-session‘: 256!

在尝试启动VNC服务器时遇到错误,错误信息显示启动应用程序指定在/etc/X11/Xvnc-session中失败。尝试运行tigervncserver-xstartup/usr/bin/xterm命令,但提示文件未找到。安装xterm后问题依旧,错误变为X服务器连接中断。最终通过查看日志文件并运行xtigervncviewer连接成功。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

安装vncserver启动时出现如下报错:

Starting applications specified in /etc/X11/Xvnc-session
Log file is /root/.vnc/XXXX:1.log

Use xtigervncviewer -SecurityTypes VncAuth -passwd /root/.vnc/passwd :1 to connect to the VNC server.


vncserver: Failed command '/etc/X11/Xvnc-session': 256!

=================== tail -15 /root/.vnc/XXXX:1.log ===================
Copyright (C) 1999-2019 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12008000, The X.Org Foundation


Thu Jun 30 09:08:25 2022
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on local interface(s), port 5901
 vncext:      created VNC server for screen 0
X connection to :1 broken (explicit kill or server shutdown).

Thu Jun 30 09:08:26 2022
 ComparingUpdateTracker: 0 pixels in / 0 pixels out
 ComparingUpdateTracker: (1:-nan ratio)
Killing Xtigervnc process ID 2451... which seems to be deadlocked. Using SIGKILL!

==========================================================================================

Starting applications specified in /etc/X11/Xvnc-session has failed.
Maybe try something simple first, e.g.,
	tigervncserver -xstartup /usr/bin/xterm

然后根据提示运行了如下命令:

tigervncserver -xstartup /usr/bin/xterm

又会有如下报错:tigervncserver: Can't start '/usr/bin/xterm': No such file or directory!

然后安装xterm

sudo apt install xterm

再运行tigervncserver -xstartup /usr/bin/xterm还是会报错,但是这次错又不一样:

X connection to :2 broken (explicit kill or server shutdown).

Thu Jun 30 09:19:55 2022
 ComparingUpdateTracker: 0 pixels in / 0 pixels out
 ComparingUpdateTracker: (1:-nan ratio)
Killing Xtigervnc process ID 5929... which seems to be deadlocked. Using SIGKILL!

正百思不得其解时,看到了报错信息中其实有如下提示:

Starting applications specified in /etc/X11/Xvnc-session
Log file is /root/.vnc/XXXX:2.log

Use xtigervncviewer -SecurityTypes VncAuth -passwd /root/.vnc/passwd :2 to connect to the VNC server.

运行:

xtigervncviewer -SecurityTypes VncAuth -passwd /root/.vnc/passwd :2

连接成功

----------------------- MY_IP: 192.168.1.21 ----------------------- jetson@jetson-desktop:~$ vncserver Cleaning stale pidfile '/home/jetson/.vnc/jetson-desktop:1.pid'! New 'jetson-desktop:1 (jetson)' desktop at :1 on machine jetson-desktop Starting applications specified in /etc/X11/Xvnc-session Log file is /home/jetson/.vnc/jetson-desktop:1.log Use xtigervncviewer -SecurityTypes VncAuth -passwd /home/jetson/.vnc/passwd :1 to connect to the VNC server. vncserver: Failed command '/etc/X11/Xvnc-session': 256! =================== tail -15 /home/jetson/.vnc/jetson-desktop:1.log =================== Copyright (C) 1999-2019 TigerVNC Team and many others (see README.rst) See https://www.tigervnc.org for information on TigerVNC. Underlying X server release 12008000, The X.Org Foundation Mon Mar 17 23:02:16 2025 vncext: VNC extension running! vncext: Listening for VNC connections on local interface(s), port 5901 vncext: created VNC server for screen 0 X connection to :1 broken (explicit kill or server shutdown). Mon Mar 17 23:02:17 2025 ComparingUpdateTracker: 0 pixels in / 0 pixels out ComparingUpdateTracker: (1:nan ratio) Killing Xtigervnc process ID 4262... which seems to be deadlocked. Using SIGKILL! ======================================================================================= Starting applications specified in /etc/X11/Xvnc-session has failed. Maybe try something simple first, e.g., tigervncserver -xstartup /usr/bin/xterm jetson@jetson-desktop:~$ sudo spt install xterm sudo: spt:找不到命令 jetson@jetson-desktop:~$ sudo apt install xterm 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 xterm 已经是最新版 (353-1ubuntu1.20.04.2)。 下列软件包是自动安装的并且现在不需要了: apt-clone archdetect-deb bogl-bterm busybox-static cryptsetup-bin dpkg-repack gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 grub-common libdebian-installer4 libtimezonemap-data libtimezonemap1 os-prober python3-icu python3-pam rdate tasksel tasksel-data 使用'sudo apt autoremove'来卸载它(它们)。 升
03-18
jetson@jetson-desktop:~$ sudo apt install tigervnc-standalone-server tigervnc-xorg-extension 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: apt-clone archdetect-deb bogl-bterm busybox-static cryptsetup-bin dpkg-repack gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 grub-common libdebian-installer4 libpaps0 libtimezonemap-data libtimezonemap1 os-prober paps python3-icu python3-pam rdate tasksel tasksel-data 使用'sudo apt autoremove'来卸载它(它们)。 建议安装: xfonts-100dpi | xfonts-75dpi 下列【新】软件包将被安装: tigervnc-xorg-extension 下列软件包将被升级: tigervnc-standalone-server 升级了 1 个软件包,新安装了 1 个软件包, 要卸载 0 个软件包,有 441 个软件包未被升级。 需要下载 1,149 kB 的归档。 解压缩后会消耗 650 kB 的额外空间。 获取:1 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 tigervnc-standalone-server arm64 1.10.1+dfsg-3ubuntu0.20.04.1 [949 kB] 获取:2 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 tigervnc-xorg-extension arm64 1.10.1+dfsg-3ubuntu0.20.04.1 [200 kB] 已下载 1,149 kB,耗时 3秒 (369 kB/s) debconf: 因为并未安装 apt-utils,所以软件包的设定过程将被推迟 (正在读取数据库 ... 系统当前共安装有 246242 个文件和目录。) 准备解压 .../tigervnc-standalone-server_1.10.1+dfsg-3ubuntu0.20.04.1_arm64.deb ... 正在解压 tigervnc-standalone-server (1.10.1+dfsg-3ubuntu0.20.04.1) 并覆盖 (1.10.1+dfsg-3) ... 正在选中未选择的软件包 tigervnc-xorg-extension。 准备解压 .../tigervnc-xorg-extension_1.10.1+dfsg-3ubuntu0.20.04.1_arm64.deb ... 正在解压 tigervnc-xorg-extension (1.10.1+dfsg-3ubuntu0.20.04.1) ... 正在设置 tigervnc-standalone-server (1.10.1+dfsg-3ubuntu0.20.04.1) ... 正在设置 tigervnc-xorg-extension (1.10.1+dfsg-3ubuntu0.20.04.1) ... 正在处理用于 man-db (2.9.1-1) 的触发器 ... jetson@jetson-desktop:~$ vncserver :1 New 'jetson-desktop:1 (jetson)' desktop at :1 on machine jetson-desktop Starting applications specified in /etc/X11/Xvnc-session Log file is /home/jetson/.vnc/jetson-desktop:1.log Use xtigervncviewer -SecurityTypes VncAuth -passwd /home/jetson/.vnc/passwd :1 to connect to the VNC server. vncserver: Failed command '/etc/X11/Xvnc-session': 256! ==================
03-18
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

蓝羽飞鸟

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值