Console and virtual sessions
Every viewer needs an active registered TMD session. A definition's ID selects the desktop; the OS account authenticates the user. The current access model authorizes the stored owner, rather than an additional per-session user list.
| Property | Console | Virtual |
|---|---|---|
| Platforms | Windows, Linux, macOS | Linux only |
| Desktop | Existing physical console | Private X11 or GNOME Wayland desktop |
| Creating its definition | Does not sign the user into the OS | create-session requests desktop startup |
| Viewer disconnect | Leaves the OS desktop running | Leaves desktop applications running |
| After service restart | Becomes available when the matching console is available | Starts only if autostart is explicitly enabled |
Create a console definition
Examples below use Linux's tmdtool symlink. On macOS use /Library/TMDServer/tmdtool; on Windows use an elevated terminal and tmdtool.exe without sudo.
sudo tmdtool list-sessions --json
sudo tmdtool create-session console --owner alice --type console
sudo tmdtool describe-session console --json
Create only if the intended definition is absent. There can be one console definition, even if it has another ID. Linux/macOS require its owner to be the active console user. Windows can expose the physical login screen through its system-service agent.
Automatic console creation
On Unix, merge into /etc/tmd/server/tmd.conf:
[session-management]
create-session = 1
owner = alice
The server creates/reuses console at startup. An existing definition must have the same console type and owner. An incompatible owner, another console ID, or a virtual definition named console causes a conflict instead of silent reassignment.
The Linux server's built-in automatic-creation default is off; its installer can enable it for the detected or explicit non-root owner. macOS and Windows installers configure the service owner separately. Set create-session = 0 for fully manual administration. Numeric 1/0 are required.
Change the console owner
- Record the current definition and disconnect affected viewers.
- Disable automatic creation or change its configured owner so the next service start will not recreate the wrong definition.
- Close the old TMD definition and create the intended one.
- On macOS, install the GUI LaunchAgent from the new owner's logged-in account. On Linux/macOS, verify the actual graphical login belongs to that owner.
sudo tmdtool describe-session console --json
sudo tmdtool close-session console
sudo tmdtool create-session console --owner alice --type console
Use the actual old ID if it differs from console. Closing a console definition removes its TMD access and disconnects viewers; it does not log the user out of the OS. Editing owner alone does not rewrite a stored definition.
Manage a virtual desktop
After preparing its backend:
sudo tmdtool create-session work --owner alice --type virtual
sudo tmdtool describe-session work --json
sudo tmdtool stop-session work
sudo tmdtool start-session work
stop-session ends applications and retains the definition; start-session starts a new desktop. close-session removes both the runtime and its saved definition. define-session saves a definition without requesting startup.
Choose what happens after reboot
sudo tmdtool set-session-autostart work --enable
sudo tmdtool set-session-autostart work --disable
Choose one policy. New virtual definitions and definitions migrated from the older registry schema default to autostart disabled. --autostart can enable it at creation. Changing this policy does not start or stop the current desktop; stopping a desktop does not disable an already enabled autostart policy.
To keep a virtual desktop stopped across server restarts:
sudo tmdtool set-session-autostart work --disable
sudo tmdtool stop-session work
loginctl terminate-session affects an OS session but does not remove TMD's definition or its explicit autostart policy. Prefer TMD's commands for normal administration.
Agent recovery and desktop failure
An agent crash can restart only the agent, retaining desktop applications and existing viewer connections while traffic pauses. Desktop logout, compositor/display failure, server shutdown, or closing the definition ends the desktop runtime. Correct a failed virtual desktop's cause, then use start-session.