Thank you both for dropping by and commenting. I actually had in mind the two issues you mentioned. Regarding the Ubuntu version as Jbinpg points out... I already checked that in 23.10 the problem was present and I don't get the impression that it will be solved in the official 24.04 release. It could be the case but I would be surprised.
Regarding what Mike 1485 says, well actually it's information from the PI team itself... that's true but with nuances. Juan Conejero himself clarified it to me a few days ago:
PixInsight will run on X11, irrespective of your desktop compositing window manager or display server. It will simply force the use of X11, and hence requires a working X11/XCB implementation on the target machine.
So in principle it is not strictly necessary to log in to Xorg to use PI because even under Wayland PI runs in X11/XCB mode and so there is no problem... except the one I have pointed out about the GHS process.
Actually, on my modest PC the graphic system and therefore PI runs a bit better under Wayland than under X and that's why I prefer to log in under Wayland. I just try not to close GHS again if I think I will need it later and if I do by mistake I just save everything as a project, restart PI and reopen the project.
Now seeing it marked as out of scope I understand that it is not an issue related to PI but to the GHS developers or something like that I seem to have read since it seems that both the process and the script have been developed by the same team.
At least, if someone from the development team reads this thread they might check the code. And I know the script works perfectly but the process in my opinion works better.
Also keep in mind that someone may approach PI through Ubuntu as it is known that PI works better under Linux systems than under windows and if they don't know the details they will most likely do it with an Ubuntu session which by default runs on Wayland and may encounter this little problem. Maybe this thread will help as a reference.