8

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
  • 1
    I was also unable to do this with Gnome. Switching to XFCE or KDE worked. – obsolesced Aug 25 '16 at 5:37
  • 1
    This link helped me to fix the issue. – IsAs Dec 27 '16 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.