Why VNC not showing actual Remote Desktop

What you see probably is the X11 session defined in ~/.vnc/xstartup, a minimal X11 session, maybe something like (this is how it looks like on Debian)

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

on another display, probably :1.

There're two things you can do:

  • To access a different desktop that looks the same, you have to start it in this xstartup file, e.g. with exec gnome-session or something similar, have a look for documentation on xinitrc or xsession[rc])
  • To access the same desktop session, you need a different VNC server. x11vnc can do desktop sharing; in your GNOME environment, Vino is probably the preferable choice (as Ignacio pointed out)

vncserver doesn't connect to the actual desktop; it creates a virtual desktop that is configured separately. If you want to access the actual desktop then you need to use either the VNC X extension or Vino.


Please uncomment following two lines in xstartup file under ~/.vnc/xstartup:

Before:

#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 &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

After:

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 &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

Tags:

Vnc

Rhel