2

On my new Meerkat, running Pop 21.04 (based on Ubuntu), I have Thunderbird installed as a flatpak. And I would like to change the application icon (along with a number of other application icons) to a tongue-in-cheek version (in the case of T-Bird, the mascot has his wing wrapped around a bottle of Thunderbird wine; in the case of Firefox, which came pre-installed, the mascot is chewing on an Internet Explorer logo).

So far, nothing I've tried for T-Bird has had the slightest effect on what shows up in the applications menu or the dock: I've tried changing the .desktop file to point to the fully-qualified pathname of a PNG file; no effect (and I backed out the change). I've tried backing up the hicolor directory in .local/share/flatpak/app/org.mozilla.Thunderbird/current/active/files/share/icons, then replacing every last instance of org.mozilla.Thunderbird.png within with a correctly-scaled version of the modified icon; still no effect, even after both an "update-icon-caches" and a system restart. I tried variations on this everywhere else I could find either an instance of org.mozilla.Thunderbird.png, or a link to one.

For what it's worth:

my tongue-in-cheek T-Bird icon

In response to comment by "WGRM":

jameslampert@pop-os:~$ env | grep -i 'XDG'
XDG_CONFIG_DIRS=/etc/xdg/xdg-pop:/etc/xdg
XDG_MENU_PREFIX=gnome-
XDG_SESSION_DESKTOP=pop
XDG_SESSION_TYPE=x11
XDG_CURRENT_DESKTOP=pop:GNOME
XDG_SESSION_CLASS=user
XDG_RUNTIME_DIR=/run/user/1000
XDG_DATA_DIRS=/usr/share/pop:/home/jameslampert/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share

Another thought that occurred to me: would simply creating entirely new .desktop files (mostly copied from the originals) accomplish anything useful with regard to hacking in tongue-in-cheek icons?

2
  • Not a useful comment. Jul 24, 2021 at 0:08
  • 1
    Add your output of env | grep -i 'XDG'
    – WGRM
    Jul 24, 2021 at 23:54

3 Answers 3

1

I just tried my idea of creating an entirely new .desktop file -- a copy of the org.mozilla.Thunderbird.desktop file, with the icon reference changed.

And it seems to have paid off. I now have two separate .desktop files (the original, in the flatpak, and "T-Bird.desktop," currently in /usr/share/applications), both pointing to Thunderbird, the latter with my custom icon.

If anybody can tell me where I can put .desktop files, where they would be visible to Gnome, but safe from being overwritten by updates, before the bounty expires, it's yours.

1
  • You have to add $HOME/.local/share/applications to the beginning of your $XDG_DATA_DIRS environment variable. Put the desktop files there.
    – anon
    Jan 6 at 10:03
1

I've changed a flatpak app icon by editing the .desktop file found in

~/.local/share/flatpak/exports/share/applications/

For example, with the slack app, file is com.slack.Slack.desktop:

[Desktop Entry]
Name=Slack
Comment=Slack Desktop
GenericName=Slack Client for Linux
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=slack --file-forwarding com.slack.Slack @@u %U @@
#Icon=com.slack.Slack
Icon=/FULL_PATH/slack-dark.png
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Network;InstantMessaging;
MimeType=x-scheme-handler/slack;
X-Desktop-File-Install-Version=0.26
StartupWMClass=Slack
X-Flatpak-RenamedFrom=slack.desktop;
X-Flatpak=com.slack.Slack
0

I'm afraid .desktop files are virtually everywhere, including many non-$PATH places. They appear to be quite common inside "applications" directories, but there does not appear any rules they need to follow.

I don't believe they are visible in any GUI file manager - even when you tell it to show hidden files.

find will find them, as will the locate command (provided it is setup to update its database, usually daily).

Example:- locate .desktop produced 4,872 desktop files on my PC.

You may be able to create your customised desktop file in:-
~/.local/share/applications/thunderbird.desktop You could place your custom icon into ~/.icons/youricon.

Since the files are in $HOME, they would be safe against updates.

Not tested for PopOS. I would guess you would probably need a restart after any changes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .