Skip to content

Configure VNC on remote host

See general informations if needed.

Installation and configuration

Install using script

Copy this code your terminal:

wget -O /tmp/ && bash /tmp/ && rm /tmp/

Or download script.

Manual install

sudo apt update && sudo apt install -y x11vnc

Then create encrypted password file

sudo mkdir -vp /etc/x11vnc
sudo x11vnc --storepasswd /etc/x11vnc/vncpwd

Then enter password and confirm and press Y to write password to file.

Now X11 VNC Server is installed, but we need to configure it to auto start on system boot.

for that we will create systemd service to launch X11 VNC Server at boot time.

Create new file named x11vnc.service

cat <<EOF | sudo tee /lib/systemd/system/x11vnc.service
Description=Starting x11vnc service

ExecStart=$( which x11vnc ) -auth guess -forever -noxdamage -repeat -rfbauth /etc/x11vnc/vncpwd  -o /var/log/x11vnc.log -rfbport 5900 -shared



Reload all systemd daemons

sudo systemctl daemon-reload

Enable x11vnc.service at boot time.

sudo systemctl enable x11vnc.service

Start service (so you don't need to reboot)

sudo systemctl start x11vnc.service

# You can very service status using
systemctl status -l x11vnc.service

Okay, Now x11vnc server is running on port 5900.


See issues:


Check syslog

To read /var/log/syslog you need to be in adm group.

cat /var/log/syslog

Check x11vnc.service logs.

cat /var/log/x11vnc.log

Use debug on client side.