[Tkinter] LONG POST ALERT: Setting application icon on Linux
jepler at unpythonic.net
Sun Mar 27 18:21:51 CEST 2005
Here is a short program that sets Tk's window icon on Linux. My window
manager is icewm, and it uses a scaled version of the "flagup" image
both at the upper-left corner of the window and on the task bar entry
for the window.
app = Tkinter.Tk()
As often happens, the Tkinter documentation doesn't tell the whole
story---you have to dig into the Tk documentation. I started with "man
n wm", and read the following:
If bitmap is specified, then it names a bitmap in the standard
forms accepted by Tk (see the Tk_GetBitmap manual entry for
OK, on to Tk_GetBitmap...
@fileName FileName must be the name of a file containing a
bitmap description in the standard X11 or X10 format.
and I happened to know that some bitmaps in this format exist in the
directory I mentioned above. Note that the "standard X11 format" is
monochrome, so you will not be able to use color images with
"iconbitmap" on Linux. Tk doesn't support _NET_WM_ICON for setting
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 196 bytes
Desc: not available
More information about the Python-list