Possible to build terminal-only whonix-gw?


After searching all around for the correct flavor name to build a terminal-only whonix-gateway I found at least a flag (--terminal-only). Though I still haven’t found it in the official documentation.

I tried to append it as a flavor to the template name in Qubes builder’s builder.conf: whonix-gateway+terminal-only. Unsurprisingly that didn’t work. (whonix-gateway seems to work fine.)

Is it at all possible to build a terminal-only whonix-gateway template in Qubes builder? If yes, how?


[ That switch is broken. That switch won’t work anyhow, since Qubes builder is no longer using Whonix’s build script. That switch would be useless, since Qubes is terminal-only anyhow. No desktop environment packages / display manager get installed in Qubes-Whonix. What you might want instead is no-default-apps switch, but the same applies. ]

Instead only the small amount of code here https://github.com/Whonix/qubes-template-whonix is used to build Qubes-Whonix. Installation from Whonix apt repository.

In https://github.com/Whonix/qubes-template-whonix/blob/master/whonix-gateway/04_install_qubes_post.sh you’d have to hack the following part.

if [ "${TEMPLATE_FLAVOR}" = "whonix-gateway" ]; then
   aptInstall qubes-whonix-gateway
elif [ "${TEMPLATE_FLAVOR}" = "whonix-workstation" ]; then
   aptInstall qubes-whonix-workstation

Installing different meta packages.

(See https://github.com/Whonix/anon-meta-packages/blob/master/debian/control and look for Package: qubes-whonix-gateway to see the package declaration. You then could use aptInstall multiple times. Here is what I would try (which means this is untested) for a no-default-apps Qubes-Whonix-Gateway.)

Replace aptInstall qubes-whonix-gateway with the following.

aptInstall whonix-legacy
aptInstall whonix-gateway-packages-dependencies-pre
aptInstall anon-shared-packages-dependencies
aptInstall whonix-shared-packages-dependencies
aptInstall anon-gateway-packages-dependencies
aptInstall whonix-gateway-packages-dependencies
aptInstall qubes-whonix


So could one possibly do the same for a minimal workstation (of course replace gateway with workstation from your example)?



aptInstall whonix-legacy
aptInstall whonix-workstation-packages-dependencies-pre
aptInstall anon-shared-packages-dependencies
aptInstall whonix-shared-packages-dependencies
aptInstall anon-workstation-packages-dependencies
aptInstall whonix-workstation-packages-dependencies
aptInstall qubes-whonix