Fwd: xwayland display variable

Damian Ivanov damianatorrpm at gmail.com
Wed May 1 12:17:22 UTC 2019


Thank you for the great explanation Scott!

I needed to change:
DISPLAY=:2 to connect to wayland-1,
 DISPLAY=:1 was connecting to wayland-0
 and DISPLAY=:0 to nothing

On Wed, May 1, 2019 at 2:59 PM Scott Anderson
<scott.anderson at collabora.com> wrote:
>
> On 1/05/19 11:30 pm, Damian Ivanov wrote:
> > Hello,
> >
> > Is it somewhere documented how Xwayland applications are choosing
> > which compositor to display on? e.g 2 compostiors (1 nested or on
> > another VT)
> > wayland-0 and wayland-1
> > export WAYLAND_DISPLAY=wayland-1
> > GDK_BACKEND=x11 gedit //starts on wayland-0
> >
> > If it's not documented how to do it?
> > Thank you in advance!
> >
> > Damian
>
> Hi,
>
> X programs running through Xwayland connect to it with the exact same
> mechanism they use for connecting to a normal X server, which usually
> means looking at the DISPLAY environment variable.
>
> Each Wayland compositor would start and manage their own separate
> Xwayland server, and would take their own DISPLAY values (e.g.
> DISPLAY=:0, DISPLAY=:1).
>
> In the case of the WAYLAND_DISPLAY=wayland-1 compositor's X server takes
> DISPLAY=:1, you'd run that command like:
>
>    GDK_BACKEND=x11 DISPLAY=:1 gedit
>
> So setting WAYLAND_DISPLAY isn't technically needed, but it's still a
> good idea to set it too, because it can have an effect on other
> processes which your command can start.
>
> Scott


More information about the wayland-devel mailing list