Running Gazebo Harmonic in 24.04 Wayland

Question:
Can I set gazebo harmonic parameters in the airframe files located in:
~/PX4/PX4-Autopilot/build/px4_sitl_default/etc/init.d-posix/airframes ?

See below for context:

Ubuntu 24.04 running wayland is way smoother than x11.

The problem is that gazebo harmonic won’t run in Ubuntu 24.04 wayland using the command make px4_sitl gz_x500

Switching to x11 runs just fine.

I want to make harmonic run on wayland and based on this info:

https://gazebosim.org/docs/latest/troubleshooting/

Modifying a few parameters should work.

Wayland issues

There’s an issue with the interaction of Ogre and Qt in Gazebo that prevents wayland from working properly. You might see an error message like the one below:

Unable to create the rendering window: OGRE EXCEPTION(3:RenderingAPIException): currentGLContext was specified with no current GL context in GLXWindow::create at ./RenderSystems/GL3Plus/src/windowing/GLX/OgreGLXWindow.cpp (line 165)

A workaround is to set `QT_QPA_PLATFORM=xcb`. e.g.:

QT_QPA_PLATFORM=xcb gz sim -v 4 shapes.sdf

Another workaround to try is to make sure Gazebo is launched with XWayland by unsetting the `WAYLAND_DISPLAY` environment variable, e.g.

env -u WAYLAND_DISPLAY gz sim -v 4 shapes.sdf

Thanks

QT_QPA_PLATFORM=xcb make px4_sitl gz_x500