How to install vncserver in Ubuntu 20.04

How to install vncserver in Ubuntu 20.04

Ubuntu 20.04 has been officially released in April 2020. Today, I officially installed a mirror system and installed vncserver in the system to facilitate remote graphical management and use. The steps to install vncserver are as follows:

Step 1: Install the desktop environment and VNCServer

#updateapt update
#Install the desktop environment sudo apt install xfce4 xfce4-goodies
#Install vncserver
apt install tightvncserver
#Start vncserver
vncserver

Then follow the prompts, enter the password you used to log in to vncserver and enter it again to confirm.

After logging in remotely, I found that the desktop was gray. It seems that you also need to configure the vncserver environment:

Step 2: Configure vncserver parameters

#Close vncserver: 1 window vncserver -kill: 1
#Back up the original configuration file mv ~/.vnc/xstartup ~/.vnc/xstartup.bak
#Edit the new configuration file vim ~/.vnc/xstartup

Update the xstartup file to the following:

#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &

Then set the permissions for the document

chmod +x ~/.vnc/xstartup

Then restart vncserver to connect to the graphical interface. The screenshot is as follows:

You can see that the graphical interface has appeared. However, this is currently an insecure connection method. If security is a concern, further configuration is still required.

Enter in the remote host terminal:

ssh -L 59000:localhost:5901 -C -N -l root server_ip

Where server_ip is replaced by your remote host IP address.

Then use putty. Other settings are similar to normal ssh settings, except that you need to set up an ssh tunnel. The specific settings are shown in the figure below:

Enter 5901 in the source port and 127.0.0.1:5901 in the destination, then click the Add button to add the effect shown in the figure above.

Then first use ssh to log in to the remote host locally, and then enter 127.0.0.1:1 in the client such as vncviewer to log in.

This is the end of this article about how to install vncserver in Ubuntu 20.04. For more information about installing vncserver in Ubuntu 20.04, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Solution to the startup error problem of AndroidStudio4.1 under Ubuntu
  • Solution to the error problem of Vscode remotely connecting to Ubuntu
  • Detailed tutorial on using VS Code and installing C/C++ plugins in Ubuntu
  • How to change password and set password complexity policy in Ubuntu
  • Ubuntu opens port 22
  • How to install and configure GitLab on Ubuntu 20.04
  • Ubuntu20.04 VNC installation and configuration implementation
  • Ubuntu configuration Pytorch on Graph (PoG) environment process diagram

<<:  Solution to MySQL Chinese garbled characters problem

>>:  The difference and usage of LocalStorage and SessionStorage in vue

Recommend

Windows10 mysql 8.0.12 non-installation version configuration startup method

This article shares the specific steps for config...

Using CSS3 and JavaScript to develop web color picker example code

The web color picker function in this example use...

Analysis of common usage examples of MySQL process functions

This article uses examples to illustrate the comm...

Detailed explanation of daily_routine example code in Linux

First look at the example code: #/bin/bash cal da...

Comparison of storage engines supported by MySQL database

Table of contents Storage Engine Storage engines ...

mysql data insert, update and delete details

Table of contents 1. Insert 2. Update 3. Delete 1...

How to connect to MySQL remotely through Navicat

Using Navicat directly to connect via IP will rep...

Docker deployment springboot project example analysis

This article mainly introduces the example analys...

How to use boost.python to call c++ dynamic library in linux

Preface Recently I started using robot framework ...

RGB color table collection

RGB color table color English name RGB 16 colors ...

The specific use and difference between attribute and property in Vue

Table of contents As attribute and property value...

Install MySQL 5.7 on Ubuntu 18.04

This article is compiled with reference to the My...

Analysis of MySQL latency issues and data flushing strategy process

Table of contents 1. MySQL replication process 2....