Sys-net without X/gui

Is it possible to shrink the memory footprint of sys-net through disabling qubes-gui-runuser and still retain the ability to terminal/console into it? (yeah, I realized that xterm will no longer work)

I’d like to save the 100MB+ that X takes for very marginal benefit. I’m currently running that Qube on Debian-minimal.

Alternatively, can X be started on demand with xterm is started (and killed after xterm goes away)?

1 Like

It’s not mine but


Thanks! I looked into it before asking this question in the forums but liteqube is really a complete overhaul of Qubes OS and I’m more comfortable just running Qubes OS as it is, for the most part. I’d just like to get rid of some extra fat, like X on sys-net and sys-usb (already running mirage-firewall 8.0 for sys-firewall).

1 Like

You can connect to you qube console from dom0 with:
qvm-console-dispvm yourvm

Hi Flavio, have a look at

I use a minimal-template for my sys-vms, one needs to install a few packages i.e. network-manager for sys-net, and it works very nicely. I believe X is not (pre)installed.

1 Like

They have only the most vital packages installed, including a minimal X and xterm installation.


This is amazing. The reductions in RAM usage liteqube provides look cool. I feel like this can evolve into some sort of “QubesOS golf” in which people modify their minimal templates to the “no unnecessary package installed” setups.

Thanks! I use minimal Debian for those Qubes already, but X is installed (I guess because it’s required for xterm to run?).

Ah, good point! Perhaps I’ll just disable X for now and just use the terminal console to save some memory.

Are you going to uninstall X-minimal and xterm?

Could you post details (like dnf remove xyz or apt purge xyz) after getting your setup working flawlessly?

You can build standard templates without X, accessible only via console
access, by hacking on (e.g) builder-debian.
The benefit is very marginal, and the use case limited.
(I haven’t tried disabling qubes-gui-runuser.)

1 Like

In my fedora-minimal a dnf remove xterm would result in removing 455 Packages and many of those look crucial like qubes-core-agent-stuff. Similiar to dnf remove ImageMagick

I disabled qubes-gui-runuser yesterday with the following side effects:

  1. xterm doesn’t work (of course), but console works fine (it takes a bit longer to start the disposable VM, but it’s not big deal)
  2. the netmanager widget doesn’t display on the top bar anymore. Even though I like to know what wifi network I’m connected to from time to time, it really don’t mind reducing the memory footprint on that VM by another 100MB by losing that visual gimmick :slight_smile:

Total memory savings between X and the network manager widget are about 200MB or even a bit more.

Since my problem is not disk, I did not uninstall X or any packages, just prevent qubes-gui-runuser from running (or just kill it after it runs).

I may seem stingy, but still remember when my computer only had 1MB of RAM in total and I could only use 640K as normal memory (and do acrobatics to get another 120KB or so in EMM) :slight_smile:


So what is your final memory allocation for sys-net?

How is that done? I can’t find a qubes-gui-runuser.service or .socket in my sys-net. Google found qubes-gui-runuser mentioned in source code on github.

1 Like

I guess you need to disable qubes-gui-agent.service.

1 Like

I’m interested in your setup too, how much your ram allocation for sys-net ?

1 Like

Allocation doesn’t tell the full picture because swapping is not included there. Even with swappiness set to 1, with X and 600GB of max memory, the VM ends up swapping about 100MB (and I really don’t like swapping because it will end up wearing out my nvme faster, but I don’t want OOM conditions either).

sudo killall qubes-gui-runuser at the beginning works for me too. I don’t care about the max-mem allocation, since ballooning will move that memory around as needed, but I do care about actual utilization and swapping.

Without X, memory utilization hovers around 200MB on average. Compare this to the meager 64MB that Mirage-firewall takes :slight_smile:

Again, to prevent swapping (but allow it if absolutely necessary), you can always set swappiness to 1. And max memory can be still set to a generous 600MB or so, since that memory can always be reclaimed as needed.


If I remember correctly that my minimal fedora sys-net is only 100-150MB without disabling any service or removing package like you do. Can you provide what package have you install to setup debian minimal ? Instead of using network manager widget, I don’t install those and use nmcli to configure wifi.

1 Like