Skip to content

Desktop access

A desktop app is useful because it talks to the rest of the desktop: it draws windows, plays sound, opens files you choose, sends notifications, reaches the network. Each of these is a channel to something outside the jail, and each channel is also a way out: the same socket that lets an app draw a window may let it capture the screen; the same bus that carries a notification can reach the service that runs commands. This part explains each channel, what an unrestricted one would allow, and how appjail narrows it.

The channels

The channels between an app jail and the desktop The app jail on the left; each channel to the desktop on the right passes a check or a helper that narrows it: the registry rule on the Wayland socket, a private Xwayland inside the jail, the D-Bus proxy in its own jail, the portal identity, the private audio graph in its own jail, pasta for the network, and only the device nodes granted. App jail the app, and inside it a private Xwayland for X11-only apps registry rule no privileged interfaces compositor (Wayland) D-Bus proxy (own jail) only the granted names session bus portal identity app.appjail.NAME, safe set desktop portals private audio graph a speaker; a mic only with mic your audio server pasta outbound only, not your host the internet device binds render nodes, capture nodes GPU, camera menu entry by appjail appjail run, one file per open application menu
Only the window channel exists by default. Every other channel exists only when the manifest grants it, and always passes through the narrowing shown in the middle.

The pages

  1. Wayland: the display protocol, its privileged interfaces, and the rule that reads what the app's socket offers.
  2. X11 and the private Xwayland: why the host's X server is never shared, and how X11-only apps get a server of their own.
  3. D-Bus and the filtering proxy: the session bus, why names alone are not enough, and confined services.
  4. Portals: dialogs the app does not control, and how the portals recognise a jailed app.
  5. Audio: why the host's sound sockets cannot be shared, and the private graph each app gets instead.
  6. GPU and camera: which device nodes are bound, and why only those.
  7. Network: the private network namespace, the host network, and the LAN.
  8. Menu entries and opening files: integrating with the desktop's menu without letting the AppImage decide what runs.

How-to pages: D-Bus and portals, Appearance. The decisions behind this part are in Decisions: desktop access.

A pattern across the channels

Three ideas recur on every page:

  • What decides is what the channel lets a client do, measured where possible, not what a name or a protocol promises. The Wayland rule reads the socket's registry; the D-Bus check reads who owns a name; the audio graph is inspected after it starts.
  • Where the host cannot restrict a client, appjail gives the app a private copy of the service instead of a share of the host's: a private Xwayland, a private audio graph, a private network namespace.
  • The host's services trust their clients by identity, and an app in a jail has none they recognise. PipeWire and xdg-desktop-portal restrict only clients they know to be sandboxed (Flatpak, Snap). That fact shapes the audio, camera and portal designs.