Running multiple Wayland window managers in different ttys

Deepak Jois deepak.jois at gmail.com
Fri Oct 20 16:50:09 UTC 2017


Hi

I have read the Wayland docs and skimmed through the API reference,
and I am trying to understand some concepts better. The questions
below are probably a bit naive, but I appreciate any
suggestions/explanations.

To illustrate my situation better, let me start with an actual
scenario I tried to make work. I am trying to run Gnome and another
Wayland-based window manager (Sway or Weston) in two different ttys as
the same user.

I have Gnome running under Wayland on tty2. The Gnome session is
running some app like gnome-terminal.

I do the following:

* Press Ctrl-Alt-F3 (switching to tty3, the lowest free tty)
* Login as the same user running the Gnome session
* Launch sway
* Launch urxvt and try to launch gnome-terminal.

Now I have two issues I am trying to understand better:

1. When I check the WAYLAND_DISPLAY variable in the sway session, it
shows 'wayland-0', which is the same as the one show in the Gnome
session. Why is it the same? Does Wayland have a concept of multiple
servers/sessions per user? Can I run the Gnome session and the Sway
session separately?

2. I tried explicitly setting the WAYLAND_DISPLAY to wayland-1. It has
no effect on Sway. The WAYLAND_DISPLAY variable is reset inside the
session to wayland-0. But when I try to launch Weston, it errors out
(log below). Is this expected, or is this a bug?

$ export WAYLAND_DISPLAY=wayland-1
$ weston
Date: 2017-10-20 IST
[15:30:09.457] weston 3.0.0
               http://wayland.freedesktop.org
               Bug reports to:
https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=3.0.0
               Build: unknown (not built from git or tarball)
[15:30:09.457] Command line: weston
[15:30:09.457] OS: Linux, 4.13.7-1-ARCH, #1 SMP PREEMPT Sat Oct 14
20:13:26 CEST 2017, x86_64
[15:30:09.457] Starting with no config file.
[15:30:09.457] Output repaint window is 7 ms maximum.
[15:30:09.457] Loading module '/usr/lib/libweston-3/wayland-backend.so'
[15:30:09.460] failed to create display: No such file or directory
[15:30:09.460] fatal: failed to create compositor backend

3. I am seeing a weird side-effect when launching gnome-terminal in
Sway. The terminal actually opens up in the Gnome session. I was
hoping I could use gnome-terminal inside Sway. The behavior is the
same with Weston. I realise that Gnome terminal executes a single
gnome-terminal-server process that is bound to the same TTY, so I am
guessing that is the root cause. It may not be something that is
related to Wayland at all. Am I right?

Deepak


More information about the wayland-devel mailing list