无法通过 VNC 启动 gnome-terminal:

无法通过 VNC 启动 gnome-terminal:

我使用 Ubuntu 18.04.3 LTS(该机器实际上是在 VMware ESXi 上运行的虚拟机),我的 VNC .xstartup 文件包含以下行:

#!/bin/sh                                                                                                                                                                                                                                                                       

gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &

当我使用以下命令通过 VNC 连接到我的桌面时,无法在 VNC 会话中打开终端会话:

vncserver:36 -几何 1920x1080 -深度 16 -像素格式 rgb565

以下是我的 VNC 会话对应的日志文件:

"28/01/20 16:59:12 Xvnc version TightVNC-1.3.10
28/01/20 16:59:12 Copyright (C) 2000-2009 TightVNC Group
28/01/20 16:59:12 Copyright (C) 1999 AT&T Laboratories Cambridge
28/01/20 16:59:12 All Rights Reserved.
28/01/20 16:59:12 See http://www.tightvnc.com/ for information on TightVNC
28/01/20 16:59:12 Desktop name 'X' (ubuntu-server:36)
28/01/20 16:59:12 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
28/01/20 16:59:12 Listening for VNC connections on TCP port 5936
Font directory '/usr/share/fonts/X11/75dpi/' not found - ignoring
Font directory '/usr/share/fonts/X11/100dpi/' not found - ignoring
/home/ayildiz/.vnc/xstartup: line 4: gnome-settings-daemon: command not found
metacity-Message: 16:59:13.508: could not find XKB extension.

(metacity:1210): metacity-WARNING **: 16:59:13.513: Failed to create MetaCompositorXRender: Missing composite extension required for compositing

** (gnome-panel:1208): WARNING **: 16:59:13.655: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

** (gnome-panel:1208): WARNING **: 16:59:13.692: Error opening directory “/usr/share/gnome-panel/applets”: No such file or directory
Gtk-Message: 16:59:15.152: GtkDialog mapped without a transient parent. This is discouraged.

28/01/20 16:59:22 Got connection from client 192.168.6.52
28/01/20 16:59:22 Using protocol version 3.8
28/01/20 16:59:26 Full-control authentication passed by 192.168.6.52
28/01/20 16:59:26 rfbProcessClientNormalMessage: ignoring unknown encoding 24
28/01/20 16:59:26 rfbProcessClientNormalMessage: ignoring unknown encoding 16
28/01/20 16:59:26 rfbProcessClientNormalMessage: ignoring unknown encoding 22
28/01/20 16:59:26 rfbProcessClientNormalMessage: ignoring unknown encoding 21
28/01/20 16:59:26 rfbProcessClientNormalMessage: ignoring unknown encoding 15
28/01/20 16:59:26 Using zlib encoding for client 192.168.6.52
28/01/20 16:59:26 rfbProcessClientNormalMessage: ignoring unknown encoding -314
28/01/20 16:59:26 Enabling full-color cursor updates for client 192.168.6.52
28/01/20 16:59:26 rfbProcessClientNormalMessage: ignoring unknown encoding -223
28/01/20 16:59:26 Pixel format for client 192.168.6.52:
28/01/20 16:59:26   8 bpp, depth 6
28/01/20 16:59:26   true colour: max r 3 g 3 b 3, shift r 4 g 2 b 0
28/01/20 16:59:27 Using raw encoding for client 192.168.6.52
28/01/20 16:59:27 rfbProcessClientNormalMessage: ignoring unknown encoding 24
28/01/20 16:59:27 rfbProcessClientNormalMessage: ignoring unknown encoding 22
28/01/20 16:59:27 rfbProcessClientNormalMessage: ignoring unknown encoding 21
28/01/20 16:59:27 rfbProcessClientNormalMessage: ignoring unknown encoding 16
28/01/20 16:59:27 rfbProcessClientNormalMessage: ignoring unknown encoding 15
28/01/20 16:59:27 rfbProcessClientNormalMessage: ignoring unknown encoding -314
28/01/20 16:59:27 Enabling full-color cursor updates for client 192.168.6.52
28/01/20 16:59:27 rfbProcessClientNormalMessage: ignoring unknown encoding -223
28/01/20 16:59:27 rfbProcessClientNormalMessage: ignoring unknown encoding 24
28/01/20 16:59:27 rfbProcessClientNormalMessage: ignoring unknown encoding 16
28/01/20 16:59:27 rfbProcessClientNormalMessage: ignoring unknown encoding 22
28/01/20 16:59:27 rfbProcessClientNormalMessage: ignoring unknown encoding 21
28/01/20 16:59:27 rfbProcessClientNormalMessage: ignoring unknown encoding 15
28/01/20 16:59:27 Using zlib encoding for client 192.168.6.52
28/01/20 16:59:27 rfbProcessClientNormalMessage: ignoring unknown encoding -314
28/01/20 16:59:27 Enabling full-color cursor updates for client 192.168.6.52
28/01/20 16:59:27 rfbProcessClientNormalMessage: ignoring unknown encoding -223
28/01/20 16:59:27 Pixel format for client 192.168.6.52:
28/01/20 16:59:27   16 bpp, depth 16, little endian
28/01/20 16:59:27   true colour: max r 31 g 63 b 31, shift r 11 g 5 b 0
28/01/20 16:59:27   no translation needed
Nautilus-Share-Message: 16:59:41.279: Called "net usershare info" but it failed: Failed to execute child process “net” (No such file or directory)
Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached
"

直到昨天一切都很好,没有出现这样的问题。我尝试重新启动虚拟机和虚拟机管理程序,但没有成功。我该如何解决这个问题?

这是我通过 VNC 客户端看到的一个示例。

在此处输入图片描述

答案1

您正在导出您的显示服务器吗?

另外,尝试首先放置 gnome-settings-daemon,并将 gnome-terminal 添加到您的 vnc 启动中,看看是否可以在重启时启动它。

答案2

最后,它成功了。

我所做的是运行以下命令(我不是 100%确定这是一个解决方案):

sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal
sudo apt-get update
sudo apt-get upgrade

答案3

有同样的问题。使用 TigerVNC 服务器来解决这个问题 - https://www.cyberciti.biz/faq/install-and-configure-tigervnc-server-on-ubuntu-18-04/

相关内容