This guide applies if you want to override/create the icon for an application on Ubuntu.
Terminator is a popular terminal emulator that comes with a handy screen-split feature if you are not
comfortable with the classic tmux
solution. However, one thing of Terminator that put me off is its
dark-red icon -- it feels so out of place with the rest of the icons in the side bar! In contrast the
icon of Ubuntu's own Terminal app has an arguably sleekier look that fits very neatly with neighbors.
Fortunately though, Ubuntu allows replacing the icon.
Copy Terminator's *.desktop
file into your home directory's ~/.local/share/applications
:
$ cp /usr/share/applications/terminator.desktop ~/.local/share/applications/terminator.desktop
Explanations:
- In GNOME desktop environment (the GUI layer of Ubuntu) a
*.desktop
file configs how an app is to be launched, how it appears in menus, etc. A full specification of the file format is at the web page https://specifications.freedesktop.org/desktop-entry-spec/latest/ The file format is shared among the desktop environments using Wayland, a core component of Linux-based operating systems' GUI support. - If you installed Terminator normally, its
*.desktop
file will be under /usr/share/applications. - Files in directory
~/.local/share/applications
will override the corresponding*.desktop
files in/usr/share/applications
. - Do not edit the original
usr/share/applications/terminator.desktop
, as it will be restored after program upgrades. - By the way, you could create a new
*.desktop
config in~/.local/share/applications
for an app if it doesn't have one already. In this file, you can designate an icon and a launch command, etc.
Edit that latter file, so that its Icon
points to Terminal's icon:
$ cat ~/.local/share/applications/terminator.desktop
[Desktop Entry]
Name=Terminator
...
Icon=/usr/share/icons/Yaru/256x256/apps/org.gnome.Terminal.png
...
Explanations:
- Yaru is Ubuntu's default theme and it holds many nice-looking icon files. If the icon is not here,
you can use
/usr/share/icons/hicolor/scalable/apps/org.gnome.Terminal.svg
instead. If a theme isn't present in/usr/share/icons
, the directoryhicolor
is the fallback to look for icons according to specification https://specifications.freedesktop.org/icon-theme-spec/latest/#directory_layout. - Only the "Icon" line needs to be modified. The rest of the file content was copied from Step 1.
- By the way, you can point this
Icon
entry to a*.svg
or a*.png
file you created.
Close Terminator. You can see its icon in the side bar flashes and changes look. No reboot necessary.