stardot / b-em

An opensource BBC Micro emulator for Win32 and Linux
http://stardot.org.uk/forums/viewtopic.php?f=4&t=10823
GNU General Public License v2.0
112 stars 57 forks source link

fails on Ubuntu 21.04 - "GtkSocket: only works under X11" (Wayland) #159

Open scruss opened 3 years ago

scruss commented 3 years ago

latest build from github:

b-em 

(b-em:20995): Gtk-WARNING **: 23:54:11.128: GtkSocket: only works under X11

(b-em:20995): Gdk-WARNING **: 23:54:11.129: ../../../../../gdk/x11/gdkwindow-x11.c:5650 drawable is not a native X11 window
Segmentation fault (core dumped)

workaround:

GDK_BACKEND=x11 b-em

Ubuntu 21.04 has gone fully for Wayland, so X11 isn't really there any more.

SteveFosdick commented 3 years ago

See https://discourse.ubuntu.com/t/gtk-backend-selection-or-why-gtk-cannot-open-display-0/17657

GTK/GDK do support Wayland but Allegro, which b-em depends on, does not. If GDK_BACKEND is not set at all b-em would use x11 (i.e. Xwayland under wayland) whereas most apps that do support wayland would use it. It looks like someone has set GDK_BACKEND=wayland to force wayland but that cause an app that doesn't support wayland to refuse to start.

scruss commented 3 years ago

Thanks, Steve - but it doesn't leave me any the wiser. GDK_BACKEND is unset, and Xwayland is not being started/used. The only way I can get b-em to start is to explicitly set GDK_BACKEND=x11