On 28.03.2010, at 00:30, Chris Muller wrote:
>
>
> Does the VM compiler decide what icon bitmap is represented by the
> executable? When running in Linux I get a Xterm icon, but it would be
> nice to be able to distinguish those from other Xterm sessions on the
> desktop.
No, by default the VM does not define an icon. On modern Linux desktops, window icons are not specified by the executable anymore. Instead, the desktop comes with a "theme" of colorful icons. Typically a "desktop entry" file is used to associate applications with icons. See
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.htmland ask your favorite distro packager for how they handle icons.
There still is some window icon support in the VM, but it has been unused for years. I found this in an old file - try putting the following into platforms/unix/vm-display-X11/squeakIcon.bitmap and undefine NO_ICON in sqUnixX11.c:
#define sqXIcon_width 32
#define sqXIcon_height 32
static char sqXIcon_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x0c,0x48,0x00,0x00,
0x12,0x84,0x00,0x00,0x21,0x04,0x01,0x80,0x20,0x04,0x02,0x40,0x20,0x04,0x02,
0x40,0x20,0x04,0x04,0x20,0x20,0x04,0x04,0x20,0x20,0x04,0x08,0x10,0x20,0x04,
0x08,0x10,0x20,0x08,0x00,0x00,0x10,0x08,0x00,0x00,0x10,0x08,0x00,0x00,0x10,
0x08,0x00,0x00,0x10,0x10,0x18,0x18,0x08,0x10,0x2c,0x2c,0x08,0x10,0x2c,0x2c,
0x08,0x00,0x2c,0x2c,0x00,0x00,0x3c,0x3c,0x00,0x00,0x18,0x18,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x0f,0xf0,0x1f,0x06,0xc0,0x03,0x60,0xe0,
0xe7,0xe7,0x07,0x18,0xc0,0x03,0x18,0xc6,0x0f,0xf0,0x63,0x31,0x00,0x00,0x8c,
0x08,0x00,0x00,0x10,0x00,0x00,0x00,0x00};
Recompiling should add an old-fashioned black-and-white icon to the window. But it's quite possible that modern window managers ignore this.
- Bert -