gloss
gloss copied to clipboard
gloss doesn't work on wayland/swaywm *without xwayland
Hello! I've recently started figuring out gloss and was working on a project in xmonad. A couple days ago I switched over to swaywm to check it out, however I got an error ( freeglut (gloss-stuff): failed to open display ''
) whenever I tried to do stack run
. Going back to xmonad it runs just fine, same for xfce. Has anyone else encountered this? I'm willing to try another wayland-based de and see if this problem is swaywm-specific or wayland-broad.
Works for me under a wayland session in Ubuntu 22.04. Maybe the freeglut
library is too old or misconfigured somehow?
it turns out sway doesn't automatically install xwayland, with xwayland installed it runs just fine (of course it doesn't run as a floating window in a tiling wm but ive no idea where to start with that).
I don't know if making gloss run without X is in the cards right now - from what I heard different wayland compositors require different implementations; if this is true, implementing this is a lot less straightforward than it seems.
I'll leave this issue open with this message, feel free to close!
Turns out Freeglut actually had Wayland support added quite a long time ago: https://github.com/freeglut/freeglut/pull/30. But it appears to have bitrotted: https://github.com/freeglut/freeglut/issues/72, https://github.com/swaywm/wlroots/issues/1799. I haven't even tried it since it needs to be triggered at build-time: https://github.com/freeglut/freeglut/issues/141.
Anyway, XWayland works for now.