Re: xwayland display variable

2019-05-01 Thread Damian Ivanov
Thanks Simon,
Ditto.

On Wed, May 1, 2019 at 3:00 PM Simon McVittie  wrote:
>
> On Wed, 01 May 2019 at 14:30:52 +0300, Damian Ivanov wrote:
> > export WAYLAND_DISPLAY=wayland-1
> > GDK_BACKEND=x11 gedit //starts on wayland-0
>
> If you are using GDK_BACKEND=x11, then gedit is not acting as a native
> Wayland app, so it will not look at WAYLAND_DISPLAY. Instead, it will be
> acting as an X11 app, which obeys the traditional X11 DISPLAY environment
> variable (and in your case it happens to connect to an Xwayland instance
> that is already associated with one of the Wayland displays, but the X11
> backend in GTK has no knowledge of Wayland, so it can't know that).
>
> If you want an application to appear on one of your Wayland displays,
> irrespective of whether that application is using native Wayland or
> X11 via Xwayland, then you need to put a matching pair of WAYLAND_DISPLAY
> and DISPLAY in its environment.
>
> Alternatively, if you let gedit use native Wayland (stop using
> GDK_BACKEND=x11) it will respect WAYLAND_DISPLAY.
>
> smcv
> ___
> wayland-devel mailing list
> wayland-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Fwd: xwayland display variable

2019-05-01 Thread Damian Ivanov
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
 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
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Re: xwayland display variable

2019-05-01 Thread Simon McVittie
On Wed, 01 May 2019 at 14:30:52 +0300, Damian Ivanov wrote:
> export WAYLAND_DISPLAY=wayland-1
> GDK_BACKEND=x11 gedit //starts on wayland-0

If you are using GDK_BACKEND=x11, then gedit is not acting as a native
Wayland app, so it will not look at WAYLAND_DISPLAY. Instead, it will be
acting as an X11 app, which obeys the traditional X11 DISPLAY environment
variable (and in your case it happens to connect to an Xwayland instance
that is already associated with one of the Wayland displays, but the X11
backend in GTK has no knowledge of Wayland, so it can't know that).

If you want an application to appear on one of your Wayland displays,
irrespective of whether that application is using native Wayland or
X11 via Xwayland, then you need to put a matching pair of WAYLAND_DISPLAY
and DISPLAY in its environment.

Alternatively, if you let gedit use native Wayland (stop using
GDK_BACKEND=x11) it will respect WAYLAND_DISPLAY.

smcv
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Re: xwayland display variable

2019-05-01 Thread Scott Anderson

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
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

xwayland display variable

2019-05-01 Thread Damian Ivanov
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
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel