-
-
Notifications
You must be signed in to change notification settings - Fork 6
Protocol Overview
Tuck edited this page Jun 28, 2026
·
3 revisions
Deskbrid communicates over a Unix domain socket:
/run/user/<UID>/deskbrid.sock
Clients send JSON commands terminated by newline, then read newline-delimited JSON responses.
{"type":"<action>", "<extra fields vary by action>"}All successful responses share the envelope:
{"type":"response","request_id":"...","status":"ok","data":{...}}Error responses use:
{"type":"response","request_id":"...","status":"error","error":{"code":"<code>","message":"<human text>"}}The project uses dot-notation action strings for runtime subscription and reply
typefields, but the daemon does not semantically dispatchevent.subscribeUI actions through the same path.
-
socket domain — actions like
windows.list,clipboard.read,system.info -
UI/Auth domain —
confirm.challenge,confirm.resolve,auth.elevate -
event subscription —
event.subscribe,event.unsubscribe
- Send
confirm.challengewith a challenge ID / prompt. - Present the challenge in the Dashboard / desktop UI.
- Send
confirm.resolvewith approval or rejection. - For elevated actions, send
auth.elevatewith the action ID, reason, and confirmation.
System-level system.* actions that mutate system state require authorization by default. The safer route is via the UI/confirm.challenge flow rather than by passing secrets over the socket.
| code | when |
|---|---|
invalid_params |
missing or invalid parameters |
not_found |
window / session / record missing |
permission_denied |
policy or auth check failed |
not_supported |
backend/desktop doesn’t support it |
backend_error |
compositor/backend error |
internal_error |
daemon error |
Subscribe with wildcard patterns:
{"type":"event.subscribe","events":["window.*"]}Unsubscribe:
{"type":"event.unsubscribe","events":["window.*"]}Events are newline-delimited JSON messages from the daemon:
{"type":"event","event":"window.focused","data":{"window_id":"...","app_id":"org.gnome.Terminal"},"timestamp":"..."}import socket, json
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
sock.connect("/run/user/1000/deskbrid.sock")
sock.send(b'{"type":"windows.list"}\n')
sock.send(b'{"type":"event.subscribe","events":["window.*"]}\n')- Accessibility
- Apps
- Audio
- Backlight (LED driver)
- Bluetooth
- Clipboard
- Color Picker
- Desktop Portal
- Desktop Settings
- Files
- Hotkeys
- Input
- Keyboard Layouts
- Media (MPRIS)
- Monitors
- Network
- Notifications
- Print (CUPS)
- Screenshots
- Screen Recording
- Screencast
- Self-Update
- System
- System Tray
- Systemd Units & Timers
- Terminals (PTY)
- Windows & Workspaces