I have a yocto/poky build of linux using Weston/Wayland. I have 2 displays. The desktop environment is showing on both displays, but I can only launch apps on display-1 from the command line (ssh shell). I'm just trying to run weston-simple-egl.
This command works and I see the app running on display-1:
WAYLAND_DISPLAY=wayland-1 XDG_RUNTIME_DIR=/run/user/1000 /usr/bin/weston-simple-egl
But this fails:
WAYLAND_DISPLAY=wayland-2 XDG_RUNTIME_DIR=/run/user/1000 /usr/bin/weston-simple-egl
weston-simple-egl: ../weston-11.0.1/clients/simple-egl.c:1157: int main(int, char **): Assertion `display.display' failed.
Aborted
I also tried other display-ids: 0, 2, 3, 4...
Is there a way to check which display-ids are valid? Any logs I should be looking at? or other ways to debug this?
Edit: The display is currently 'extended' I can move an app from one to the other. In the XDG_RUNTIME_DIR, I see only wayland-1:
# ls /run/user/1000
wayland-1 wayland-1.lock
It seems this is not possible via any weston environment variable or configuration.
The answer was to modify the app itself, using this wayland api:
Calling
set_fullscreen(NULL)
will allow the compositor to fullscreen the window on a display of its choosing. But you can iterate overwl_outputs
and choose one to use. I added a command line option to set the output index.Example for glmark2:
Example for weston-simple-egl:
It was not possible to select a display without going fullscreen.
resources: