Sign inSign up

crashvb/x11

By crashvb

•Updated over 3 years ago

Contains fluxbox, novnc, x11vnc, and xvfb.

Image
0

1.8K

crashvb/x11 repository overview

⁠x11-docker

⁠Overview

This docker image contains:

It is intended to be base image for derivations, or to be used directly.

⁠Overriding embedded defaults

The image can be rebuilt using the following arguments:

ArgumentDefault ValueDescription
display_height1024The height of the X server display.
display_width1280The width of the X server display.
number_display27The display number used by the X server.
number_screen0The screen number used by the X server.

The following environment variables can be defined for containers:

VariableDefault ValueDescription
DISPLAY<number_display>.<number_screen>The X11 display to which client applications will connect.
DISPLAY_GEOMETRY<display_width>x<display_height>The geometry of the X server.
NUMBER_DISPLAY<number_display>The display number used by the X server.
NUMBER_SCREEN<number_screen>The screen number used by the X server.

⁠Forwarding a window(s) to the embedded X server

These steps assume that we are forwarding xclock from the docker host using to the embedded X server, in a container named x11-SNAPSHOT, using display 25.0 externally, and display 27.0 inside of the container.

  1. Determine the port number to expose and port number as which to publish it. X11 ports start at 6000 (e.g. DISPLAY=27.0 --> port 6027), so for this example we would run the container with the --publish=6025:6027/tcp argument.
  2. Retrieve the magic cookie from the container:
$ magic_cookie=$(docker exec -it x11-SNAPSHOT bash -c "xauth list | grep \$(hostname)" | awk '{print $3}')
  1. On the host forwarding the window, assign the display and magic cookie:
$ export DISPLAY=localhost:25.0
$ xauth add ${DISPLAY} . ${magic_cookie}
  1. Launch the desired application.
  2. When finished, remove the magic cookie:
xauth remove ${DISPLAY}
  1. xauth list can be used to verify magic cookies at any point.

⁠Entrypoint Scripts

⁠fluxbox

The embedded entrypoint script is located at /etc/entrypoint.d/fluxbox and performs the following actions:

  1. The configuration is modified from the following environment variables:
VariableDefault ValueDescription
ENABLE_FLUXBOXundefinedIf undefined, fluxbox will not be instantiated.
⁠websockify

The embedded entrypoint script is located at /etc/entrypoint.d/websockify and performs the following actions:

  1. The configuration is modified from the following environment variables:
VariableDefault ValueDescription
ENABLE_NOVNCundefinedIf undefined, noVNC / websockify will not be instantiated.
⁠x11

The embedded entrypoint script is located at /etc/entrypoint.d/x11 and performs the following actions:

  1. The .Xauthority file is generated from the following environment variables:
VariableDefault ValueDescription
NUMBER_DISPLAY27The display number used by the X server.
⁠x11vnc

The embedded entrypoint script is located at /etc/entrypoint.d/x11vnc and performs the following actions:

  1. The PKI certificates are generated or imported.
  2. A new x11vnc configuration is generated using the following environment variables:
VariableDefault ValueDescription
X11VNC_CERT_DAYS30Validity period of any generated PKI certificates.
X11VNC_KEY_SIZE4096Key size of any generated PKI keys.

⁠Healthcheck Scripts

⁠fluxbox

The embedded healthcheck script is located at /etc/healthcheck.d/fluxbox and performs the following actions:

  1. Verifies that the fluxbox window manager is operational, if enabled.
⁠websockify

The embedded healthcheck script is located at /etc/healthcheck.d/websockify and performs the following actions:

  1. Verifies that the websockify server is operational, if enabled.
⁠x11vnc

The embedded healthcheck script is located at /etc/healthcheck.d/x11vnc and performs the following actions:

  1. Verifies that the x11vnc server is operational.
⁠xvfb

The embedded healthcheck script is located at /etc/healthcheck.d/xvfb and performs the following actions:

  1. Verifies that the X11 virtual frame buffer server is operational.

⁠Standard Configuration

⁠Container Layout
/
├─ etc/
│  ├─ entrypoint.d/
│  │  ├─ x11
│  │  └─ x11vnc
│  └─ healthcheck.d/
│     ├─ fluxbox
│     ├─ websockify
│     ├─ x11vnc
│     └─ xvfb
├─ root/
│  └─ .Xauthority
├─ run/
│  └─ secrets/
│     ├─ x11vnc.crt
│     ├─ x11vnc.key
│     └─ x11vncca.crt
├─ tmp/
│  └─ .X11-unix/
└─ usr/
   └─ share/
      └─ novnc/
⁠Exposed Ports
  • 5800/tcp - noVNC listening port.
  • 5900/tcp - VNC listening port.
⁠Volumes

None.

⁠Development

Source Control⁠

Tag summary

Content type

Image

Digest

sha256:524df83a1…

Size

172.8 MB

Last updated

over 3 years ago

docker pull crashvb/x11