Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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)

share|improve this question
    
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. –  Chris Jul 3 at 6:45
add comment

2 Answers 2

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
share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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