5

I manually downloaded and installed Sublime Text 2 (instead of adding the repository and installing via apt-get install) and I'm having some trouble getting gnome to find the high res icons for sublime.

I extracted the application to /usr/lib/sublime-text Added the following executable script as /usr/bin/sublime

#!/bin/sh
export SUBLIME_HOME="/usr/lib/sublime-text"
$SUBLIME_HOME/sublime_text $*

The /usr/lib/sublime-text/Icon directory contains icons for various resolutions in subdirectories (16x16, 32x32, 48x48, 128x128, 256x256), and I used the 256x256 one when I added the menu item to the cinnamon menu.

How does Gnome locate the icon for an application? I renamed the /etc/lib/sublime-text/Icon directory and then I didn't get an icon at all (default gnome icon) so

Gnome's obviously using an icon from the /usr/lib/sublime-text folder, but if so why how do I get it to use a highres one? Also how does Gnome match the application to the image name? Currently the script in /usr/bin is named sublime, the directory in /usr/lib is named sublime-text, the executable in /usr/bin/lib/sublime-text is named sublime_text and the menu item is defined in a file named Sublime Text.desktop.

I seriously don't understand how the system manages to match all of this...


I'm running Linux Mint 13 (Cinnamon)

1
  • Hi. I have this problem on Fedora20 and was wondering if you managed to solve this? I have a desktop file for sublime at ~/.local/share/applications/sublime.desktop which points to the 256x256 icon, but it still uses the low-rew icon when switching applications with alt tab.
    – Christof
    Jul 3, 2014 at 6:45

2 Answers 2

3

While this isn't the best solution, I get around the problem of low resolution icons by just pointing directly to the highest possible version inside the .desktop file. In this case specifically, I have it pointing to a local copy of the official 256px icon, but any location should work.

Icon=/home/patrick/.icons/sublime-256.png
2

I copied the Sublime icons over to the various directories /usr/share/icons/hicolor/[NxN]/apps

Then I made a sublime.desktop file and put it under ~/.local/share/applications, with Icon=sublime_text.

That seemed to work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.