Requirements and behavior
The X11 backend creates a private Xvfb display, D-Bus, desktop, and agent for each session. It is a practical starting point for a headless host without a GPU or local login. Xvfb renders applications in software; installing a GPU does not turn it into a hardware-rendered display.
First install TMD Server, normally with --no-console-session, as its root system service. The installer supplies the tmd-virtual PAM policy for recognized distributions. An ordinary desktop owner account and a functioning PAM configuration are required.
1. Install Xvfb and Xfce
On Ubuntu 24.04:
sudo apt install --no-install-recommends \
xvfb xauth x11-utils x11-xserver-utils dbus-daemon dbus-x11 \
xfce4 xfce4-terminal fonts-dejavu-core
A display manager and physical monitor are not required. Other distributions need their equivalent packages.
2. Select an explicit desktop command
Keep the installed generic startup script and create a separate Xfce script:
sudo tee /etc/tmd/server/virtual-session-xfce.sh >/dev/null <<'EOF'
#!/bin/sh
unset WAYLAND_DISPLAY SESSION_MANAGER
export XDG_SESSION_TYPE=x11
export XDG_CURRENT_DESKTOP=XFCE
export XDG_SESSION_DESKTOP=xfce
export DESKTOP_SESSION=xfce
exec /usr/bin/startxfce4
EOF
sudo chmod 755 /etc/tmd/server/virtual-session-xfce.sh
The foreground process must stay alive for the desktop's lifetime. TMD supplies the private display, Xauthority, D-Bus address, and runtime directory. Do not replace those with the physical console's environment or start a second Xvfb.
3. Configure the backend
Merge into [session-management] in /etc/tmd/server/tmd.conf, retaining the console policy chosen at installation:
[session-management]
virtual-session-backend = x11
virtual-session-init = /etc/tmd/server/virtual-session-xfce.sh
virtual-session-xserver = /usr/bin/Xvfb
virtual-session-pam-service = tmd-virtual
virtual-session-width = 1920
virtual-session-height = 1080
Apply before starting desktops:
sudo systemctl restart tmdserver
4. Create and connect
sudo tmdtool create-session work --owner alice --type virtual
sudo tmdtool describe-session work --json
Wait for state: active and a registered agent, then browse to https://tmd.example.com:8191/#work and authenticate as alice. Create more desktops with different IDs. Use different Unix accounts for different users.
5. Set boot policy and operate
By default, the definition survives reboot but its desktop does not automatically start. Enable autostart only when intended:
sudo tmdtool set-session-autostart work --enable
Use stop-session to end applications while keeping the definition, start-session to start it again, or close-session to remove it. Closing the viewer leaves the desktop running.
Limitations and startup failures
- Virtual audio and viewer-driven display resizing are not implemented. Choose the initial width/height before startup.
- Desktops under the same Unix owner share that owner's home directory and some OS resources.
- TMD registers the PAM supervisor as a background session without a physical seat or VT, preserving the separate physical-login context.
- GNOME on some Xvfb/Mutter versions can start black with an X-shaped cursor. Use the explicit Xfce script, a corrected Mutter package, or the Wayland virtual backend.
For failed sessions, inspect the server journal and agent log, confirm Xvfb and the script are executable, fix the cause, then use start-session work. Restarting only an agent will not repair a stalled desktop compositor.