如何使用 Gnome 桌面启动 VNC 会话?

ric*_*mos 8 vnc remote-desktop gnome unity 14.04

我试图启动一个VNC sessionGnome Desktop如下:

服务器端

.vnc/xstartup文件配置为:

#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
Run Code Online (Sandbox Code Playgroud)

vnc4server服务器上启动会话:

selenium@selenium-grid:~$ vnc4server -geometry 1024x768 :1

New 'selenium-grid:1 (selenium)' desktop is selenium-grid:1

Starting applications specified in /home/selenium/.vnc/xstartup
Log file is /home/selenium/.vnc/selenium-grid:1.log
Run Code Online (Sandbox Code Playgroud)

xvnc4viewer客户端开始一个新的部分:

 $ xvnc4viewer <IP my server>:<Port my server>
Run Code Online (Sandbox Code Playgroud)

结果:

在此处输入图片说明

我试图启动一个VNC session具有Gnome Desktop以下设置和命令:

杀的会议vnc4server服务器端

selenium@selenium-grid:~$ vnc4server -kill :1
Killing Xvnc4 process ID 10747
Run Code Online (Sandbox Code Playgroud)

.vnc/xstartup服务器端编辑文件:

$ sudo nano .vnc/xstartup
Run Code Online (Sandbox Code Playgroud)

编辑的文件:

#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
/usr/bin/gnome-session &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
# x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# x-window-manager &
Run Code Online (Sandbox Code Playgroud)

vnc4server服务器中启动一个新会话

selenium@selenium-grid:~$ vnc4server -geometry 1024x768 :1

New 'selenium-grid:1 (selenium)' desktop is selenium-grid:1

Starting applications specified in /home/selenium/.vnc/xstartup
Log file is /home/selenium/.vnc/selenium-grid:1.log
Run Code Online (Sandbox Code Playgroud)

客户端

$ xvnc4viewer <IP my server>:<Port my server>
Run Code Online (Sandbox Code Playgroud)

结果: 在此处输入图片说明

因为我的Gnome Desktop会话没有出现?我究竟做错了什么?

小智 1

安装这些软件包:

apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal
Run Code Online (Sandbox Code Playgroud)

使用这个启动文件:

#!/bin/sh

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 &
Run Code Online (Sandbox Code Playgroud)


小智 0

我能够使用 Tigervnc 获得全功能的 gnome 桌面(遵循本指南https://www.teknotut.com/en/install-vnc-server-with-gnome-display-on-ubuntu-18-04/