TigerVNC is a popular VNC server that allows you to remotely access the desktop of a Linux system. Here’s how you can install and configure TigerVNC on Ubuntu:
- Install TigerVNC server by running the following command:
sudo apt-get install tigervnc-standalone-server tigervnc-common
- Create a new VNC user by running the following command, replacing “username” with the desired username:
sudo adduser username
- Switch to the new VNC user by running the following command:
su - username
- Create a new VNC configuration file by running the following command:
vncserver
This will prompt you to set a password for the VNC user and create a new configuration file in the user’s home directory.
- Kill the VNC server by running the following command:
vncserver -kill :1
- Edit the VNC configuration file located in the user’s home directory (usually .vnc/xstartup) and add the following line at the end of the file:
gnome-session &
- Start the VNC server by running the following command:
vncserver
- You should now be able to remotely connect to the Ubuntu desktop using a VNC client, such as TightVNC or RealVNC, by connecting to the IP address of the Ubuntu server on port 5901 (for the first VNC user) or 5902 (for the second VNC user) and entering the password you set earlier.
- To stop the VNC server, you can use the command vncserver -kill :1, and to start it again use the command vncserver.
Please note that it is important to configure your firewall to allow incoming connections to port 5901 and 5902. Also, it is recommended to configure SSH port forwarding or VPN to encrypt the VNC traffic and make it more secure.