Is there a way to persist config file changes through an update?

There are a couple of .desktop & .service files I customise, but my edits get overwritten whenever there is an update.

It’s getting a little tedious to redo these every couple 'o weeks & I was wondering whether there’s a way to persist these changes through an update?

For example:
I modify /usr/share/applications/signal-desktop.desktop
from Exec=signal-desktop -- %u
to Exec=signal-desktop --use-tray-icon -- %u

I also modify /usr/lib/systemd/system/docker.service to increase the log limit as recommended in this Stack Overflow answer.

These aren’t the only files, but they’re representative of what I’m trying to save.

1 Like

Your modified applications .desktop files can go in ~/.local/share/applications/ - aka you home directory and will never be overwritten.

You can run it as described here Run the Docker daemon as a non-root user (Rootless mode) | Docker Documentation and make the .service available also in your home directory in ~/.config/systemd/user/

Bad idea. Copy it to your home and make the changes in this file. “desktop” files in ~/.local/share/applications/ supersede files in the system applications folder.

An extremely bad idea. You should use an override with systemctl edit docker.service or maybe use systemctl edit --full docker.service to get an complet override service file in /etc/systemd/system.

Editing files in /usr is never a good way to change things, since these files get always replace with an update. Depending on the files, you need to do different things.

1 Like

With the .desktop files, that’ll do nicely.

I’m not familiar with overrides… guess I’ve got a new thing to learn today :stuck_out_tongue:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.