我在 AWS EC2 上有一个 Ubuntu 16.04 实例。我已经将 vnc4server、ubuntu 桌面和 gnome 面板安装到远程 GUI。
第一次连接时一切正常,但是在重新启动实例后,gnome 元素没有启动(没有顶部栏,我无法打开 gnome 终端)。
这是我的 xstartup 配置:
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &
我的日志有这样的输出:
Xvnc Free Edition 4.1.1 - built Feb 25 2015 23:02:21
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 40300000, The XFree86 Project, Inc
Mon Jul 16 01:21:25 2018
vncext: VNC extension running!
vncext: Listening for VNC connections on port 5901
vncext: created VNC server for screen 0
error opening security policy file /etc/X11/xserver/SecurityPolicy
Could not init font path element /usr/X11R6/lib/X11/fonts/Type1/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/misc/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from list!
Could not init font path element /usr/share/fonts/X11/Type1/, removing from list!
Could not init font path element /usr/share/fonts/X11/75dpi/, removing from list!
Could not init font path element /usr/share/fonts/X11/100dpi/, removing from list!
** (gnome-settings-daemon:3369): WARNING **: Name taken or bus went away - shutting down
Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error spawning command line 'dbus-launch --autolaunch=ec972c0eaa654f86885a404d2922ddf7 --binary-syntax --close-stderr': Child process exited with code 1
** (gnome-panel:3368): WARNING **: Failed to get session bus: Error spawning command line 'dbus-launch --autolaunch=ec972c0eaa654f86885a404d2922ddf7 --binary-syntax --close-stderr': Child process exited with code 1
Window manager warning: Log level 32: could not find XKB extension.
Window manager warning: Missing composite extension required for compositing
(nautilus:3371): libunity-CRITICAL **: file unity-launcher.c: line 1502: unexpected error: Error spawning command line 'dbus-launch --autolaunch=ec972c0eaa654f86885a404d2922ddf7 --binary-syntax --close-stderr': Child process exited with code 1 (g-spawn-exit-error-quark, 1)
(nautilus:3371): libunity-CRITICAL **: unity_launcher_entry_dbus_impl_construct: assertion 'conn != NULL' failed
(nautilus:3371): libunity-CRITICAL **: unity-inspector.vala:96: Unable to connect to session bus: Error spawning command line 'dbus-launch --autolaunch=ec972c0eaa654f86885a404d2922ddf7 --binary-syntax --close-stderr': Child process exited with code 1
(nautilus:3371): libunity-CRITICAL **: file unity-launcher.c: line 1502: unexpected error: Error spawning command line 'dbus-launch --autolaunch=ec972c0eaa654f86885a404d2922ddf7 --binary-syntax --close-stderr': Child process exited with code 1 (g-spawn-exit-error-quark, 1)
(nautilus:3371): libunity-CRITICAL **: unity_launcher_entry_dbus_impl_construct: assertion 'conn != NULL' failed
(nautilus:3371): libunity-CRITICAL **: file unity-launcher.c: line 1502: unexpected error: Error spawning command line 'dbus-launch --autolaunch=ec972c0eaa654f86885a404d2922ddf7 --binary-syntax --close-stderr': Child process exited with code 1 (g-spawn-exit-error-quark, 1)
(nautilus:3371): libunity-CRITICAL **: unity_launcher_entry_dbus_impl_construct: assertion 'conn != NULL' failed
Mon Jul 16 01:33:37 2018
Connections: accepted: 0.0.0.0::59176
SConnection: Client needs protocol version 3.8
Mon Jul 16 01:33:38 2018
SConnection: Client requests security type VncAuth(2)
Mon Jul 16 01:33:41 2018
VNCSConnST: Server default pixel format depth 16 (16bpp) little-endian rgb565
Mon Jul 16 01:33:42 2018
VNCSConnST: Client pixel format depth 6 (8bpp) rgb222
VNCSConnST: Client pixel format depth 16 (16bpp) little-endian rgb565
Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error spawning command line 'dbus-launch --autolaunch=ec972c0eaa654f86885a404d2922ddf7 --binary-syntax --close-stderr': Child process exited with code 1