Revision 2 of 2026-11-25 18:54 UTC by tux, the current one. Current version - History

Remote desktop SliTaz 5.1

VNC shows the desktop of one computer on another, with its mouse and keyboard: to help a user, or to drive a machine that has no screen in front of you. On SliTaz, x11vnc shares the desktop that is running, and several viewers can show it.

x11vnc works with an X session, like the LXTaz desktop. It cannot share a Wayland session.

Share the desktop

Install the server on the machine to share:

# spk-add x11vnc

Set a VNC password first, as the user who will be logged in. It is kept in ~/.vnc/passwd:

$ x11vnc -storepasswd

Then, from a terminal of that desktop:

$ x11vnc -usepw -forever -display :0

x11vnc listens on port 5900. Stop it with Ctrl+C. Other useful options: -localhost to accept only connections from the machine itself (for an SSH tunnel, below), -noxdamage if the screen does not refresh well. x11vnc -help lists them all.

Start it with the desktop

To share the desktop each time you log in, add an autostart entry. As the user, create ~/.config/autostart/x11vnc.desktop:

[Desktop Entry]
Type=Application
Name=x11vnc
Exec=x11vnc -usepw -forever -display :0

The desktop must be open for x11vnc to have something to share. On a machine with nobody in front of it, turn on the automatic login in LXTaz Desktop Preferences, page Login, or set autologin-user in /etc/lxtaz/dm.conf.

Connect from another machine

From SliTaz, several viewers:

$ vncviewer 192.168.1.10:0

From another system, any VNC viewer works: give it the address of the SliTaz machine and port 5900.

Over an untrusted network

VNC does not encrypt the screen nor the keys you type, and its password is weak. Outside your home network, start x11vnc with -localhost and go through SSH (see SSH): the SSH server must run on the shared machine.

From a SliTaz desktop, open a tunnel from local port 5901 to the VNC port of the remote machine, then connect to display :1 of your own machine:

$ ssh -f -N -L 5901:127.0.0.1:5900 tux@192.168.1.10
$ vncviewer 127.0.0.1:1

From a text console, sshfbvnc does both steps:

$ sshfbvnc tux@192.168.1.10

The VNC viewer of the menu has a "Via a SSH tunnel" box that does the same.

x11vnc as a service

The package also brings /etc/init.d/x11vnc. It runs x11vnc as root on display :0 from the boot, login screen included, with the options of X11VNC_OPTIONS in /etc/daemons.conf. Before using it:

# x11vnc -storepasswd /etc/vnc.secret

The default options also accept viewers from local networks only (-allow 10.,192.168.,127.0.0.1). Then start the service, and enable it at boot:

# trame service start x11vnc
# trame service enable x11vnc

Troubleshooting

The viewer connects, then x11vnc stops: add -forever.

"XOpenDisplay failed": no X desktop is open on :0, or it is a Wayland session. Log in to the LXTaz desktop, or turn on the automatic login.

The menu VNC viewer is refused: the server asks for a password and fbvnc has none: install fbvnc-auth, or use the SSH tunnel.