我遇到了 VNC 问题。根据https://www.unixmen.com/install-configure-vnc-ubuntu-14-04/我在 Ubuntu 18.04 上安装了 VNC。但是,我遇到了一个问题。我无法连接。当我尝试连接时,它显示等待计算机响应超时。
以下是我的 VNC 会话对应的日志文件:
Xvnc TigerVNC 1.7.0 - built Dec 5 2017 09:25:01
Copyright (C) 1999-2016 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 11905000, The X.Org Foundation
Fri Jan 22 22:14:26 2021
vncext: VNC extension running!
vncext: Listening for VNC connections on local interface(s), port 5902
vncext: created VNC server for screen 0
/root/.vnc/xstartup: 10: /root/.vnc/xstartup: gnome-settings-daemon: not found
dbus[2304]: Unable to set up transient service directory: XDG_RUNTIME_DIR "/run/user/1001" is owned by uid 1001, not our uid 0
** (gnome-panel:2297): WARNING **: 22:14:27.804: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
Nautilus-Share-Message: 22:14:29.408: Called "net usershare info" but it failed: Failed to execute child process “net” (No such file or directory)
我的 VNC .xstartup 文件包含以下行:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
unset DBUS_SESSION_BUS_ADDRESS
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &
gnome-session &
为用户配置 VNC /etc/vncserver/vncservers.conf 文件:
VNCSERVERS="1:admin"
VNCSERVERARGS[1]="-geometry 1024x768"
VNCSERVERS="2:root"
VNCSERVERARGS[2]="-geometry 1024x768"
VNCSERVERS="3:yangche"
VNCSERVERARGS[3]="-geometry 1024x768"
我无法连接。当我尝试连接时,它显示等待计算机响应超时。有人能给我一个解决方案吗?以摆脱这个问题。提前谢谢。