Products › lamco-dsi-tools › Docs › dsido reference

dsido reference

Every dsido command, the one input vocabulary on every route, and the kernel route with its helper.

dsido is the program of lamco-dsi-tools (DSI: Desktop session interfaces) that drives. Every dsido command changes the machine, and every one writes a capture of what it did (--json, --out <file>), which dsitell reads like any other. It takes the same global flags as dsisee (--json, --out, --timeout, --junit, --verbose), before or after the command.

The man pages (dsido(1) and one per command) and dsido help <command> hold the full text.

Commands

CommandGatesWhat it does
eis inject <action>[dialog] [side effects]Injects through libei: Opens a RemoteDesktop portal session, takes the libei socket, answers the done of each device at version 3 or later of ei_device with ready (recorded as device_ready_sent), waits until a resumed device has each interface the action needs, and sends each step as one libei frame. The dialog isn't shown when a restore token given with --restore-token <file> is taken by the portal; --persist asks for one. eis feature.
wlr inject <action>[side effects]Injects as a Wayland client through zwp_virtual_keyboard_manager_v1 and zwlr_virtual_pointer_manager_v1, which wlroots compositors offer. No dialog. It has no touch: Neither protocol sends one. input feature.
kernel inject <action>[privileged] [side effects]Injects through a uinput device that the dsido-uinput helper creates, which for a touch is a touchscreen with multitouch slots. Needs the right to open /dev/uinput. kernel feature.
eis replay, wlr replay, kernel replay <capture>As the route's injectSends the action an injection capture recorded again, through that route. The capture may come from any route and any machine.
input-capture enable[dialog] [side effects]Opens the InputCapture session dsisee input capture opens, then enables it: The pointer is taken when it crosses a barrier, each activation the portal reports is recorded, and the input is given back at once with Release. eis feature.
clipboard set [text][side effects]Makes marked content the selection through the route the desktop offers, holds it, and records each time a reader asks for it, with when it was asked and when the content had been written. The capture holds the content's length and SHA-256 and never the content. What was on the clipboard is replaced and not put back. The portal route shows a permission dialog. clipboard feature.
output set[side effects]Changes an output's mode, scale or transform through the interface the desktop has for it, tests it first where the interface has a test, holds it, and always applies the prior state again. outputs feature. See below.
screen animate[side effects]Opens a window that presents a frame at --rate frames a second, each with a screen marker that encodes the frame's number, and records each commit with the tick it was due at, each frame callback, each presentation feedback, and the ticks it missed itself. input feature.
audio play[side effects]Plays a short marked sound into a sink and records each buffer the graph asked for, with when it was asked for and when it was handed back, the frame each marker begins at, and the delay the stream reported for itself. In a build without the pipewire feature the command is there and ends as not available.
load cpu[side effects]Keeps --workers threads busy for --duration, each counting in a plain loop, and records the machine's state from /proc before and after, each worker with both its stamps and how far it counted, and the processor time the instrument's own process used. No stress tool is called. In every build.
load memory[side effects]Allocates --mb megabytes, writes to every page of it, holds it for --duration, and records the same. A size larger than /proc/meminfo lists as available is refused before anything is allocated. In every build.
session inhibit[side effects]Takes the idle inhibitors a long run needs, holds them for --duration, and gives them back. It asks logind's Inhibit for idle in block mode, and org.freedesktop.ScreenSaver.Inhibit where a service of the session owns that name and its object declares the call. In every build. See Long runs and load.
help [<command>]Command help.

One vocabulary on every route

dsido <eis|wlr|kernel> inject key <name>
dsido <eis|wlr|kernel> inject text <text>
dsido <eis|wlr|kernel> inject click [--at x,y] [--button left|right|middle]
dsido <eis|wlr|kernel> inject move --at x,y | --by dx,dy
dsido <eis|wlr|kernel> inject scroll --by dx,dy
dsido <eis|kernel> inject touch tap --at x,y
dsido <eis|kernel> inject touch drag --at x,y --to x,y [--steps n] [--step-ms ms]

An action is turned into steps, which are what goes on the wire (a key or a button going down or up, a motion, a turn of the wheel, a finger going down, moving and coming up), and every route sends the same steps for the same action. --at is a position inside --extent (default 1920,1080). scroll --by is in wheel notches, and positive is right and down. An action that isn't well formed ends the command with exit code 2 before anything is opened.

Keys are kernel key codes, and a character is turned into the key that produces it on a US layout by one table that all three routes share. A character with no key in it is refused: Left out, and named in the capture with why. What a key then produces is a keymap's decision, and each route records whose.

RouteWhose keymapWhat dsido does about it
wlrThe one its client uploads. A virtual keyboard has none until thenUploads the US layout (rules evdev, model pc105, layout us) as an XKB keymap the compositor compiles, and records the text. The keys then produce what the table says whatever the desktop's own layout is. It also sends the modifier state, which a compositor doesn't work out for a virtual keyboard
eisThe compositor's. The libei keyboard device announces it as a file descriptorRecords that it was announced, with its format and size, and doesn't read it. On a layout other than US the text that appears differs
kernelThe compositor's active layout, applied to the key codes of a kernel deviceRecords that nothing on this route can read it

