Skip to content
mviereck edited this page Feb 12, 2022 · 5 revisions

VNC for docker container

You can run a VNC server in a docker container and access it with a VNC viewer. You would not need x11docker at all.

For setups with x11docker it is recommended to rather use SSH access than this VNC setup.

Sample setup to provide an x11docker session with VNC:

#! /bin/bash
read Xenv < <(x11docker --xvfb --printenv --showenv x11docker/lxde)
env $Xenv x11vnc -noshm -forever -localhost -rfbport 5910

In another terminal, start VNC viewer with vncviewer localhost:5910. See man x11vnc for many details and further infos. Option -noshm disables shared memory (MIT-SHM). To allow shared memory, remove -noshm and use isolation breaking x11docker option --hostipc.

Clone this wiki locally