In Ubuntu Budgie, and possibly other Ubuntu flavors, Gnome uses an icon theme that includes replacement icons for Sublime Text, Firefox, Thunderbird, and other popular applications. These replacement icons are used instead of the icon packaged with the current version of Sublime Text (and other respective programs).
/usr/share/applications/sublime_text.desktop refers to an icon named
sublime-text. The path and file extension are filled in by Gnome, based on the theme and the size of the icon.
If you use
find you'll notice that there are multiple copies of the Sublime Text icon in different sizes. These are automatically selected by Gnome depending on your desktop resolution, DPI, and the size of the UI element that is using the icon (menu, dock, tray icons, etc.).
$ find / -name sublime-text.png 2>/dev/null
Gnome Icon Themes
On my system, which uses Ubuntu Budgie 18.04, the default Gnome theme is Pocillo, and the default icon set is based on Moka. You'll notice if you open the relevant files that Moka provides the "rounded square" icon style for Sublime Text, alongside similar replacement icons for many popular apps like Firefox and Thunderbird. This is where the errant icon is coming from.
Changing the Icon
There are a few ways to use the packaged icon:
- Edit the
.desktop file to use a full path to a specific file, though this breaks the sizing code mentioned earlier.
- Change your icon theme using the
gnome-tweaks tool found in the
gnome-tweak-tools package so the vendor's packaged icons are used, instead of the theme's icons.
- Edit the theme / delete the theme's Sublime Text icon files, though this will likely break if the theme is updated.
- Convince upstream not to ship ugly icons for Sublime Text. This may already be done.
The "correct" way to solve this is to change your icon theme. This uses the built-in features of Gnome, and should continue to work across OS upgrades, package un/re/installs, etc. However, you can also apply a surgical change by editing the
.desktop file or deleting the sublime text icons from your theme — just don't be surprised if those changes poof during a package update in the future.