1/Under Ubuntu, first install VNC
sudo apt-get Install Vnc4server
2. Then turn on the VNC desktop service and create a VNC desktop in two ways
Mode ① Create a VNC desktop, the session number is automatically generated by vncserver
$ vncserver
Mode ② Create a VNC desktop with a specified session number
$vncserver:2 <--------------Create a desktop with a specified session number of 2
3. Modify the remote login desktop configuration to a graphical interface, there are two ways
Mode ① Modify the Xstartup file ( Note: each user has their own xstartup file), the file path is ~/.vnc/xstartup
Add a line at the end of the file Gnome-session & (Will #twm &)
Way ② with/etc/x11/xsession direct replacement ~/.vnc/xstartup
$CP/etc/x11/xsession ~./.vnc/xstartup
4. Use Ubuntu Login to open VNC server
Way ① can use xtightvncviwer this tool
First install sudo apt-get install Xtightvncviewer
Then start the Xtightvncviewer Server address: Window number ( Note: window number is the above VNC open window number)
Like what
Or
After startup
Way ② using Remmina This tool is easy to use with a simple image
5. Turn off the VNC desktop
Vncserver-kill: Desktop number
Linux turns on the VNC service and uses Linux to connect through the client