VNC session
我正在尝试以如下方式开始Gnome 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 &
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
xvnc4viewer
开始新的部分客户端:
$ xvnc4viewer <IP my server>:<Port my server>
结果:
我正在尝试VNC session
使用Gnome Desktop
以下设置和命令来启动:
vnc4server
终止会话服务器端:
selenium@selenium-grid:~$ vnc4server -kill :1
Killing Xvnc4 process ID 10747
编辑.vnc/xstartup
文件到服务器端:
$ sudo nano .vnc/xstartup
编辑的文件:
#!/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 &
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
客户端
$ xvnc4viewer <IP my server>:<Port my server>
因为我的Gnome Desktop
会话没有出现?我做错了什么?
答案1
安装这些软件包:
apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal
使用此启动文件:
#!/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 &
答案2
我能够使用 tigervnc 获得功能齐全的 gnome 桌面(按照本指南https://www.teknotut.com/en/install-vnc-server-with-gnome-display-on-ubuntu-18-04/)