How to make GNOME Software to work in templates

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.

  • run a terminal in your template
  • edit /rw/config/rc.local to add the snippet below at the end of the file
ip route add default via 127.0.0.2
  • stop the template

Now, if you start Software in the template, it will be able to download and install packages :slight_smile: :ok_hand:

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.

2 Likes

I opened an issue upstream GNOME software requires a default route to work (#2336) · Issues · GNOME / gnome-software · GitLab

2 Likes

While I originally tried with Fedora 38, a quick try with Debian 12 confirms that it also fix the situation there.

2 Likes

The fix shouldn’t be required anymore

Could someone try on their template? Mine are a bit too modified to be sure I untie everything correctly to verify :sweat_smile:

1 Like