Install x2vnc by entering the following commands in the terminal:
sudo apt update sudo apt install x2vnc
Description:
Link a VNC and an X display together, simulating a multiheaded display
This program merges the capabilities of x2x and vncviewer. It will allow a machine with an X display and a machine with a VNC server running on its main screen to act as if they were two displays connected to one machine. When you move your mouse pointer off the screen in a direction of your choosing, the pointer will appear on the other screen instead.
Homepage: http://fredrik.hubbe.net/x2vnc.html
Version: 1.7.2-6
Section: universe/x11