Wayland/weston question (launching weston app from tty)
Pekka Paalanen
ppaalanen at gmail.com
Mon Jan 27 08:38:23 UTC 2020
On Thu, 23 Jan 2020 12:59:25 +0300
Alexey Kasyanchuk <degitx at gmail.com> wrote:
> Hi, could you please help me with wayland/weston question?
>
> *Is it possible to start wayland client graphical app inside weston session
> from outside the weston somehow (tty, serial console, or boot)?*
>
> Here the code
>
> display.display = wl_display_connect(NULL);
> assert(display.display);
>
> EGLint major, minor;
> display.egl.dpy = eglGetDisplay(display.display);
> assert(display.egl.dpy);
>
> ret = eglInitialize(display.egl.dpy, &major, &minor);
> assert(ret == EGL_TRUE);
>
> If I tried to start from weston terminal or wayland session, I'm gettings
> proper result and eglInitialize() successful. But when I start it from tty
> or Xorg (weston on other tty), I'm getting eglInitialize assert fault.
Hi,
you need environment variables XDG_RUNTIME_DIR and WAYLAND_DISPLAY to
be set the same way as you have them in the working case.
See also the documentation of wl_display_connect().
> Pass EGL_DEFAULT_DISPLAY to eglGetDisplay make it proper initing but it not
> workable with app.
EGL_DEFAULT_DISPLAY on Wayland cannot ever meaningfully work by design.
Instead of eglGetDisplay(), I warmly recommend using these extensions
when available:
https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_platform_base.txt
https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_platform_wayland.txt
or
https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_platform_wayland.txt
Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20200127/5ace2499/attachment.sig>
More information about the wayland-devel
mailing list