dsido wlr inject --layout <us|gb|de|fr> uploads that layout's keymap and types a text with the keys the layout has its characters on, the third level with the right Alt key. The tables are generated from the xkeyboard-config symbols files. A character that's only on a dead key of the layout, as the circumflex on de, is refused and said to be that; no sequence of keys is composed.

Flags of the inject commands

FlagRoutesEffect
--at <x,y>allclick, move, touch: An absolute position inside --extent. touch drag: Where the finger goes down.
--to <x,y>eis, kerneltouch drag: Where the finger comes up.
--steps <n>eis, kerneltouch drag: How many motions the way is sent as (default 10, at most 1000).
--step-ms <ms>eis, kerneltouch drag: The pause after each motion (default 10, from 1 to 1000).
--by <dx,dy>allmove: A relative motion. scroll: Wheel notches.
--button <left|right|middle>allclick: The button (default left).
--extent <w,h>allThe area absolute positions are in (default 1920,1080).
--wait-witness <duration>allSend nothing until a dsisee input witness window says it has the keyboard focus, for this long at most, and nothing at all when none has it by then. For a touch, also wait until the witness's seat has touch.
--layout <layout[,variant]>wlrThe keyboard layout to upload and type a text on (us, gb, de, fr; default us).
--settle-mseis, kerneleis: For a touch, the time the touchscreen device is given after it starts emulating (default 200, at most 5000). kernel: The time the new device is given before the first step (default 500).
--settle-after-mskernelHow long the device is kept after the last step (default 250).
--helper <path>, --elevate-with <program>kernelThe helper program, and a program to start it with.
--dialog-timeout, --persist, --restore-token <file>eisThe wait for the dialog (default 120), and the portal's restore token.

Touch

touch is one finger on a touchscreen. tap puts it down at --at, holds it 30 ms and lifts it. drag puts it down at --at, moves it to --to along a straight line in --steps motions, each a frame of its own with --step-ms after it, and lifts it there. Several fingers at once aren't in the vocabulary, but every step carries the touch point's number (touch_id, always 0), so the records need no new form when they are.

RouteWhat it has for touch
eislibei's ei_touchscreen. Since the protocol has a touch that goes down outside the device's regions discarded, --extent is scaled onto the bounding box of the regions, and each step's record holds where it was sent, whether that's inside a region and how it was placed. For a touch, and only then, the portal session selects the touchscreen with the keyboard and the pointer. The capture holds what Start granted beside what was selected. A session that wasn't granted the touchscreen, or among whose devices none announced the interface in ten seconds, ends as not available and says which. Before the first touch step the device is given --settle-ms (a settle record), or with --wait-witness the command waits until a witness's note says its seat has touch (touch_wait).
kernelA device of its own kind that the helper creates: A touchscreen in the kernel's multitouch protocol B, with ten slots (ABS_MT_SLOT, ABS_MT_TRACKING_ID, ABS_MT_POSITION_X, ABS_MT_POSITION_Y), BTN_TOUCH and INPUT_PROP_DIRECT, and nothing of a keyboard or a pointer. A touch_mapping record holds the range the position axes advertise. Which output the desktop maps the touchscreen to is recorded as not read, since nothing on this route says.
wlrNone. A touch is refused as not available before anything is opened.

A touch that had no touchscreen to go through is the finding INPUT-012. A touch the libei route sent to a position in no region of its device is INPUT-013. Touch was changed after the runs of 2026-11-28, and the project's record of runs, reconciled on 2026-12-04, has runs made after those changes, on 2026-11-29: Through the kernel route, a tap and a drag delivered on GNOME Shell 48.7 and on KWin 6.8.2, and through libei, a tap delivered on each. That record says what was delivered and doesn't say whether the settle and touch_wait records, --settle-ms or the kernel route's wait took part. See also What has been run.

What a capture of an injection holds

The action as asked for, each step as it was sent, and a keymap record. A step has the instrument's time before the request was written (requested) and after the write or flush returned (sent), and the protocol's own time where the protocol carries one: The libei frame's timestamp, or the time argument of a virtual device request. The steps are numbered from zero, which is what dsitell loop pairs with the events of a witness. The capture is written also when the route fell short, with the injector listed as failed, refused or not available, and the command still ends as a failure. No command checks that the desktop acted on what it sent: That's what dsisee input witness and dsitell loop are for.

Replaying a recorded action

A capture dsido <route> inject wrote holds what was asked for in its action record: The word, the key or text or position, and the extent. dsido <route> replay <capture> reads that record and sends the action again through the route it's called on, which needn't be the route the capture came through. The steps of an action are planned from the action alone, so the same action is the same steps with the same pauses: The stimulus is the same, and the response is whatever the desktop under it gives.

Nothing else is taken from the old capture: Not its steps, its times or its keymap. The new capture's action record has one more field, replay_of, with the route the replayed capture came through, the version that wrote it and when it was closed. The old file's name isn't recorded. A file that isn't a capture, a capture that holds no injection, and one that holds more than one action are refused with exit code 2 before anything is opened.

