Document directory
- Install VNC Server in Ubuntu
- Connection process in Windows
Install VNC Server in Ubuntu
First install x11vnc on the Ubuntu machine:
sudo apt-get install x11vnc
Then set the VNC connection password:
x11vnc -storepasswd
The command above will prompt you to enter the password, and then encrypt the password and save it in~ /. Vnc/passwdFile.
Start VNC Server:
x11vnc -forever -shared -rfbauth ~/.vnc/passwd
You can also set the VNC Server to automatically start in the background after the system is started:
1. Copy the password file/EtcDirectory:
sudo cp ~/.vnc/passwd /etc/x11vnc.pass
2. Create/Etc/init/X11vnc. confFile to copy the following content:
start on login-session-start script x11vnc -display :0 -auth /var/run/lightdm/root/:0 -forever -bg -o /var/log/x11vnc.log -rfbauth /etc/x11vnc.pass -rfbport 5900 end script
3. Restart your computer. After the restart, you can connect to Windows.
Connection process in Windows
InstallRealVNC Viewer, And then start VNC Viwer:
Enter the IP address or machine name of the Ubuntu machine in the VNC Server, and click the Connect button, prompting you to enter the password:
In the Password box, enter the VNC connection password we just set and click "OK". Then we can see the graphical desktop of the Ubuntu machine.