View previous topic :: View next topic |
Author |
Message |
NyneR n00b
Joined: 19 Dec 2020 Posts: 35
|
Posted: Wed Oct 20, 2021 11:42 am Post subject: [SOLVED] Keep desktop file changes on update |
|
|
Hello everyone,
I'm trying to use with programs like and browsers.
So I edited the desktop files in Code: | /usr/share/applications | .
When I prepend "apulse" to the "Exec" field it works as expected.
However as soon as I update the program via portage the desktop file gets overwritten again.
Is there a way to keep the changes or at least get a merging dialog like with etc-update?
Thanks in advance,
NyneR
Last edited by NyneR on Wed Oct 20, 2021 12:51 pm; edited 1 time in total |
|
Back to top |
|
|
netfab Veteran
Joined: 03 Mar 2005 Posts: 1897 Location: 127.0.0.1
|
Posted: Wed Oct 20, 2021 12:28 pm Post subject: |
|
|
Hi,
You should do this instead :
Code: |
# mkdir -p /usr/local/share/applications
|
and copy your modified desktop file to that directory.
Edit: to be more precise, the spec. says :
Quote: |
Desktop File ID
Each desktop entry representing an application is identified by its desktop file ID, which is based on its filename.
To determine the ID of a desktop file, make its full path relative to the $XDG_DATA_DIRS component in which the desktop file is installed, remove the "applications/" prefix, and turn '/' into '-'.
For example /usr/share/applications/foo/bar.desktop has the desktop file ID foo-bar.desktop.
If multiple files have the same desktop file ID, the first one in the $XDG_DATA_DIRS precedence order is used.
|
On my system :
Quote: |
$ env | grep DATA_DIRS
XDG_DATA_DIRS=/usr/local/share:/usr/share:/usr/share
|
|
|
Back to top |
|
|
NyneR n00b
Joined: 19 Dec 2020 Posts: 35
|
Posted: Wed Oct 20, 2021 12:48 pm Post subject: |
|
|
Thanks!
I tried it with Code: | /usr/local/share/applications | but it did not apply the changes on my system.
Instead I used Code: | ~/.local/share/applications | .
It works now. |
|
Back to top |
|
|
netfab Veteran
Joined: 03 Mar 2005 Posts: 1897 Location: 127.0.0.1
|
Posted: Wed Oct 20, 2021 12:56 pm Post subject: |
|
|
NyneR wrote: |
I tried it with Code: | /usr/local/share/applications | but it did not apply the changes on my system.
|
I guess it must depend on your desktop.
Here under Xfce it works. |
|
Back to top |
|
|
|