2024-08-11 :: How to avoid gnome-software from running in the background
I wanted to share a tip about making GNOME lighter for old computers, by avoiding gnome-software from running as a background process (to use less memory).
By default, gnome-software runs in the background in order to check for updates and sends notifications about it. If you complete this tutorial, you will need to check for updates manually.
The steps below have been tested on openSUSE Leap 15.6 with GNOME 45, but it should be easy to adapt to other Linux/Unix distributions.
The old computer has 4 GB of RAM, which is a bit too few for a modern GNOME, especially with Firefox and LibreOffice launched at the same time. As alternatives, it would be possible to install e.g. Xfce (a lighter desktop environment) or to add a RAM stick.
Checking with the System Monitor
GNOME has a nice application called System Monitor to check the memory used and the processes that are running, among other pieces of information.
Alternatively, there are lots of tools available in the terminal. For example
htop and a ps command like:
$ ps aux | grep -i soft
First step: disable the gnome-software autostart
For this step, we need to refer to the autostart documentation.
In fact, gnome-software is auto-started because there is a
*.desktop file placed in one of the autostart directories. In our
case, the file is located at:
/etc/xdg/autostart/org.gnome.Software.desktop
The autostart documentation explains a clean solution to overwrite an
autostart decision, by placing a *.desktop file with the same
name but in a directory that has a higher priority. And it explains that
by adding Hidden=true, it disables the autostart.
So in our case the solution is simple:
$ mkdir -p ~/.config/autostart/ $ cp /etc/xdg/autostart/org.gnome.Software.desktop ~/.config/autostart/ $ echo 'Hidden=true' >> ~/.config/autostart/org.gnome.Software.desktop
Second step: disable the gnome-shell search provider
The above step is not enough, because when searching something in the gnome-shell's Activities Overview, it launches a set of search providers ... including the gnome-software one. And once the gnome-software process runs, it will keep running in the background.
So, you also need to disable the gnome-software search provider. Or to disable all search providers altogether, because it will make GNOME even lighter.
To do that, open the Settings (gnome-control-center) application, go to the Search panel, and disable what you don't need.
It's possible to achieve the same with a gsettings command in the
terminal.
Last step
Just log out and log in again, or reboot.