X11vnc

From Leo's Notes
Revision as of 23:13, 7 November 2022 by Leo (talk | contribs) (Created page with "x11vnc is a VNC server which mirrors the current on the X11 display rather than creating a separate X11 display such as Xvnc. This is useful for remote control / desktop purposes. == Starting x11vnc == The most basic usage is to just run <code>x11vnc</code> on a console. The VNC port number will be printed after it has started. A server like this will be wide open. To put a password on this server, run <code>x11vnc -storepasswd</code> which will help you generate a pas...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This page was last edited on 7 November 2022, at 23:13.

x11vnc is a VNC server which mirrors the current on the X11 display rather than creating a separate X11 display such as Xvnc. This is useful for remote control / desktop purposes.

Starting x11vnc

The most basic usage is to just run x11vnc on a console. The VNC port number will be printed after it has started.

A server like this will be wide open. To put a password on this server, run x11vnc -storepasswd which will help you generate a password file in $HOME/.vnc/passwd

To start x11vnc with a password, pass in -rfbauth $HOME/.vnc/passwd.

With systemd

To run x11vnc for a specific user when they log in, create the following systemd service file:

$HOME/.config/systemd/user/x11vnc.service

[Unit]
Description=start x11vnc

[Service]
ExecStart=/usr/bin/x11vnc -noncache -forever -loop -noxdamage -repeat -rfbauth /home/leo/.vncpasswd

[Install]
WantedBy=default.target

Enable and start the service as a user with:

$ systemctl --user enable x11vnc.service
$ systemctl --user start x11vnc.service
$ systemctl --user status x11vnc.service