dsido wlr inject text "hello" --out sway-inject.json        # on Sway
dsido eis replay sway-inject.json --out gnome-inject.json   # the same action on GNOME, through libei
dsitell compare sway-inject.json gnome-inject.json          # what differs, and each route's timing

The kernel route and its helper

dsido opens nothing itself. It starts dsido-uinput (looked for beside dsido, or named with --helper), hands it the steps as one line of JSON, and records what the helper reports.

The one right the helper needs is to open /dev/uinput for writing, and the kernel decides it. The helper first reports who it runs as and the node's owner and mode, then tries the open. A refusal is reported as refused with those facts, and a machine with no node as not available. The helper changes no permission, loads no kernel module and asks for no password. It takes no path, command or name from its request, and it refuses to run with an effective user or group other than its real one, which is what a set-user-ID installation would give it. --elevate-with <program> names the program that starts the helper (for example sudo), and that program asks whatever it asks.

The helper creates one device named dsido virtual input with only what the steps need, waits --settle-ms for the desktop to pick it up, writes the steps (each a frame that ends in SYN_REPORT), waits --settle-after-ms, and removes the device. Its input reaches every program that reads input devices. Each run makes a device of its own, so the desktop's seat gains and loses what the device brings each time. The capture holds the device's whole life in stamps, and a step's requested is read after the settle, so neither the settle nor the device's creation is in a figure of a step.

Limit of a requestBound
Protocoldsido-uinput-v4. A request of -v1, -v2 or -v3 is refused by name
RequestOne line, at most 1,048,576 bytes
StepsAt most 4096
PauseAt most one second each
SettleAt most five seconds before the first step, and at most five after the last
Key and button codesAt most KEY_MAX (0x2ff)
Relative motion and scrollingAt most 10000 for each step
ExtentAt most 65535 each way, never zero
Touch pointsNumbered 0 to 9

The helper's exit codes: 0 done, 1 failed, 2 not a request the helper takes (or an argument), 3 refused (it may not open the node, or was started set-user-ID or set-group-ID), 4 no /dev/uinput. SECURITY.md describes the helper step by step, and what it doesn't check.

The other commands' flags

CommandFlags
input-capture enable-d, --duration; --capabilities (default keyboard,pointer; also touchscreen); --dialog-timeout
clipboard set [TEXT]--primary sets the primary selection; --size <bytes> makes the content large by repeating it; --mime <type>; --hold <seconds> (default 10); --keep-content <bytes> (default 0); --route <auto|ext-data-control|wlr-data-control|portal>; --allow-dialogs; --dialog-timeout. With no text, the command makes up a marker
output set-o, --output <name> (default the first enabled output); --mode <WIDTHxHEIGHT[@HZ]>; --scale <factor>; --transform <normal|90|180|270|flipped|flipped_90|flipped_180|flipped_270>; --test-only; --hold <seconds> (default 5); --route <auto|wlr|mutter|kde>; --persistent (GNOME only)
screen animate-d, --duration (default 10); --rate <hz> (default 60, from 1 to 240); --pattern <marker|flash> (marker changes only the marker, flash the whole window); --fullscreen; -o, --output <name>; --soak, --soak-cap, --soak-progress; --inhibit-idle
audio play--node <id|name> names the sink (the default sink otherwise); --level <dBFS> (default -40); --repeat <count> (default 1); --interval-ms (default 1000); --lead-ms and --tail-ms (default 500 each); --latency <frames>, the buffer size to ask the graph for
load cpu--workers <n> (required); -d, --duration (default 30s, as 30s, 5m or 1h)
load memory--mb <m> (required); -d, --duration (default 30s)
session inhibit--what idle (default); -d, --duration (default 10m)

output set in detail

The interface is wlr-output-management on a wlroots compositor, Mutter's org.gnome.Mutter.DisplayConfig on GNOME, and kde_output_management_v2 on KWin, and the command says which it took and why. On each it reads the state, asks the desktop to test the change where the interface has a test, applies it only when the test succeeded, holds it for --hold seconds recording every event it causes, and applies the prior state again, also when the apply failed or a time limit or a signal ended the hold or the wait for an answer.

On GNOME the test is ApplyMonitorsConfig with the method verify, the apply uses temporary and never persistent unless --persistent asks, and nothing is sent until the signatures the running service declares have been held against those of Mutter's published interface file (OUT-008 when they differ). KWin's protocol has no test, so the change is applied untested and the capture says so. A restore the desktop hasn't answered or confirmed is said in the capture (OUT-004) and the command exits non-zero. --test-only applies nothing.

audio play in detail

The marker is a 2047-chip maximum length sequence from an 11-bit shift register with the feedback polynomial x^11 + x^2 + 1, each chip held for two samples: 4094 samples at 48 kHz of faint hiss at --level dB relative to full scale. It's made to be found to the sample by correlation, at any volume and under other sound, and it's made with integer arithmetic, so the driver and the watcher's detector compute the same samples and neither needs a file. It makes a sound, which is why it's in dsido. See Measuring for the audio loop.