Steps to install and configure x11vnc under ubuntu20 - multiple pro-tests are available

The steps to install and configure x11vnc in Ubuntu 20.04 are as follows:

  1. Open a terminal and enter the following command to install x11vnc:

    sudo apt-get install x11vnc
    
  2. Once installed, enter the following command to generate a password file:

    sudo x11vnc -storepasswd /etc/x11vnc.pass
    

    The command will prompt you for a passphrase, which is then saved in the /etc/x11vnc.pass file.

  3. Create a systemd service file to automatically start x11vnc on system boot. Enter the following command in the terminal:

    sudo nano /etc/systemd/system/x11vnc.service
    

    Copy and paste the following into the file:

    [Unit]
    Description=Start x11vnc at startup.
    After=multi-user.target
    
    [Service]
    Type=simple
    ExecStart=/usr/bin/x11vnc -auth guess -forever -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
    
    [Install]
    WantedBy=multi-user.target
    
    Then press Ctrl+X, type "Y" to save and exit nano editor.
  4. Enable and start the x11vnc service. Enter the following command in the terminal:

    sudo systemctl enable x11vnc.service 
    sudo systemctl start x11vnc.service
    

    The x11vnc service should now be up and running. You can connect to the desktop of Ubuntu 20.04 using a VNC client, using the IP address and port number 5900, and entering the password you set earlier.

Note that your desktop will remain unlocked when connected using VNC. Therefore, make sure you keep your computer physically secure while connecting using VNC.

   5. In case the service cannot be started, run the command
/usr/bin/x11vnc -auth guess -forever -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared alone
to check the reason and proceed accordingly Just deal with it.

Guess you like

Origin blog.csdn.net/weixin_39466327/article/details/131210815