Skip to content

rdesktop Base Images from LinuxServer

The purpose of these images is to provide a full featured rdesktop Linux desktop experience for any Linux application or desktop environment. They ship with passwordless sudo to allow easy package installation, testing, and customization. By default they have no logic to mount out anything but the users home directory, meaning on image updates anything outside of /config will be lost.

Options

All application settings are passed via environment variables:

Variable Description
LC_ALL Set the Language for the container to run as IE fr_FR.UTF-8 ar_AE.UTF-8
NO_DECOR If set the application will run without window borders. (Decor can be enabled and disabled with Ctrl+Shift+d)
NO_FULL Do not autmatically fullscreen applications when using openbox.

Language Support - Internationalization

The environment variable LC_ALL can be used to start this image in a different language than English simply pass for example to launch the Desktop session in French LC_ALL=fr_FR.UTF-8. Some languages like Chinese, Japanese, or Korean will be missing fonts needed to render properly known as cjk fonts, but others may exist and not be installed. We only ensure fonts for Latin characters are present. Fonts can be installed with a mod on startup.

To install cjk fonts on startup as an example pass the environment variables(Debian):

-e DOCKER_MODS=linuxserver/mods:universal-package-install
-e INSTALL_PACKAGES=fonts-noto-cjk
-e LC_ALL=zh_CN.UTF-8

Available Distros

All base images are built for x86_64 and aarch64 platforms.

Distro Current Tag
Alpine alpine320
Arch arch
Debian debianbookworm
Fedora fedora40
Ubuntu ubuntunoble

PRoot Apps

All images include proot-apps which allow portable applications to be installed to persistent storage in the user's $HOME directory. These applications and their settings will persist upgrades of the base container and can be mounted into different flavors of rdesktop containers. IE if you are running an Alpine based container you will be able to use the same /config directory mounted into an Ubuntu based container and retain the same applications and settings as long as they were installed with proot-apps install.

A list of linuxserver.io supported applications is located HERE.

I like to read documentation

Building images

Application containers

Included in these base images is a simple Openbox DE and the accompanying logic needed to launch a single application. Lets look at the bare minimum needed to create an application container starting with a Dockerfile:

FROM ghcr.io/linuxserver/baseimage-rdesktop:alpine320
RUN apk add --no-cache firefox
COPY /root /

And we can define the application to start using:

mkdir -p root/defaults
echo "firefox" > root/defaults/autostart

Resulting in a folder that looks like this:

├── Dockerfile
└── root
  └── defaults
    └── autostart

Now build and test:

docker build -t firefox .
docker run --rm -it -p 3389:3389 firefox bash

On rdp port 3389 you will be presented with a fullscreen firefox window.

This similar setup can be used to embed any Linux Desktop application in an rdp accesible container.

If building images it is important to note that many application will not work inside of Docker without --security-opt seccomp=unconfined, they may have launch flags to not use syscalls blocked by Docker like with chromium based applications and --no-sandbox. In general do not expect every application will simply work like a native Linux installation without some modifications

In container application launching

Also included in the init logic is the ability to define application launchers. As the user has the ability to close the application or if they want to open multiple instances of it this can be useful. Here is an example of a menu definition file for Firefox:

<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="root-menu" label="MENU">
<item label="xterm" icon="/usr/share/pixmaps/xterm-color_48x48.xpm"><action name="Execute"><command>/usr/bin/xterm</command></action></item>
<item label="FireFox" icon="/usr/share/icons/hicolor/48x48/apps/firefox.png"><action name="Execute"><command>/usr/bin/firefox</command></action></item>
</menu>
</openbox_menu>

Simply create this file and add it to your defaults folder as menu.xml:

├── Dockerfile
└── root
  └── defaults
    └── autostart
    └── menu.xml

This allows users to right click the desktop background to launch the application.

Full Desktop environments

When building an application container we are leveraging the Openbox DE to handle window management, but it is also possible to completely replace the DE that is launched on container init using the startwm.sh script, located again in defaults:

├── Dockerfile
└── root
  └── defaults
    └── startwm.sh

If included in the build logic it will be launched in place of Openbox. Examples for this kind of configuration can be found in our rdesktop repository

Open Source GPU Acceleration

For accelerated apps or games, render devices can be mounted into the container and leveraged by applications using:

--device /dev/dri:/dev/dri

This feature only supports Open Source GPU drivers:

Driver Description
Intel i965 and i915 drivers for Intel iGPU chipsets
AMD AMDGPU, Radeon, and ATI drivers for AMD dedicated or APU chipsets
NVIDIA nouveau2 drivers only, closed source NVIDIA drivers lack DRI3 support

Nvidia GPU Support

Nvidia is not compatible with Alpine based images

Nvidia support is available by leveraging Zink for OpenGL support. This can be enabled with the following run flags:

Variable Description
--gpus all This can be filtered down but for most setups this will pass the one Nvidia GPU on the system
--runtime nvidia Specify the Nvidia runtime which mounts drivers and tools in from the host

The compose syntax is slightly different for this as you will need to set nvidia as the default runtime:

sudo nvidia-ctk runtime configure --runtime=docker --set-as-default
sudo service docker restart

And to assign the GPU in compose:

services:
  myimage:
    image: myname/myimage:mytag
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [compute,video,graphics,utility]

The following line is only in this repo for loop testing: - { date: "01.01.50:", desc: "I am the release message for this internal repo." }