1) Make a copy of vncserver
sudo cp /usr/bin/vncserver /usr/bin/vncserver.bkp
2) Open vncserver and find $defaultXStartup
sudo vi /usr/bin/vncserver
3) Modify lines to:
$defaultXStartup
= ("#!/bin/sh\n\n".
"# Uncomment the following two lines for normal desktop:\n".
"# unset SESSION_MANAGER\n".
"# exec /etc/X11/xinit/xinitrc\n\n".
"[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup\n".
"[ -r \$HOME/.Xresources ] && xrdb \$HOME/.Xresources\n".
"xsetroot -solid grey\n".
"vncconfig -iconic &\n".
"x-terminal-emulator -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n".
"x-window-manager &\n");
This will ensure that you have all the right things started inside VNC.
In case you face issues, please follow the below link and ensure you have all the stuff is rightly installed.
See Installation of VNC server on Ubuntu.
tightvncserver
on the remote OS.vncserver
is userd for RealVNC. – GAD3R Nov 29 '18 at 20:25