12

I'm trying to start a VNC session with the Gnome Desktop as follows:

Server Side

Configure .vnc/xstartup file to:

#!/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 start a session on the server:

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

Start a new section of xvnc4viewer on the client side:

 $ xvnc4viewer <IP my server>:<Port my server>

Result:

enter image description here

I'm trying to start a VNC session with the Gnome Desktop with the following settings and commands:

Kill the session of vnc4server on the server side:

selenium@selenium-grid:~$ vnc4server -kill :1
Killing Xvnc4 process ID 10747

edit .vnc/xstartup file to on the server side:

$ sudo nano .vnc/xstartup

Edited file:

#!/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 &

Start a new session of vnc4server in server

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

Client side

$ xvnc4viewer <IP my server>:<Port my server>

Result: enter image description here

Because my Gnome Desktop session is not appearing? What am I doing wrong?

2 Answers2

1

install these packages:

apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal

use this startup file:

#!/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 &

0

I was able to get full featured gnome desktop with tigervnc (following this guide https://www.teknotut.com/en/install-vnc-server-with-gnome-display-on-ubuntu-18-04/)

artemave
  • 101