我正在尝试在 Ubuntu 20.04 LTS 上配置 Gnome-Desktop。
我能够使用 Real VNC Viewer、Apple VNC Screen Share 和其他 VNC 查看器查看桌面,我可以运行我的应用程序,桌面管理器可以运行,在服务器内可以复制/粘贴,等等。
但是,背景是灰色的(没有壁纸),缺少图标(例如时钟,音频等),客户端和服务器之间无法进行复制/粘贴,右键单击不起作用。
以下是我安装的内容:
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
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
export XKL_XMODMAP_DISABLE=1
export XDG_CURRENT_DESKTOP="GNOME-Flashback:Unity"
export XDG_MENU_PREFIX="gnome-flashback-"
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
gnome-session --session=gnome-flashback-metacity --disable-acceleration-check &
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal & 1,1
Ubuntu 20.04 LTS 上有三个版本的 dbus:
(base) ubuntu@ip-10-0-1-82:~$ conda list dbus
# packages in environment at /home/ubuntu/anaconda2:
#
# Name Version Build Channel
dbus 1.13.6 h7a60e0d_1 conda-forge
(base) ubuntu@ip-10-0-1-82:~$ apt list dbus -a
Listing... Done
dbus/focal-updates,focal-security,now 1.12.16-2ubuntu2.1 amd64 [installed]
dbus/focal 1.12.16-2ubuntu2 amd64
(base) ubuntu@ip-10-0-1-82:~$ /usr/local/bin/dbus-launch --sh-syntax
DBUS_SESSION_BUS_ADDRESS='unix:abstract=/tmp/dbus-HfxwGEdG9e,guid=6ce8b0152865164283636f0d5f92afb9';
export DBUS_SESSION_BUS_ADDRESS;
DBUS_SESSION_BUS_PID=16128;
(base) ubuntu@ip-10-0-1-82:~$ /usr/bin/dbus-launch --sh-syntax
/usr/bin/dbus-launch: /usr/local/lib/libdbus-1.so.3: version `LIBDBUS_PRIVATE_1.12.16' not found (required by /usr/bin/dbus-launch)
(base) ubuntu@ip-10-0-1-82:~$ dbus-launch
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-uYN1t0K8aa,guid=a7b5559f262eec0d61f7cda25f92afe6
DBUS_SESSION_BUS_PID=16237
更新 3
...
ct 22 18:00:38 ip-10-0-1-82 systemd[249504]: Started D-Bus User Message Bus.
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] AppArmor D-Bus mediation is enabled
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Activating via systemd: service name='org.gtk.vfs.Daemon' unit='gvfs-daemon.service' requested by ':1.1' (uid=1004 pid=249516 comm="/usr/libexec/tracker-miner-fs " label="unconfined")
Oct 22 18:00:38 ip-10-0-1-82 systemd[249504]: Starting Virtual filesystem service...
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Successfully activated service 'org.gtk.vfs.Daemon'
Oct 22 18:00:38 ip-10-0-1-82 systemd[249504]: Started Virtual filesystem service.
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Activating via systemd: service name='org.gtk.vfs.UDisks2VolumeMonitor' unit='gvfs-udisks2-volume-monitor.service' requested by ':1.1' (uid=1004 pid=249516 comm="/usr/libexec/tracker-miner-fs " label="unconfined")
Oct 22 18:00:38 ip-10-0-1-82 systemd[249504]: Starting Virtual filesystem service - disk device monitor...
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Successfully activated service 'org.gtk.vfs.UDisks2VolumeMonitor'
Oct 22 18:00:38 ip-10-0-1-82 systemd[249504]: Started Virtual filesystem service - disk device monitor.
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Activating via systemd: service name='org.gtk.vfs.GoaVolumeMonitor' unit='gvfs-goa-volume-monitor.service' requested by ':1.1' (uid=1004 pid=249516 comm="/usr/libexec/tracker-miner-fs " label="unconfined")
Oct 22 18:00:38 ip-10-0-1-82 systemd[249504]: Starting Virtual filesystem service - GNOME Online Accounts monitor...
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Activating service name='org.gnome.OnlineAccounts' requested by ':1.6' (uid=1004 pid=249567 comm="/usr/libexec/gvfs-goa-volume-monitor " label="unconfined")
Oct 22 18:00:38 ip-10-0-1-82 goa-daemon[249571]: goa-daemon version 3.36.0 starting
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Activating service name='org.gnome.Identity' requested by ':1.7' (uid=1004 pid=249571 comm="/usr/libexec/goa-daemon " label="unconfined")
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Successfully activated service 'org.gnome.OnlineAccounts'
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Successfully activated service 'org.gtk.vfs.GoaVolumeMonitor'
Oct 22 18:00:38 ip-10-0-1-82 systemd[249504]: Started Virtual filesystem service - GNOME Online Accounts monitor.
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Successfully activated service 'org.gnome.Identity'
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Activating via systemd: service name='org.gtk.vfs.GPhoto2VolumeMonitor' unit='gvfs-gphoto2-volume-monitor.service' requested by ':1.1' (uid=1004 pid=249516 comm="/usr/libexec/tracker-miner-fs " label="unconfined")
Oct 22 18:00:38 ip-10-0-1-82 systemd[249504]: Starting Virtual filesystem service - digital camera monitor...
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[958]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service' requested by ':1.161' (uid=1004 pid=249514 comm="/usr/bin/pulseaudio --daemonize=no --log-target=jo" label="unconfined")
Oct 22 18:00:38 ip-10-0-1-82 systemd[1]: Condition check resulted in Bluetooth service being skipped.
Oct 22 18:00:38 ip-10-0-1-82 pulseaudio[249514]: Failed to open cookie file '/home/hduser/.config/pulse/cookie': No such file or directory
Oct 22 18:00:38 ip-10-0-1-82 pulseaudio[249514]: Failed to load authentication key '/home/hduser/.config/pulse/cookie': No such file or directory
Oct 22 18:00:38 ip-10-0-1-82 pulseaudio[249514]: Failed to open cookie file '/home/hduser/.pulse-cookie': No such file or directory
Oct 22 18:00:38 ip-10-0-1-82 pulseaudio[249514]: Failed to load authentication key '/home/hduser/.pulse-cookie': No such file or directory
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Successfully activated service 'org.gtk.vfs.GPhoto2VolumeMonitor'
Oct 22 18:00:38 ip-10-0-1-82 systemd[249504]: Started Virtual filesystem service - digital camera monitor.
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Activating via systemd: service name='org.gtk.vfs.MTPVolumeMonitor' unit='gvfs-mtp-volume-monitor.service' requested by ':1.1' (uid=1004 pid=249516 comm="/usr/libexec/tracker-miner-fs " label="unconfined")
Oct 22 18:00:38 ip-10-0-1-82 rtkit-daemon[1347]: Supervising 2 threads of 1 processes of 2 users.
Oct 22 18:00:38 ip-10-0-1-82 systemd[249504]: Starting Virtual filesystem service - Media Transfer Protocol monitor...
Oct 22 18:00:38 ip-10-0-1-82 rtkit-daemon[1347]: Supervising 2 threads of 1 processes of 2 users.
Oct 22 18:00:38 ip-10-0-1-82 rtkit-daemon[1347]: Supervising 2 threads of 1 processes of 2 users.
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Successfully activated service 'org.gtk.vfs.MTPVolumeMonitor'
Oct 22 18:00:38 ip-10-0-1-82 systemd[249504]: Started Virtual filesystem service - Media Transfer Protocol monitor.
Oct 22 18:00:38 ip-10-0-1-82 rtkit-daemon[1347]: Supervising 2 threads of 1 processes of 2 users.
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Activating via systemd: service name='org.gtk.vfs.AfcVolumeMonitor' unit='gvfs-afc-volume-monitor.service' requested by ':1.1' (uid=1004 pid=249516 comm="/usr/libexec/tracker-miner-fs " label="unconfined")
Oct 22 18:00:38 ip-10-0-1-82 systemd[249504]: Starting Virtual filesystem service - Apple File Conduit monitor...
Oct 22 18:00:38 ip-10-0-1-82 rtkit-daemon[1347]: Supervising 2 threads of 1 processes of 2 users.
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Successfully activated service 'org.gtk.vfs.AfcVolumeMonitor'
Oct 22 18:00:38 ip-10-0-1-82 systemd[249504]: Started Virtual filesystem service - Apple File Conduit monitor.
Oct 22 18:00:38 ip-10-0-1-82 systemd[249504]: Started Sound Service.
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Activating via systemd: service name='org.freedesktop.Tracker1' unit='tracker-store.service' requested by ':1.1' (uid=1004 pid=249516 comm="/usr/libexec/tracker-miner-fs " label="unconfined")
Oct 22 18:00:38 ip-10-0-1-82 systemd[249504]: Starting Tracker metadata database store and lookup manager...
Oct 22 18:00:38 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Successfully activated service 'org.freedesktop.Tracker1'
Oct 22 18:00:38 ip-10-0-1-82 systemd[249504]: Started Tracker metadata database store and lookup manager.
Oct 22 18:00:39 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Activating service name='org.freedesktop.thumbnails.Cache1' requested by ':1.1' (uid=1004 pid=249516 comm="/usr/libexec/tracker-miner-fs " label="unconfined")
Oct 22 18:00:39 ip-10-0-1-82 org.freedesktop.thumbnails.Cache1[249752]: Registered thumbnailer /usr/bin/totem-video-thumbnailer -s %s %u %o
Oct 22 18:00:39 ip-10-0-1-82 org.freedesktop.thumbnails.Cache1[249752]: Registered thumbnailer gnome-thumbnail-font --size %s %u %o
Oct 22 18:00:39 ip-10-0-1-82 org.freedesktop.thumbnails.Cache1[249752]: Registered thumbnailer /usr/bin/gdk-pixbuf-thumbnailer -s %s %u %o
Oct 22 18:00:39 ip-10-0-1-82 org.freedesktop.thumbnails.Cache1[249752]: Registered thumbnailer /usr/bin/gdk-pixbuf-thumbnailer -s %s %u %o
Oct 22 18:00:39 ip-10-0-1-82 org.freedesktop.thumbnails.Cache1[249752]: Registered thumbnailer evince-thumbnailer -s %s %u %o
Oct 22 18:00:39 ip-10-0-1-82 systemd[249504]: Started Tracker metadata extractor.
Oct 22 18:00:39 ip-10-0-1-82 dbus-daemon[249523]: [session uid=1004 pid=249523] Successfully activated service 'org.freedesktop.thumbnails.Cache1'
Oct 22 18:00:39 ip-10-0-1-82 systemd[249504]: Started Tracker file system data miner.
Oct 22 18:00:39 ip-10-0-1-82 systemd[249504]: Reached target Main User Target.
Oct 22 18:00:39 ip-10-0-1-82 systemd[249504]: Startup finished in 1.097s.
Oct 22 18:00:43 ip-10-0-1-82 sshd[249749]: Received disconnect from 127.0.0.1 port 33958:11: disconnected by user
Oct 22 18:00:43 ip-10-0-1-82 sshd[249749]: Disconnected from user hduser 127.0.0.1 port 33958
Oct 22 18:00:43 ip-10-0-1-82 sshd[249481]: pam_unix(sshd:session): session closed for user hduser
Oct 22 18:00:43 ip-10-0-1-82 systemd-logind[1007]: Session 223 logged out. Waiting for processes to exit.
Oct 22 18:00:43
...
Oct 22 18:17:39 ip-10-0-1-82 sshd[253093]: Connection closed by 85.209.0.101 port 24512 [preauth]
Oct 22 18:17:42 ip-10-0-1-82 xdg-desktop-por[252983]: Failed to create settings proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: Timeout was reached
Oct 22 18:17:42 ip-10-0-1-82 dbus-daemon[2200]: [session uid=1000 pid=2200] Activating service name='org.freedesktop.impl.portal.desktop.kde' requested by ':1.189' (uid=1000 pid=252983 comm="/usr/libexec/xdg-desktop-portal " label="unconfined")
Oct 22 18:17:42 ip-10-0-1-82 org.freedesktop.impl.portal.desktop.kde[253126]: qt.qpa.xcb: could not connect to display
Oct 22 18:17:42 ip-10-0-1-82 org.freedesktop.impl.portal.desktop.kde[253126]: qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
Oct 22 18:17:42 ip-10-0-1-82 org.freedesktop.impl.portal.desktop.kde[253126]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Oct 22 18:17:42 ip-10-0-1-82 org.freedesktop.impl.portal.desktop.kde[253126]: Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
Oct 22 18:17:42 ip-10-0-1-82 dbus-daemon[2200]: [session uid=1000 pid=2200] Activated service 'org.freedesktop.impl.portal.desktop.kde' failed: Process org.freedesktop.impl.portal.desktop.kde received signal 6
Oct 22 18:17:42 ip-10-0-1-82 xdg-desktop-por[252983]: GError set over the top of a previous GError or uninitialized memory.
Oct 22 18:17:42 ip-10-0-1-82 xdg-desktop-por[252983]: Failed to create settings proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: Timeout was reached
Oct 22 18:17:47 ip-10-0-1-82 systemd[1]: systemd-hostnamed.service: Succeeded.
Oct 22 18:18:03 ip-10-0-1-82 sshd[253192]: rexec line 16: Deprecated option UsePrivilegeSeparation
Oct 22 18:18:03 ip-10-0-1-82 sshd[253192]: rexec line 19: Deprecated option KeyRegenerationInterval
Oct 22 18:18:03 ip-10-0-1-82 sshd[253192]: rexec line 20: Deprecated option ServerKeyBits
Oct 22 18:18:03 ip-10-0-1-82 sshd[253192]: rexec line 31: Deprecated option RSAAuthentication
Oct 22 18:18:03 ip-10-0-1-82 sshd[253192]: rexec line 38: Deprecated option RhostsRSAAuthentication
Oct 22 18:18:07 ip-10-0-1-82 xdg-desktop-por[252983]: Failed to create file chooser proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: Timeout was reached
Oct 22 18:18:07 ip-10-0-1-82 xdg-desktop-por[252983]: No skeleton to export
Oct 22 18:18:17 ip-10-0-1-82 systemd-timesyncd[662]: Timed out waiting for reply from 91.189.89.199:123 (ntp.ubuntu.com).
Oct 22 18:18:22 ip-10-0-1-82 systemd[2178]: xdg-desktop-portal.service: start operation timed out. Terminating.
Oct 22 18:18:22 ip-10-0-1-82 systemd[2178]: xdg-desktop-portal.service: Failed with result 'timeout'.
Oct 22 18:18:22 ip-10-0-1-82 systemd[2178]: Failed to start Portal service.
Oct 22 18:18:27 ip-10-0-1-82 systemd-timesyncd[662]: Timed out waiting for reply from 91.189.91.157:123 (ntp.ubuntu.com).
...
Oct 22 18:16:41 ip-10-0-1-82 sshd[252894]: Disconnected from invalid user ftpd 47.74.89.138 port 34214 [preauth]
Oct 22 18:16:50 ip-10-0-1-82 dbus-daemon[2200]: [session uid=1000 pid=2200] Activating via systemd: service name='org.freedesktop.Tracker1' unit='tracker-store.service' requested by ':1.2' (uid=1000 pid=2196 comm="/usr/libexec/tracker-miner-fs " label="unconfined")
Oct 22 18:16:50 ip-10-0-1-82 systemd[2178]: Starting Tracker metadata database store and lookup manager...
Oct 22 18:16:50 ip-10-0-1-82 dbus-daemon[2200]: [session uid=1000 pid=2200] Successfully activated service 'org.freedesktop.Tracker1'
Oct 22 18:16:50 ip-10-0-1-82 systemd[2178]: Started Tracker metadata database store and lookup manager.
Oct 22 18:16:50 ip-10-0-1-82 dbus-daemon[2200]: [session uid=1000 pid=2200] Activating service name='org.freedesktop.thumbnails.Cache1' requested by ':1.2' (uid=1000 pid=2196 comm="/usr/libexec/tracker-miner-fs " label="unconfined")
Oct 22 18:16:51 ip-10-0-1-82 org.freedesktop.thumbnails.Cache1[252934]: Registered thumbnailer /usr/bin/totem-video-thumbnailer -s %s %u %o
Oct 22 18:16:51 ip-10-0-1-82 org.freedesktop.thumbnails.Cache1[252934]: Registered thumbnailer gnome-thumbnail-font --size %s %u %o
Oct 22 18:16:51 ip-10-0-1-82 org.freedesktop.thumbnails.Cache1[252934]: Registered thumbnailer /usr/bin/gdk-pixbuf-thumbnailer -s %s %u %o
Oct 22 18:16:51 ip-10-0-1-82 org.freedesktop.thumbnails.Cache1[252934]: Registered thumbnailer /usr/bin/gdk-pixbuf-thumbnailer -s %s %u %o
Oct 22 18:16:51 ip-10-0-1-82 org.freedesktop.thumbnails.Cache1[252934]: Registered thumbnailer evince-thumbnailer -s %s %u %o
Oct 22 18:16:51 ip-10-0-1-82 dbus-daemon[2200]: [session uid=1000 pid=2200] Successfully activated service 'org.freedesktop.thumbnails.Cache1'
Oct 22 18:16:51 ip-10-0-1-82 gnome-session-binary[252953]: DEBUG(+): Enabling debugging
Oct 22 18:16:51 ip-10-0-1-82 gnome-session-binary[252953]: DEBUG(+): hardware acceleration check is disabled
Oct 22 18:16:51 ip-10-0-1-82 gnome-session-binary[252953]: WARNING: Could not make bus activated clients aware of QT_IM_MODULE=ibus environment variable: Could not connect: Connection refused
Oct 22 18:16:51 ip-10-0-1-82 gnome-session-binary[252953]: DEBUG(+): Could not make systemd aware of QT_IM_MODULE=ibus environment variable: Could not connect: Connection refused
Oct 22 18:16:51 ip-10-0-1-82 gnome-session-binary[252953]: WARNING: Could not make bus activated clients aware of XMODIFIERS=@im=ibus environment variable: Could not connect: Connection refused
Oct 22 18:16:51 ip-10-0-1-82 gnome-session-binary[252953]: DEBUG(+): Could not make systemd aware of XMODIFIERS=@im=ibus environment variable: Could not connect: Connection refused
Oct 22 18:16:51 ip-10-0-1-82 gnome-session-binary[252953]: WARNING: Could not make bus activated clients aware of GNOME_DESKTOP_SESSION_ID=this-is-deprecated environment variable: Could not connect: Connection refused
Oct 22 18:16:51 ip-10-0-1-82 gnome-session-binary[252953]: DEBUG(+): Could not make systemd aware of GNOME_DESKTOP_SESSION_ID=this-is-deprecated environment variable: Could not connect: Connection refused
Oct 22 18:16:51 ip-10-0-1-82 gnome-session-binary[252953]: WARNING: Could not make bus activated clients aware of XDG_MENU_PREFIX=gnome- environment variable: Could not connect: Connection refused
Oct 22 18:16:51 ip-10-0-1-82 gnome-session-binary[252953]: DEBUG(+): Could not make systemd aware of XDG_MENU_PREFIX=gnome- environment variable: Could not connect: Connection refused
Oct 22 18:16:52 ip-10-0-1-82 gnome-session-binary[252953]: DEBUG(+): Finding a graphical session for user 1000
Oct 22 18:16:52 ip-10-0-1-82 gnome-session-binary[252953]: DEBUG(+): Considering session '45'
Oct 22 18:16:52 ip-10-0-1-82 gnome-session-binary[252953]: DEBUG(+): Session '45' is not a graphical session (type: 'tty')
Oct 22 18:16:52 ip-10-0-1-82 gnome-session-binary[252953]: DEBUG(+): Considering session '3'
Oct 22 18:16:52 ip-10-0-1-82 gnome-session-binary[252953]: DEBUG(+): Session '3' is not a graphical session (type: 'tty')
Oct 22 18:16:52 ip-10-0-1-82 gnome-session-binary[252953]: WARNING: Could not get session id for session. Check that logind is properly installed and pam_systemd is getting used at login.
Oct 22 18:16:52 ip-10-0-1-82 gnome-session-binary[252953]: DEBUG(+): Using systemd for session tracking
Oct 22 18:16:52 ip-10-0-1-82 gnome-session-binary[252953]: WARNING: Lost name on bus: org.gnome.SessionManager
Oct 22 18:16:52 ip-10-0-1-82 gnome-session-binary[252953]: CRITICAL: We failed, but the fail whale is dead. Sorry....
Oct 22 18:16:52 ip-10-0-1-82 dbus-daemon[2200]: [session uid=1000 pid=2200] Activating via systemd: service name='org.gnome.Terminal' unit='gnome-terminal-server.service' requested by ':1.187' (uid=1000 pid=252978 comm="/usr/bin/gnome-terminal.real " label="unconfined")
Oct 22 18:16:52 ip-10-0-1-82 systemd[2178]: Starting GNOME Terminal Server...
Oct 22 18:16:52 ip-10-0-1-82 gnome-terminal-server[252981]: Unable to init server: Could not connect: Connection refused
Oct 22 18:16:52 ip-10-0-1-82 gnome-terminal-server[252981]: Failed to parse arguments: Cannot open display:
Oct 22 18:16:52 ip-10-0-1-82 systemd[2178]: gnome-terminal-server.service: Main process exited, code=exited, status=10/n/a
Oct 22 18:16:52 ip-10-0-1-82 systemd[2178]: gnome-terminal-server.service: Failed with result 'exit-code'.
Oct 22 18:16:52 ip-10-0-1-82 systemd[2178]: Failed to start GNOME Terminal Server.
Oct 22 18:16:52 ip-10-0-1-82 dbus-daemon[2200]: [session uid=1000 pid=2200] Activating via systemd: service name='org.freedesktop.portal.Desktop' unit='xdg-desktop-portal.service' requested by ':1.183' (uid=1000 pid=252956 comm="nautilus " label="unconfined")
Oct 22 18:16:52 ip-10-0-1-82 systemd[2178]: Starting Portal service...
Oct 22 18:16:52 ip-10-0-1-82 dbus-daemon[2200]: [session uid=1000 pid=2200] Activating via systemd: service name='org.freedesktop.impl.portal.desktop.gtk' unit='xdg-desktop-portal-gtk.service' requested by ':1.189' (uid=1000 pid=252983 comm="/usr/libexec/xdg-desktop-portal " label="unconfined")
Oct 22 18:16:52 ip-10-0-1-82 systemd[2178]: Starting Portal service (GTK+/GNOME implementation)...
Oct 22 18:16:52 ip-10-0-1-82 xdg-desktop-portal-gtk[252987]: Unable to init server: Could not connect: Connection refused
Oct 22 18:16:52 ip-10-0-1-82 xdg-desktop-por[252987]: cannot open display:
Oct 22 18:16:52 ip-10-0-1-82 systemd[2178]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
Oct 22 18:16:52 ip-10-0-1-82 systemd[2178]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.
Oct 22 18:16:52 ip-10-0-1-82 systemd[2178]: Failed to start Portal service (GTK+/GNOME implementation).
Oct 22 18:17:01 ip-10-0-1-82 CRON[253010]: pam_unix(cron:session): session opened for user root by (uid=0)
答案1
现在可以正常工作了。(但顶部栏右上角的图标仍然缺失。)
我所做的就是卸载 Anaconda 版本的“dbus”。
这是我的.vnc/startup:
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
export XKL_XMODMAP_DISABLE=1
export XDG_CURRENT_DESKTOP="GNOME-Flashback:GNOME"
export XDG_MENU_PREFIX="gnome-flashback-"
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
gnome-session --builtin --session=gnome-flashback-metacity --disable-acceleration-check --debug &
nautilus &
gnome-terminal &
并运行 /usr/bin/dbus-daemon:
(base) ubuntu@ip-10-0-1-82:~$ ps -ef | grep ubuntu | grep dbus
ubuntu 2546 2526 0 18:59 ? 00:00:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
ubuntu 2830 2825 0 19:00 ? 00:00:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
ubuntu 6794 1 0 19:26 pts/1 00:00:00 dbus-launch --exit-with-session /usr/libexec/gnome-session-binary --systemd --builtin --session=gnome-flashback-metacity --disable-acceleration-check --debug
ubuntu 6795 1 0 19:26 ? 00:00:00 /usr/bin/dbus-daemon --syslog --fork --print-pid 5 --print-address 7 --session
ubuntu 6891 6881 0 19:26 ? 00:00:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
答案2
XDG_CURRENT_DESKTOP
应该GNOME-Flashback:GNOME
。- 您还需要安装
gnome-flashback
。 gnome-settings-daemon
不存在,删除它。- 还删除
gnome-panel
和metacity
,将由开始gnome-session
。