
The VNC server will open a new port for every new VNC desktop you create. Log file is /home/linuxconfig/.vnc/ubuntu:1.log Starting applications specified in /home/linuxconfig/.vnc/xstartup New 'ubuntu:1 (linuxconfig)' desktop is ubuntu:1 For this simply run the vncserver command from your home directory: $ vnc4server Lastly, make the ~/.vnc/xstartup file executable: $ chmod +x ~/.vnc/xstartupĪt this stage we are ready to start the VNC server.

Insert the the following content and save: #!/bin/bash Next, create the ~/.vnc/xstartup file to start the Xfce4 desktop: $ mkdir ~/.vnc Once the VNC server is installed we can begin the configuration by setting up a user password to be used by a VNC client when creating a remote connection: $ vncpasswd Let’s start by the installation of the VNC server and the Xfce desktop manager core files: $ sudo apt install vnc4server xfce4 xfce4-goodies Ubuntu 20.04 (Focal Fossa) Instructions Ubuntu VNC server setup

I use this method when I'm on an unstrusted connection (in both way) through SSH tunnel and it works like a charm.The objective is to setup VNC server on Ubuntu 18.04 Bionic Beaver Linux. For example :ĭISPLAY=:99 export $DISPLAY Xvfb $DISPLAY & openbox & # Or whatever DE/app you want x11vnc -display $DISPLAY # Or whatever VNC server you want, this one terminate with the connection it handle What you can do, if none of the way above is possible, is start a headless X session (with Xvfb) on which you can attach VNC from SSH and even start a desktop environment from here. You can't usually start VNC remotely on a user session because of X default security policies (check xhost). Start your session then launch a VNC server (which can be automated in DE's startup scripts, but you'll have to handle multiple ports through memory if you need to handle multiple user sessions) Use a greeter that support the use of a VNC server to login remotely (I don't think this exists, they usually use VNC through XDMCP which may not be what you want because you need an X client to connect)

VNC servers needs to be attached to a graphical session so you need to either : I don't know what you tried or what your specific use case/requirements are, but by how you tell us, I think you misunderstood what VNC is (by assuming it's an 1:1 Windows RDP replacement) and maybe you should use alternatives as other comments tells you.
