Pages

Sunday, September 13, 2009

Change icons for X applications in Cygwin

       When applications are started on a remote computer, and locally there's a Cygwin installation with an X server running, all programs have a default X shaped icon. This, and other settings can be configured  from c:\cygwin\etc\X11\system.XWinrc file. The syntax is also explained there and on manual pages. 
To modify/add specific icons for specific programs, the syntax is as below. There is also a default icon configured, and a local folder containing the .ico files. 
IconDirectory     "D:\icons"
DefaultIcon        "favicon.ico"

#Some comments

ICONS {
      < class-or-name-of-window> <icon-file-name.ico>
      . . .
}

  • Window class name can be figured out with xprop utility. Run xprop, then click another open window and information will in the terminal where xprop is running. 
  • Name of the window is also shown with xprop utility. It doesn't have to be the full window name, it works also with first n letters of the title
Enjoy!

( I am running Cygwin X Server version 1.5.3. I ran into different problems with older versions.)

References:

No comments:

Post a Comment