X11vnc: Difference between revisions

From Leo's Notes
This page was last edited on 3 January 2023, at 18:07.
No edit summary
mNo edit summary
Line 1: Line 1:
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 purposes. It may also be used as a remote desktop solution, but keep in mind that VNC doesn't support audio.
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 purposes. It may also be used as a remote desktop solution, but keep in mind that x11vnc will only display the desktop and does not support audio.


== Starting x11vnc ==
== Starting x11vnc ==

Revision as of 18:07, 3 January 2023

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 purposes. It may also be used as a remote desktop solution, but keep in mind that x11vnc will only display the desktop and does not support audio.

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