This Guide will allow you to connect to a tightVNCserver on Ubuntu 20.04 with no monitor or keyboard attached to the Server. The problem i was having prior to this was it previously needed a monitor plugged in - in order for the mouse and keyboard to work. This is the work around.
- First of all you want to set a Static IP Address on your Ubuntu 20.04 in netowrk settings
- Head to Settings/Sharing and enable the Sharing switch at the top of the screen. You will want to click on 'Screen Sharing' , again enabling the switch, allowing connections to control the screen. Click 'Require a Password' button and enter a password. Select the netowork you wish to use.
- Head to the terminal and enter these commands below
sudo apt update
sudo apt upgrade
sudo apt install xfce4 xfce4-goodies tightvncserver
- You want to select gdm3
- Here enter a password, and select no to view only
vncserver -kill :1
gsettings set org.gnome.Vino require-encryption false
- This will disable encryption over the connection so remember not to use it for anything of importance
sudo apt-get install xserver-xorg-video-dummy
- This next line tricks the server to think there is a monitor attached.
sudo nano /etc/X11/xorg.conf
- Here you want to edit the xorg.conf and add all the below code into the file. Ctrl-X and Y to save. If the file doesnt exist, create it.
Identifier "Configured Video Device"
Identifier "Configured Monitor"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
- Reboot the server and once Ubuntu has started you can go into your VNC Viewer in Windows and create a new connection to connect to the server. You should be able to remove the HDMI lead for the monitor and any keyboard / mouse and remote into it with full use of the remote mouse/keyboard with full native Desktop.