Install VNC on Ubuntu

When using Ubuntu often requires Remote Desktop connection, the most common software is VNC. VNC is an open protocol that implements a lot of clients. But after comparing the various implementations, the best is now x11vnc. This program is not only free of charge, open source, but also supports OpenGL programs. For example, rviz and other programs can also open normally.

The X11VNC is already installed by default in the xiaoqiang system image, and if you use a xiaoqiang host or mirror, you can skip the installation process directly. Just follow the instructions for accessing the service.

The installation method is described below. The following is an example of Ubuntu 14.04, if it is 16.04 and later version, you need to edit the service configuration file.

Installing X11VNC

sudo apt-get install x11vnc -y

Set access password

sudo x11vnc -storepasswd /etc/x11vnc.pass

Create a service file

Under/etc/init, create a x11vnc.conf file with the following file contents

description "xiaoqiang vnc server"
start on runlevel [2345]
stop on runlevel [06]

script
    exec /usr/bin/x11vnc -auth guess -capslock -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
end script

Start the service

sudo service x11vnc start

Access the service

Download a VNC client, such as download from here

Start the client, enter target ip address

0_1537790364280_011a41c8-3b09-4c30-997f-eb9b2f9c91cb-image.png

and then enter access password

0_1537790385233_6e7da6ba-18eb-4809-b717-91a7fdcaf653-image.png

Then you can connect normally.

For Ubuntu 16.04 and later, You can configure your service file according to this script

Note When the installation is complete, you may still get an error when you use rviz without plugging in the monitor. Just plug in the HDMI to VGA adapter (do not connect the monitor, just the adapter) can be turned on normal use. If you want to adjust the resolution in the same way as normal computer settings, adjust the settings inside system settings

results matching ""

    No results matching ""