in reply to Re: PerlTk GNOME3 alternate icon file shown as blank square
in thread PerlTk GNOME3 alternate icon file shown as blank square

Hello choroba, thank for the reply. After I attempted to use your solution I've got an error message:
.../bin>windows_list_scrollable_gnome_terminal & [1] 1970608 .../bin>Semicolon seems to be missing at windows_list_scrollable_gnome +_terminal line 508. syntax error at windows_list_scrollable_gnome_terminal line 469, near +"* pm_xpm[" Execution of windows_list_scrollable_gnome_terminal aborted due to com +pilation errors.
Line #508 is the line after __XPM__ I thought a semicolon had been forgotten, added it after __XPM__ and got another error message:
.../bin>windows_list_scrollable_gnome_terminal & [1] 1972397 .../bin>syntax error at windows_list_scrollable_gnome_terminal line 46 +9, near "* pm_xpm[" Bareword "__XPM__" not allowed while "strict subs" in use at windows_l +ist_scrollable_gnome_terminal line 469. Execution of windows_list_scrollable_gnome_terminal aborted due to com +pilation errors.
Does "__XPM__" is supposed to be a label in the code, an address of which is passed by "-data => << '__XPM__')"? TIA!

Replies are listed 'Best First'.
Re^3: PerlTk GNOME3 alternate icon file shown as blank square
by soonix (Chancellor) on Dec 22, 2024 at 13:51 UTC
    Very probably this is a subsequential error. Do you get the same error when you try choroba's code unedited as a standalone script?
      OK, when I copy the code in its entirety it runs without errors but produces the same blank gray sqare as an icon. I'll start looking what did I not copy correctly but meanwhile the original problem remains: as if the graphical subsystem "overrides" the icon given by the program. Any ideas? TIA!
        I performed another experiment: I copied the PerlTk script from our work environment (EL8+GNOME3) to my home PC (Fedora 41 + KDE). After installing some needed Perl modules and bringing the icon JPG file and fixing the path of the icon file the script started running and the icon was correct. So it seems the problem wasn't with the script buy with the graphic environment of the OS. And how to debug this - I have no idea...
Re^3: PerlTk GNOME3 alternate icon file shown as blank square
by kaza_perl_ip (Acolyte) on Dec 22, 2024 at 09:49 UTC
    Some more info: In addition to attempting the "inline" XPM code, I also tried creating XPM file. After few format errors I got it to load but the result was the same blank (gray) square. I also attempted PBM file (tried P1 and P4). The P1 file loaded without errors but resulted in the same blank (gray) square. Attempt to create and load P4 file resulted in format error. I also created a JPG file from the PNG file, it too loaded without errors but resulted in the same blank square. I think that in all cases where I didn't have format errors, the PerlTk could read the image correctly and produce it's own internal image data correctly but somewhere "at higher authority", somewhere "under the hood" of EL8+GNOME3 the application image had been overriden by the OS and the GNOME3. Can it be the case? TIA!
      Some more info and I think this thread can be closed: I noticed that when opening other apps, sometimes there is the same blank gray sqare (like "DVE" to view waves of Verilog simulations, on old server running GNOME2 there was icon of it) and sometimes there is an icon ("nedit", "soffice"). It seems to me the problem is ouside the scope of PerlTk program and is somewhere in the EL8+GNOME3 graphical system... Thanks for all the answers.