New to flathub, just installed dosbox-x and widelands, but getting an error about opengl being broken

~# flatpak run org.widelands.Widelands
This is Widelands version 1.2 Release
[00:00:00.000 real] INFO: Set home directory: /root/.widelands
[00:00:00.000 real] INFO: Set configuration file: /root/.widelands/config
[00:00:00.000 real] ERROR: config:0: RealFSImpl::load: could not open file for reading: /root/.widelands/co
nfig
[00:00:00.000 real] WARNING: No locale translations found in /app/share/widelands/locale
[00:00:00.000 real] INFO: selected language: (system language)
[00:00:00.000 real] INFO: using locale en_US.UTF-8
[00:00:00.001 real] INFO: Adding directory: /app/share/widelands
[00:00:00.001 real] INFO: selected language: (system language)
[00:00:00.001 real] INFO: using locale en_US.UTF-8
[00:00:00.003 real] INFO: Byte order: little-endian
[00:00:00.032 real] INFO: Graphics: Try to set Videomode 800x600
[00:00:00.039 real] ERROR: glewInit returns 4
[00:00:00.039 real] ERROR: Your OpenGL installation must be very broken. Unknown error

Caught exception (of type ‘10WException’) in outermost handler!
The exception said: [/run/build/Widelands/src/graphic/gl/initialize.cc:147] glewInit returns 4: Broken OpenGL
installation.

This should not happen. Please file a bug report on version 1.2 Release.
and remember to specify your operating system.

what should i do now?

heres my os…

~# uname --all
Linux casdt2-deb64 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux

found the problem: i was running it as root with sudo! (which in turn caused X11 problems, as X11 was running my user account…)