sys-gui and the cost of isolating the Qubes desktop

Moving the Qubes desktop into sys-gui separates the interface from dom0’s administrative authority. It also separates it from the local tools and hardware access that make dom0 useful as an administrative desktop.

Which GUI domain?

The Qubes 4.3 guide describes three arrangements:

ArrangementPhysical graphicsDesktop
Hybrid sys-guiGPU and physical X server remain in dom0GUI VM displayed fullscreen through a nested display path
sys-gui-gpuGPU passed through to the GUI VMDesktop uses the assigned hardware
sys-gui-vncVirtual displayDedicated remote desktop

The tested setup used Qubes OS 4.3 and hybrid sys-gui with x0vncserver sharing its existing desktop. It was not GPU passthrough or the stock sys-gui-vnc recipe.

Hybrid mode moves the desktop environment and GUI daemons out of dom0. It does not remove dom0’s physical graphics stack. GPU passthrough changes that boundary, but does not provide general GPU acceleration to application qubes.

The boundary it actually protects

A GUI domain is trusted with the windows and input of its assigned qubes. Compromising it can expose displayed secrets, spoof the interface, and inject commands through applications. Administrative permissions can give it additional direct control.

That does not make GUI isolation pointless. There is still a difference between controlling an application’s interface and executing arbitrary code in dom0. Keeping complex desktop software outside the administrative domain can preserve that second boundary.

The problem is maintaining it while making the desktop useful for administration.

The official recipe defaults to global Admin API rwx. Those permissions can be reduced to ro, but that does not make the whole GUI domain read-only: the common Salt policy also grants local management permissions over itself and assigned qubes.

Upstream tracks the difficulty of providing useful partial administration without effective dom0-shell access.

The competing requirements are:

  • The administrator should be able to manage the system from sys-gui.
  • Compromising sys-gui should not give the attacker control of dom0.

Giving the GUI VM unrestricted administrative access resolves the usability problem by weakening the intended boundary. Restricting it means some operations need separate, narrowly scoped interfaces.

Administration stops being local

A script written for dom0 may assume it can call an administrative executable, inspect host state, edit a local policy file, or control a physical device. Running that script in sys-gui changes what “local” means.

Some operations work through the Admin API, subject to policy. Others need new RPC services or a different workflow. Installed frontends do not necessarily have the backends they expect.

The updater on this installation demonstrated the distinction:

  • The frontend failed to create /var/log/qubes/qui.updater.log as the desktop user.
  • qubes-vm-update was absent.
  • qubes-dom0-update was absent.

Making the log directory writable would fix only the first problem. Running the frontend with sudo would not create a missing cross-domain update backend.

The official guide still lists dom0 updates as a known issue. The update architecture discussion explains why this is more than a launcher-permission problem. These particular failures were observed locally; they are not a claim that every GUI-domain installation fails identically.

The same applies to automation. A dom0 script does not become a safe distributed administrative service merely because it is invoked from another VM.

Host integrations are not turnkey

Moving the desktop does not move the hardware interfaces it relies on. Battery status, brightness controls, lid handling, and power actions still need information or cooperation from the domain that owns the relevant hardware.

Some integration helpers exist, but sys-gui is not a complete out-of-the-box replacement for dom0’s desktop integration. Expect additional services, qrexec policies, and configuration. Where a suitable interface is missing, someone has to implement and maintain it.

Getting these integrations right is harder than forwarding a few values or exposing a command. Each interface needs appropriate permissions, validated requests, robust handling of responses and failures, and behavior that survives changes on either side.

A narrow read-only RPC can preserve a useful boundary. Replacing it with a generic dom0 shell avoids the integration work by granting much broader authority.

Settings can affect the wrong layer

The physical keyboard passed through multiple layers: dom0’s X server, the GUI VM’s virtual display stack, and the inner desktop. Remote input entered through another path.

Keyboard repeat was disabled inside the GUI VM but remained enabled in dom0. The inner setting could not undo repeated events already generated upstream.

Other settings have similar ownership problems:

  • Physical touchpad and input-device properties belong to the layer handling the device.
  • Display hotplug and physical monitor modes belong to the hardware owner.
  • Brightness, lid events, suspend, and host shutdown need explicit integration.
  • Qubes GUI shortcut defaults belong to the actual hosting GuiVM; dom0’s values do not simply follow the desktop.

