How to make GNOME Software to work in templates

Original forum link
https://forum.qubes-os.org/t/20944
Original poster
Solène R
Created at
2023-09-14 16:38:10
Last wiki edit
2024-02-25 10:25:56
Revisions
3 revisions
Posts count
5
Likes count
7

Hi,

If you want to install programs in a template from the graphical package manager Software, we need to follow a few steps to circumvent a bug in that program. Tested on Debian 12 and Fedora 38.

ip route add default via 127.0.0.2

Now, if you start Software in the template, it will be able to download and install packages 🙂 👌

why?

This seems to be a "bug" of GNOME Software, it won't trigger the package installation if it can't find a default route. The hack here is to create a fake route that goes nowhere on the loopback interface.

Security?

Packages are downloaded through the proxy exactly like when using the command line. The template is not connected to the internet, nothing changed except we added a false route that can't go anywhere.