如何修复通过 TightVNC 访问 Ubuntu 16.10 GNOME 环境时出现的 GDBus 和 xlib 错误

如何修复通过 TightVNC 访问 Ubuntu 16.10 GNOME 环境时出现的 GDBus 和 xlib 错误

我想使用带有 VNC 的 GNOME 环境访问我的 Ubuntu 16.10 VPS,但我仍然面临一些目前无法解决的问题。为了安装和配置软件,我运行了以下命令:

sudo apt-get install ubuntu-gnome-desktop
sudo apt-get install tightvncserver xtightvncviewer tightvnc-java
sudo locale-gen de_DE.UTF-8
sudo apt-get install xfonts-75dpi
sudo apt-get install xfonts-100dpi
sudo apt-get install gnome-panel
sudo apt-get install metacity
sudo apt-get install light-themes
touch ~/.Xresources
vncpasswd

文件〜/ .vnc / xstartup最初包含以下几行:

#!/bin/sh
xrdb $HOME/.Xresources 
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
# Fix to make GNOME work 
export XKL_XMODMAP_DISABLE=1 
/etc/X11/Xsession

当我使用启动 VNC 服务器时,vncserver -geometry 1920x1200根据日志文件,一切看起来都很好〜/ .vnc

17/02/17 11:47:48 Xvnc version TightVNC-1.3.10
17/02/17 11:47:48 Copyright (C) 2000-2009 TightVNC Group
17/02/17 11:47:48 Copyright (C) 1999 AT&T Laboratories Cambridge
17/02/17 11:47:48 All Rights Reserved.
17/02/17 11:47:48 See http://www.tightvnc.com/ for information on TightVNC
17/02/17 11:47:48 Desktop name 'X' (host:1)
17/02/17 11:47:48 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
17/02/17 11:47:48 Listening for VNC connections on TCP port 5901
17/02/17 11:47:48 Listening for HTTP connections on TCP port 5801

我可以通过 VNCViewer 从我的 Windows PC 成功连接并看到一个灰色窗口。

现在我不清楚的是,我需要改变什么〜/ .vnc / xstartup让 Gnome 运行。我尝试过许多不同的设置。

例如当我改变启动

#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &

# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession

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

并通过 VNC 连接,我在 vnc 日志文件中收到以下错误消息:

17/02/17 14:13:09 Xvnc version TightVNC-1.3.10
17/02/17 14:13:09 Copyright (C) 2000-2009 TightVNC Group
17/02/17 14:13:09 Copyright (C) 1999 AT&T Laboratories Cambridge
17/02/17 14:13:09 All Rights Reserved.
17/02/17 14:13:09 See http://www.tightvnc.com/ for information on TightVNC
17/02/17 14:13:09 Desktop name 'X' (host:1)
17/02/17 14:13:09 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
17/02/17 14:13:09 Listening for VNC connections on TCP port 5901
17/02/17 14:13:09 Listening for HTTP connections on TCP port 5801
17/02/17 14:13:09   URL http://5801

(nautilus:7807): Gtk-WARNING **: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
metacity-Message: could not find XKB extension.
Window manager warning: Missing composite extension required for compositing

(gnome-settings-daemon:7805): rfkill-plugin-WARNING **: Could not open RFKILL control device, please verify your installation

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

(nautilus:7807): Gtk-WARNING **: Theme parsing error: <broken file>:1:0: Failed to import: The resource at '/org/gnome/libgd/tagged-entry/default.css' does not exist
Xlib:  extension "XInputExtension" missing on display ":1".
Xlib:  extension "XInputExtension" missing on display ":1".
Xlib:  extension "XInputExtension" missing on display ":1".
Xlib:  extension "XInputExtension" missing on display ":1".
Xlib:  extension "XInputExtension" missing on display ":1".
Xlib:  extension "XInputExtension" missing on display ":1".

(gnome-settings-daemon:7805): media-keys-plugin-WARNING **: Unable to inhibit keypresses: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Permission denied

** (gnome-settings-daemon:7805): WARNING **: Unable to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

** (process:7845): WARNING **: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

(gnome-settings-daemon:7805): GLib-GIO-CRITICAL **: g_task_return_error: assertion 'error != NULL' failed
Xlib:  extension "XInputExtension" missing on display ":1".
Xlib:  extension "XInputExtension" missing on display ":1".

(gnome-settings-daemon:7805): sharing-plugin-WARNING **: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit rygel.service not loaded.
Xlib:  extension "XInputExtension" missing on display ":1".

(gnome-panel:7804): Gtk-WARNING **: Allocating size to PanelToplevel 0x55e8b9e1fba0 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
Xlib:  extension "XInputExtension" missing on display ":1".
Nautilus-Share-Message: Called "net usershare info" but it failed: Failed to execute child process "net" (No such file or directory)
Xlib:  extension "XInputExtension" missing on display ":1".

这是我通过 VNCViewer 看到的内容: 在此处输入图片描述

到目前为止,我仍无法修复日志文件中的问题。非常感谢您的帮助。

相关内容