How to fix "Software" in templates to install packages using a GUI

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 the following templates:

  • debian-12
  • debian-13
  • fedora-43
  • fedora-38
  • (we can assume it’s working between fedora 38 and 43)

Template with “xfce” in the name do not have the program “Software” installed, it would be counter productive to explain how to install it using the command line to avoid installing program with the command line.

To proceed:

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

There is a guide explaining how to edit a file if you do not know how to proceed: How to edit text files in qubes

  • 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 is it required?

There is a “bug” in “Software”, because templates do not have a network interface, it decides that it is offline. The workaround here declares a network route that goes nowhere, but it is enough to make Software work.

What about security?

Packages are installed exactly like using the command line. The template is not connected to the internet, nothing changed except we added a fake network route.

4 Likes

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

3 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

i love it but i dont understand (im like a baby) it nor what is meant by;

  • edit /rw/config/rc.local to add the snippet below at the end of the file

Updated after:

  • testing on debian 13 and fedora 43 that it still works
  • added link to the guide explaining how to edit a file
1 Like

Currently the link links to this topic instead of the new one.

Good catch!

Perhaps “add snippet below at the end of /rw/config/rc.local” is a better way to say this? (I’m assuming this is confusing because editing this file doesn’t result in adding the snippet anywhere automatically)

I changed this text already;)

I cant see these updates, but its worth saying that Debian generally
does not have any issue with package managers. I mean that apt and
aptitude and synaptic (included in debian-13-xfce), all work fine in
Qubes with no modifications.
The issue here is specific to gnome-software: it’s Gnome - expect
nothing less.

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

Gnome software is just a frontend for apt, it’s installed by default in templates, it’s beneficial for many users who might want to browse the software library to figure what they can install.

Just for info: The Debian 13 Xfce template has Synaptic preinstalled which can be used instead of Software if you prefer a GUI over command line.

2 Likes