Running multiple Wayland window managers in different ttys

Deepak Jois deepak.jois at
Sat Oct 21 05:36:38 UTC 2017

On Sat, Oct 21, 2017 at 12:28 AM, Matt Hoosier <matt.hoosier at> wrote:
> The trick here is to inform each compositor that it should be
> listening on a different Wayland socket name. For example, if you use
> Weston:
>     $ weston --socket=wayland-1
> This will cause Weston to establish its listening socket under the
> name /run/user/<uid>/wayland-1 rather than the default
> /run/user/<uid>/wayland-0. I think you're running into collisions
> where each of your compositor instances is mislead into believing that
> it successfully managed to appropriate /run/user/<uid>/wayland-0 for
> itself.

That worked. I have a follow up question. From what you are saying, it
sounds like it is preferable for two independent window managers
running as the same user to create two different listening sockets. It
isnt a good idea for the compositors of say Gnome and Sway to share
the same listening socket. Am I right?

> Also (at least for Weston), the value of the '--socket' parameter is
> used to automatically compute and set the value of the
> $WAYLAND_DISPLAY environment variable which is then passed along to
> all children of the compositor. Presumably for you, your desktop
> environment (e.g., Weston's desktop-shell) is the starting point from
> which you're launching other graphical programs. They will all in turn
> inherit this correct value of $WAYLAND_DISPLAY too.

Ok, that is useful info. I will try and compare the source code of
weston and sway to see if sway could do something similar.

Thanks Deepak

More information about the wayland-devel mailing list