I recently moved to linux and am currently running Debian 8.2 stretch. I have a question regarding the icons of apps that are executed from the terminal window. My case in particular is with Emacs, I have a desktop launcher for emacs24 that has a high resolution icon. The problem is that am using a bash script to run emacsclient if a server is present and start the server first if not. I noticed that even if I make a custom launcher for the script with a specific icon, the icon I have when switching apps with alt+tab is a low resolution version of the emacs icon.

I also tried running directly emacs24 from the terminal with emacs & instead of using the default launcher and I also get the low resolution icon.

My question is: is there a way to control the icon that are used for apps when they are run from the terminal?

1 Answer 1


Perhaps: window managers can treat things specially by letting you associate a given icon with one of your desktop objects. Emacs has a preconfigured bitmap icon (which is not high-resolution). According to the documentation, you may use the --no-bitmap-icon option to allow the window manager to choose its own icon.

Applications tell the window manager which icon they would like by setting the corresponding window manager hint, e.g., for the icon pixmap. You can read more about that:

While it seems that it could be possible to set the icon pixmap hint after creating a window, in practice wmctrl (a likely possibility) does not appear to do this.

  • Thanks a lot for the reply! I didn't expect this thing to be complicated! I tried the --no-bitmap-icon but the results is just a rectangle with emacs written on it. I will try to look at some of the documentation you provided Commented Nov 22, 2015 at 12:51

You must log in to answer this question.

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