Why can't I remotely start xwayland GUI apps?

Normally I can start wayland apps with export DISPLAY=:0 for example vlc or virt-manager or any non-xwayland app with ssh.
Maybe they just need some environment variable or some config.

[csaba@csaba-mini ~]$ export DISPLAY=:0
[csaba@csaba-mini ~]$ ./Android/Sdk/emulator/emulator -avd Pixel_5_API_30
INFO    | Android emulator version 33.1.24.0 (build_id 11237101) (CL:N/A)
INFO    | Found systemPath /home/csaba/Android/Sdk/system-images/android-30/google_apis/x86/
INFO    | Storing crashdata in: , detection is enabled for process: 8817
INFO    | Duplicate loglines will be removed, if you wish to see each individual line launch with the -log-nofilter flag.
WARNING | Please update the emulator to one that supports the feature(s): Vulkan
WARNING | FeatureControl is requesting a non existing feature.
Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

INFO    | Warning: could not connect to display :0 ((null):0, (null))
INFO    | Info: Could not load the Qt platform plugin "xcb" in "/home/csaba/Android/Sdk/emulator/lib64/qt/plugins" even though it was found. ((null):0, (null))
Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.
 ((null):0, (null))
INFO    | Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.
 ((null):0, (null))
[8821:8821:20240115,181931.053818:ERROR elf_dynamic_array_reader.h:64] tag not found
[8821:8821:20240115,181931.053939:ERROR elf_dynamic_array_reader.h:64] tag not found
Aborted (core dumped)
[csaba@csaba-mini ~]$ virt-manager
[csaba@csaba-mini ~]$ Authorization required, but no authorization protocol specified


(virt-manager:8864): dbind-WARNING **: 18:21:01.963: Could not open X display
^C
[csaba@csaba-mini ~]$ qbittorrent
Authorization required, but no authorization protocol specified

qt.qpa.xcb: could not connect to display :0
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, xcb, minimal, vnc, offscreen, vkkhrdisplay, minimalegl, linuxfb.

Aborted (core dumped)
[csaba@csaba-mini ~]$ ^C
[csaba@csaba-mini ~]$ steam-native
steam.sh[10394]: Running Steam on endeavouros rolling 64-bit
steam.sh[10394]: STEAM_RUNTIME is disabled by the user
steam.sh[10394]: Can't find 'steam-runtime-check-requirements', continuing anyway
tid(10471) burning pthread_key_t == 0 so we never use it
[2024-01-15 18:39:31] Startup - updater built Jan 13 2024 00:51:43
[2024-01-15 18:39:31] Startup - Steam Client launched with: '/home/csaba/.local/share/Steam/ubuntu12_32/steam'
01/15 18:39:31 Init: Installing breakpad exception handler for appid(steam)/version(1705108172)/tid(10471)
Authorization required, but no authorization protocol specified

src/steamexe/updateui_xwin.cpp (339) : Could not open connection to X
src/steamexe/updateui_xwin.cpp (339) : Could not open connection to X
01/15 18:39:31 Init: Installing breakpad exception handler for appid(steam)/version(1705108172)/tid(10471)
/usr/bin/zenity: /usr/lib/steam/libcurl.so.4: no version information available (required by /usr/lib/libappstream.so.5)
assert_20240115183931_4.dmp[10476]: Uploading dump (out-of-process)
/tmp/dumps/assert_20240115183931_4.dmp
src/steamexe/main.cpp (1223) : failed to initialize update status ui, or create initial window
src/steamexe/main.cpp (1223) : failed to initialize update status ui, or create initial window
[csaba@csaba-mini ~]$ assert_20240115183931_4.dmp[10476]: Finished uploading minidump (out-of-process): success = yes
assert_20240115183931_4.dmp[10476]: response: CrashID=bp-0ce2cf17-50be-4aea-9dfc-450d02240115
assert_20240115183931_4.dmp[10476]: file ''/tmp/dumps/assert_20240115183931_4.dmp'', upload yes: ''CrashID=bp-0ce2cf17-50be-4aea-9dfc-450d02240115''
^C
[csaba@csaba-mini ~]$ winecfg
wineserver: using server-side synchronization.
wine: Using setpriority to control niceness in the [-10,10] range
002c:fixme:winediag:LdrInitializeThunk wine-staging 8.0 is a testing version containing experimental patches.
002c:fixme:winediag:LdrInitializeThunk Please mention your exact version when filing bug reports on winehq.org.
002c:err:wineboot:process_run_key Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (2).
006c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
006c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
006c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
006c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0080:err:hid:udev_bus_init UDEV monitor creation failed
Authorization required, but no authorization protocol specified