Making a settings application visible does not move its hardware or administrative backend into the VM. The GUI-domain integration tracker covers several of these gaps.

Remote access and physical locking are separate problems

x0vncserver shares an existing X display. It does not create a second independent user session.

Locking the inner sys-gui desktop locks what the remote viewer sees too. Disconnecting VNC does not inherently lock that desktop. Suspending the host stops remote work regardless of where the GUI runs.

Physical-only locking requires locking an outer layer while leaving the shared desktop running.

One candidate is switching to a local text console with Ctrl+Alt+F2 and running this as the normal dom0 user, not inside an AppVM:

vlock --all

According to the vlock manual, this locks the console and disables VT switching without logging out the graphical session.

It is not a universal guarantee that VNC will remain usable. A physical X server on an inactive VT can behave differently from a virtual display. Test while physically present, with saved work and a known unlock password. Check both that local VT switching is blocked and that live remote rendering and input continue.

This lock-and-capture combination was not validated during this setup. Existing authenticated consoles also need to be accounted for.

The simpler remote-access compromise

For a workstation heavily dependent on dom0 administration, keeping the ordinary desktop can be the lower-maintenance choice:

remote viewer
    │ Tailscale
    ▼
rc-forwarder
    │ qubes.ConnectTCP
    ▼
dom0: loopback VNC server → existing Xfce desktop

This does not require giving dom0 a normal network connection. It does expose a server running in dom0 to forwarded remote requests. A vulnerability in that server can affect the host; authenticated desktop access also carries the administrator’s practical authority.

That is an explicit security tradeoff, not equivalent isolation under another name.

The relevant controls are:

  • Run the server as the desktop user, with authentication and a loopback-only listener.
  • Permit only the intended source qube and service port in qrexec policy.
  • Restrict the forwarding VM’s listener to authorized VPN access. The stock qvm-connect-tcp helper can bind all IPv4 addresses, so do not assume it is loopback-only.
  • Test that non-VPN access is blocked.
  • Treat the viewer and forwarding VM as trusted components.

Classic VncAuth uses only the first eight password characters and does not encrypt the desktop stream. Tailscale protects traffic to the forwarding VM, but that VM can still access the VNC stream. Removing that trust requires authenticated end-to-end encryption to the VNC server, with the viewer validating the server’s identity.

The earlier remote-administration post covers the forwarding architecture. It is a separate design from placing the whole desktop inside a GUI VM.

Returning to dom0 is not live migration

In dom0, restore the global default and inspect per-qube assignments:

qubes-prefs default_guivm dom0
qvm-ls --fields NAME,STATE,GUIVM

Explicit assignments can still point to sys-gui. For each affected qube, replace work-qube with its actual name:

qvm-prefs work-qube guivm dom0

Include templates and disposable bases in the review. Changing the global default does not override an explicit per-qube setting.

Save work and plan normal restarts of affected qubes. Do not stop the old GUI VM while it still hosts unsaved graphical sessions. Select Xfce, rather than GUI Domain (sys-gui), at LightDM.

Once it is no longer needed at boot:

qvm-prefs sys-gui autostart false

Verify the replacement remote path before retiring the GUI VM. If the forwarding VM does not autostart, a working VNC desktop entry alone will not make remote access available after reboot.

Should you use sys-gui?

For a daily workstation used to administer Qubes, I would keep the desktop in dom0 rather than treat hybrid sys-gui as a drop-in replacement. If your workflow depends on dom0 scripts, hardware controls, and direct host administration, sys-gui replaces working local interfaces with integration work. Moving the desktop alone does not provide an equivalent administrative environment.

Use sys-gui when keeping desktop or remote-access software outside dom0 is an explicit security objective, and you can accept a restricted desktop, perform host administration separately, or maintain the necessary narrow interfaces. With appropriately restricted permissions, that separation has real value. Giving the GUI VM unrestricted dom0 access to recover convenience weakens the reason for moving it.

If you only need remote access, sys-gui is not required. Forwarding to a desktop server in dom0 is simpler, but exposes host-side software to remote requests and gives the remote session the desktop user’s authority. Choose that arrangement only if you accept the added host-compromise risk.

Use sys-gui for a boundary you intend to preserve, not as a turnkey way to make dom0 remotely accessible without its security costs.