VNC stands for Virtual Network Computing and is a subsystem or set of protocols for sharing desktops. Many software packages are available for remote access to Linux-based workstations, including TigerVNC, TightVNC, Vino, vnc4server and others.
TigerVNC is a free, open source, high performance VNC server used for remote management or access to Linux workstations. It is a client/server application that allows you to communicate with graphics applications on remote computers.
In this tutorial we will show you how to install and configure a VNC server under Ubuntu 20.04.
Step 1 – Setting up the office environment
By default, the Ubuntu server does not contain a working environment. The TigerVNC server is only intended to control desktop systems. So you need to add a desktop environment to your server.
Update and upgrade all installed packages first with the following command:
applicable update -y
applicable update -y
After the system update, install the Tasksel utility to install the desktop environment:
apt installation tasks -y
After the installation of Tasksel, run the Tasksel utility with the following command:
Task
You should see the following interface:
Use the arrow key to scroll through the list and find the Ubuntu desktop. Then press the space bar to select it, press Tab to select OK and press Enter to install the Ubuntu Desktop.
Once all packages have been installed, you will need to configure the system graphically. You can install it with the following command:
systemctl set-default graphic.target
The system is then restarted to apply the changes.
Step 2 – Installation of the TigerVNC server
By default, the TigerVNC package is available in the standard Ubuntu 20.04 repository. You can install it by executing the following command:
set up tigervnc standalone server -y
After installing TigerVNC, create a new user and define a VNC password.
First create a new user named hitesh with the following command:
aggressive blow
Then switch the user to the hitesh and set the VNC password by executing the following command:
shu – heitashvnppassvd
Enter the desired password as shown below:
Password :
You can be sure of that:
Would you like to enter your password for consultation only (y/n)? n
Then start the VNC server with the following command:
vncserver -localhost no
After starting the VNC server, you should get the following results:
New ‘ubuntu2004:1 (hitesh)’ :1 desktop on ubuntu2004 computer
Run the applications specified in the log file /home/hitesh/.vnc/ubuntu2004:1.log of session
of /etc/X11/Xvnc.
To connect to the VNC server use xtigervncviewer – SecurityTypes VncAuth, TLSVnc -passwd /home/hitesh/.vnc/passwd ubuntu2004:1
You can test a VNC server in operation with the following command:
vnc server plug
You should get the following result:
TigerVNC server sessions :
X DISPLAY # RFB CONNECTION # PROCESS ID
:1 5901 1719
Step 3 – VNCCustomer installation
In this section we will install the RealVNC VNC client on the remote computer and connect to the VNC server.
You can download the RealVNC client from the RealVNC download page.
Once the download is complete, install the downloaded package with the following command:
dpkg -i /home/vyom/Downloads/VNC-viewer-6.20.529-Linux-x64.deb
Then start the VNC client from the GNOME application menu. Then click File => New Connection to create a new connection. You should see the following image:
Enter the name and IP address and VNC:1 session ID of your VNC server and click OK to save the connection. You should see the saved connection on the next screen:
Now double click on the newly created connection. You will be prompted to enter a VNC password as shown below:
Enter the VNC password and click OK. Once the connection is established, you should see the Ubuntu desktop screen:
Step 4 – Setting up VNCs for the office environment
Stop the VNC instance before starting the vnc server command with the -kill option and the server session identifier as arguments.
vncserver -killing :1
You should get the following result:
The murder in the Xtigervnc trial ID 1719… Good luck!
Then you need to configure TigerVNC to work with Gnome. This can be done by creating a new xstartup file in the .vnc directory:
su – hitesh
nano ~/.vnc/xstartup
Add the following lines:
#! /bin/sh
exec /etc/vnc/xstartup
xrdb $HOME/.Xresources
vncconfig -iconic &
dbus-launch –exit-with-session gnome-session &
#! /bin/shh
/etc/vnc/xstartup implementation xrdb $HOME/.XResources vncconfig -iconic & dbus lunch –exit-with-session gnome session & |
Save the file and close it when you’re done. The above script is executed automatically each time the TigerVNC server is started or restarted.
Then give permission to run the ~/.vnc/xstartup:
chmod u+x ~/.vnc/xstartup
Step 5 – Create a System D service file for the VNC
Next, you must create a system file for TigerVNC to manage the VNC service. You can create them with the following command:
nano /etc/system/ [protected by email]
Add the following lines:
block]
Description= Desktop Demonstration (VNC)
After=syslog.target network.target
service]
Type=simple
User=hitesh
PAMName=login
PIDFile=/home/%u/.vnc/%H%i.pid
ExecStartPre=/usr/bin/vncserver -kill :%i > /dev/null 2>&1 | :
ExecStart=/usr/bin/vncserver:%i -localhost no -geometry 1024×768
ExecStop=/usr/bin/vncserver -kill:%i
Configuration]
WantedBy=Multi-user.destination
Save and exit the file, then restart the systemd daemon with the following command :
Restarting the system demonstration
Then activate the VNC service when rebooting the system with the following command:
enable [E-mail Security].
Then start the VNC service with the following command:
postal security system
Conclusion
Congratulations! You have successfully installed and configured the Tiger VNC server under Ubuntu 20.04. Now you can connect and manage your Ubuntu system from any desktop system via an easy-to-use graphical interface.
Related Tags:
is indonesia: a free country,freedom house,censorship pdf,benefits of the great firewall of china,china golden shield,why is censorship important,india rank in internet freedom,country with most internet freedom,freedom house rankings 2019,media censorship in europe,internet censorship in kenya,selective censorship,taiwan internet censorship,most restrictive countries,the organization "freedom on the net",freedom on the net,freedom house rankings 2020,freedom house foundation,freedom house definition of democracy,freedom house indonesia,freedom on the net united states