Hello, friends. In this post, you will learn how to set up a VNC server on Ubuntu 20.04
Having a VNC server is a good alternative in these moments where work is being done remotely. Because VNC allows us to have a remote desktop server with which we can do jobs if you were on the computer.
This will be a fairly short tutorial because it is quite simple.
Creating a VNC Server on Ubuntu 20.04
Whether you are using Ubuntu desktop or Ubuntu Server it is convenient to install a lightweight desktop environment to make the connection. In this case, I have chosen XFCE.
So, install XFCE. For this, we present to you the tutorial that we have made.
How to install XFCE on Ubuntu 20.04?
Then, we can continue with the tutorial.
Install VNC Server on Ubuntu 20.04
Now we can install a VNC server. To do so, open a terminal or run via SSH.
sudo apt install tightvncserver
Once the server is installed, it is necessary to define a password.
vncpasswd Using password file /home/angelo/.vnc/passwd VNC directory /home/angelo/.vnc does not exist, creating. Password: Verify: Would you like to enter a view-only password (y/n)? y Password: Verify:
There you can define a password as a view-only password.
Now configure the server so that when it starts it will run the XFCE environment
So, create a configuration file:
nano ~/.vnc/xstartup
And add the following:
!/bin/bash xrdb $HOME/.Xresources startxfce4 &
Then close the file and give it execution permission
chmod +x ~/.vnc/xstartup
Now you can start the VNC server.
vncserver New 'X' desktop is ubuntuosradar:1 Starting applications specified in /home/angelo/.vnc/xstartup Log file is /home/angelo/.vnc/ubuntuosradar:1.log
Now if you open a client program, for example, Vinagre and access it through port 5901
So, enjoy it.
Conclusion
Creating and configuring this tool on Ubuntu 20.04 is quite useful these days. Now that you know how to do it, it’s up to you.