00d8:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
00d8:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
00d8:err:systray:initialize_systray Could not create tray window
0114:fixme:oleacc:find_class_data unhandled window class: L"#32769"
0114:fixme:uiautomation:uia_get_providers_for_hwnd Override provider callback currently unimplemented.
0114:fixme:uiautomation:msaa_provider_GetPropertyValue Unimplemented propertyId 30024
0114:fixme:uiautomation:msaa_fragment_get_FragmentRoot 000000000033F6A8, 000000000021FAC0: stub!
0114:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0114:err:winediag:nodrv_CreateWindow L"Make sure that your X server is running and that $DISPLAY is set correctly."
0114:err:tabtip:wWinMain Failed to create hwnd!
0128:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0128:err:winediag:nodrv_CreateWindow L"Make sure that your X server is running and that $DISPLAY is set correctly."
[csaba@csaba-mini ~]$

Looks like all the errors are about not finding the X server. Maybe it is possible to tell the apps to use xwayland. Thought about using waypipe, but I don’t think it’s compatible with windows.

Not that important, but I’d like to start the android emulator from my couch. :yawning_face:
Otherwise I have to use the emulator in headless mode and scrcpy which sometimes means extra alt-tabs on the laptop( :sloth:) and it’s too easy.
Also I’m just curious and seems a bit more cool.

Yes, it seems so:

Try to run with QT_QPA_PLATFORM set to xcb.

QT_QPA_PLATFORM=xcb ./Android/Sdk/emulator/emulator -avd Pixel_5_API_30

It doesn’t work

[csaba@csaba-mini ~]$ DISPLAY=:0 QT_QPA_PLATFORM=xcb ./Android/Sdk/emulator/emulator -avd Pixel_5_API_30
INFO    | Android emulator version 33.1.24.0 (build_id 11237101) (CL:N/A)
INFO    | Found systemPath /home/csaba/Android/Sdk/system-images/android-30/google_apis/x86/
INFO    | Storing crashdata in: , detection is enabled for process: 22202
INFO    | Duplicate loglines will be removed, if you wish to see each individual line launch with the -log-nofilter flag.
WARNING | Please update the emulator to one that supports the feature(s): Vulkan
WARNING | FeatureControl is requesting a non existing feature.
Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

INFO    | Warning: could not connect to display :0 ((null):0, (null))
INFO    | Info: Could not load the Qt platform plugin "xcb" in "/home/csaba/Android/Sdk/emulator/lib64/qt/plugins" even though it was found. ((null):0, (null))
Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.
 ((null):0, (null))
INFO    | Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.
 ((null):0, (null))
[22206:22206:20240125,194217.579577:ERROR elf_dynamic_array_reader.h:64] tag not found
[22206:22206:20240125,194217.579649:ERROR elf_dynamic_array_reader.h:64] tag not found
Aborted (core dumped)

any ideas?

I’m kind of stuck with this. I can’t even start a headless emulator from an ssh session.

[csaba@csaba-mini ~]$ ./Android/Sdk/emulator/emulator -avd Pixel_5_API_30 -gpu host -no-window
INFO    | Storing crashdata in: /tmp/android-csaba/emu-crash-34.1.18.db, detection is enabled for process: 12813
INFO    | Android emulator version 34.1.18.0 (build_id 11481568) (CL:N/A)
INFO    | Found systemPath /nvme-data/Android/Sdk/system-images/android-30/google_apis/x86/
INFO    | Storing crashdata in: /tmp/android-csaba/emu-crash-34.1.18.db, detection is enabled for process: 12813
INFO    | Duplicate loglines will be removed, if you wish to see each individual line launch with the -log-nofilter flag.
WARNING | Please update the emulator to one that supports the feature(s): Vulkan
WARNING | FeatureControl is requesting a non existing feature.
WARNING | Your GPU drivers may have a bug. If you experience graphical issues, please consider switching to software rendering.
library_mode host gpu mode host
Initializing hardware OpenGLES emulation supportandroid_startOpenglesRenderer: gpu infoI0305 20:34:14.718968   12813 HealthMonitor.cpp:279] HealthMonitor disabled.
added library libvulkan.so
createGlobalVkEmulation:964 Selecting Vulkan device: AMD Radeon Graphics (RADV RENOIR)
initialize: Supports id properties, got a vulkan device UUID
GlxEnginegetDefaultDisplay: Failed to open display 0. DISPLAY: [(null)]
E0305 20:34:14.763983   12813 EmulationGl.cpp:233] Failed to get EGL display.
E0305 20:34:14.764001   12813 FrameBuffer.cpp:333] Failed to initialize GL emulation.
E0305 20:34:14.765511   12813 RendererImpl.cpp:141] Could not initialize emulated framebuffer

Segmentation fault (core dumped)

same error if I use export DISPLAY=:0