Skip to content

Instantly share code, notes, and snippets.

@farinspace

farinspace/x11vnc.md

Last active Mar 19, 2020
Embed
What would you like to do?
x11vnc setup solution, Ubuntu 18.04 LTS

Make and Make install

See x11vnc stack smashing detected solution

Recommended version: x11vnc: 0.9.14 lastmod: 2013-11-21

.Xauthority

Set desktop to auto login and prevent screen locking .. else you will need to deal with Xauth

Test run x11vnc

/usr/local/bin/x11vnc -forever -display :0

Create a password

x11vnc -storepasswd

or use -localhost when starting service and use an ssh tunnel instead

Setup service at /lib/systemd/system/x11vnc.service

sudo systemctl daemon-reload
sudo systemctl enable x11vnc
sudo systemctl start x11vnc
[Unit]
Description=x11vnc
Requires=display-manager.service
After=display-manager.service
[Service]
ExecStart=/usr/bin/x11vnc -forever -display :0 -rfbauth /home/[USERNAME]/.vnc/passwd
ExecStop=/usr/bin/killall x11vnc
Restart=on-failure
RestartSec=10s
[Install]
WantedBy=multi-user.target
@likaci

This comment has been minimized.

Copy link

@likaci likaci commented Mar 19, 2020

with default gnome desktop
/lib/systemd/system/x11vnc.service

[Unit]
Description=Start x11vnc at startup.
After=multi-user.target

[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -forever -display :0 -rfbauth /etc/x11vnc.pass -auth /run/user/1000/gdm/Xauthority

[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.