I want to establish VNC session between RealVNC Viewer in Windows 10 and TightVNC server in Ubuntu 18.04. I want to see from Windows full Ubuntu desktop. I looked at following resources:
Configuring a VNC Desktop: Upgrading GUI from classic gnome desktop to newest gnome desktop How to configure VNC server to get full Gnome desktop? vnc service for ubuntu 18.04, no background and menus How to make VNC Server work with ubuntu-desktop without xfce
ubuntu 18.04 VNC Grey screen
I have used various variants of the xstartup file ~/.vnc/xstartup. However, I cannot find any configuration which is working for me. Below you can find example of the xstartup file. Ping is working and I can ssh from Windows to Ubuntu. VNC connection is also working. However, after establishing VNC session from Windows machine, I cannot see anything.I get an empty window with grey background. From Linux machine I use Remmina for connection with similar result. I want to see exactly the same desktop as if I am looking at the Ubuntu machine, but I cannot do that.
I would appreciate your help very much.
#!/bin/sh
export XKL_XMODMAP_DISABLE=1
#xrdb $HOME/.Xresources
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
#exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
#dbus-launch --exit-with-session gnome-session &
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
gnome-session &
#sleep4 && gnome-panel &
#exec gnome-panel-delay
gnome-panel &
gnome-settings-daemon &
metacity &
#gnome-terminal &
#nautilus &
#startxfce4 &
#startgnome &