3

I recently upgraded to Quantal, and also switched up to emacs24 from 23. Everything is great, except for one thing: the icon in the Application Switcher for emacs24 is a horrible, low-resolution eyesore. Compare the two side-by-side:

emacs23 icon on left, emacs24 icon on right

I've seen a couple of questions addressing issues like this, but they're not quite the same. This one says that it is happening with all icons, but that's clearly not the case here. And this one seems more relevant, but it is talking about Gnome, not Unity.

In the comments to the one answer for the second question, it says to look at the icons in /usr/share/icons to see if they are low-resolution, and if so to replace them with better ones. There's a ton of emacs icons, in fact. They are in various subfolders of /usr/share/icons/hicolor and they are in sizes ranging from 16x16 to 128x128, and also there are scaleable .svg versions of the icons too.

I noticed that there are no 192x192 or 256x256 versions. But it seems like that shouldn't matter, since emacs23 also didn't have icons in those sizes.

Any help would be much appreciated!

3 Answers 3

5

I too had those blurred icon, using either Linux Mint Debian Edition with Cinnamon, or Debian stable Wheezy with Gnome 3. I believe that source of issue is Gnome.

While digging, I noticed that for one same application, I could get :

  • blurred icon when application is launched via terminal command line, or via Gnome Alt+F2.
  • nice icon when application is launched via Gnome Shell or via Gnome Do.

What helped me to find a solution is this post. The point is that sometimes you run via command line emacs, but the desktop file is emacs23.desktop. At some point, Gnome is not able to make the link from emacs to emacs23.

The solution that I found and that worked for me is, for all applications where I have a pixelated icon, I create an .desktop in $HOME/.local/share/applications, respecting the following rules:

  • filename syntax is <application>.desktop
  • <application> must be the command used to launch via terminal.
  • inside <application>.desktop, have a line StartupWMClass=<application>

One example that would make this fails, is that you create an emacs24.desktop file, but you are also able to run emacs from the command-line, and that emacs is launching emacs24.

1
  • 1
    Works also with Cinnamon on Linux Mint Rosa, tested for Eclipse with /usr/share/applications/eclipse.desktop. Jan 22, 2016 at 14:41
2

I have noticed that this kind of icon blur happens when an application opens a dialogue or any window for something.

You can try making 192x192 and 256x256 versions in Gimp by clicking Image>Scale, it might help.

This might sound a little odd, but try deleting every icon size for that app except for the scalable one. I have made an entire icon set with only scalable icons (in PNG format). They look great normal sized and very large, but when very small (like 16x16) they aren't clear.

I wanted to put this as a comment because I am not 100% sure of any of this, but it would have been too long. But if it works then cool :)

3
  • It worked! Thanks, that was driving me insane!
    – MTS
    Oct 28, 2012 at 4:05
  • That's great to hear :) Can you tell me which tip worked? That way I will edit the answer to highlight what worked. Oct 28, 2012 at 17:12
  • Deleting all the icons other than the .svg ones worked. Then again, I don't know if that will cause problems elsewhere. But the icons in the switcher, the Launcher, the Dash, and the HUD all seem to be using the scalable version, so things are looking good for now. I will post an update if I find something else broken.
    – MTS
    Oct 28, 2012 at 19:26
0

What worked for me is appending --class="<application>" to the Exec command in ~/.local/share/applications/<application>.desktop, as mentioned here.

You must log in to answer this question.

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