diff options
author | Tom Hochstein <tom.hochstein@nxp.com> | 2018-06-25 21:11:45 -0500 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2018-07-05 15:32:27 -0300 |
commit | 6c50f608063f673f8763d2baebf1c486cb5ed63a (patch) | |
tree | 5c452a28b6a849e6397c46a8e426a6c90cf6bd16 /recipes-graphics/wayland/weston-init | |
parent | 3650dc2b1d17ea3d3c0388a890592f89c47d84de (diff) | |
download | meta-freescale-6c50f608063f673f8763d2baebf1c486cb5ed63a.tar.gz |
weston-init: Fix inoperable Weston desktop
For an image configured with pam and systemd, Weston apps
would fail to run. For example:
$ weston-terminal
failed to connect to Wayland display: No such file or directory
failed to create display: No such file or directory
This fix is based on a proposal by Daniel Diaz to OE-core. The
main part of the fix is the use of a new, manually created tty.
The original proposal called weston directly, but that didn't
seem to work where weston-launch did.
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-graphics/wayland/weston-init')
4 files changed, 46 insertions, 0 deletions
diff --git a/recipes-graphics/wayland/weston-init/imxdrm/weston.config b/recipes-graphics/wayland/weston-init/imxdrm/weston.config new file mode 100644 index 00000000..5693d6cb --- /dev/null +++ b/recipes-graphics/wayland/weston-init/imxdrm/weston.config | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | OPTARGS="--xwayland" | ||
3 | DESKTOP_SHELL_WINDOW=1920x1080 | ||
diff --git a/recipes-graphics/wayland/weston-init/mx8mm/weston.config b/recipes-graphics/wayland/weston-init/mx8mm/weston.config new file mode 100644 index 00000000..eb990e40 --- /dev/null +++ b/recipes-graphics/wayland/weston-init/mx8mm/weston.config | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | OPTARGS="--xwayland --use-g2d=1" | ||
3 | DESKTOP_SHELL_WINDOW=1920x1080 | ||
diff --git a/recipes-graphics/wayland/weston-init/weston.config b/recipes-graphics/wayland/weston-init/weston.config new file mode 100644 index 00000000..7c92cf11 --- /dev/null +++ b/recipes-graphics/wayland/weston-init/weston.config | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/sh | ||
2 | OPTARGS="--xwayland" | ||
diff --git a/recipes-graphics/wayland/weston-init/weston.service b/recipes-graphics/wayland/weston-init/weston.service new file mode 100644 index 00000000..44c5a82f --- /dev/null +++ b/recipes-graphics/wayland/weston-init/weston.service | |||
@@ -0,0 +1,38 @@ | |||
1 | [Unit] | ||
2 | Description=Weston Wayland Compositor (on tty7) | ||
3 | RequiresMountsFor=/run | ||
4 | Conflicts=getty@tty7.service plymouth-quit.service | ||
5 | After=systemd-user-sessions.service getty@tty7.service plymouth-quit-wait.service | ||
6 | |||
7 | [Service] | ||
8 | User=root | ||
9 | PermissionsStartOnly=true | ||
10 | |||
11 | # Log us in via PAM so we get our XDG & co. environment and | ||
12 | # are treated as logged in so we can use the tty: | ||
13 | PAMName=login | ||
14 | |||
15 | # Grab tty7 | ||
16 | UtmpIdentifier=tty7 | ||
17 | TTYPath=/dev/tty7 | ||
18 | TTYReset=yes | ||
19 | TTYVHangup=yes | ||
20 | TTYVTDisallocate=yes | ||
21 | |||
22 | # stderr to journal so our logging doesn't get thrown into /dev/null | ||
23 | StandardOutput=tty | ||
24 | StandardInput=tty | ||
25 | StandardError=journal | ||
26 | |||
27 | EnvironmentFile=-/etc/default/weston | ||
28 | |||
29 | # Weston does not successfully change VT, nor does systemd place us on | ||
30 | # the VT it just activated for us. Switch manually: | ||
31 | ExecStartPre=/usr/bin/chvt 7 | ||
32 | ExecStart=/usr/bin/weston-launch -- --log=/var/log/weston.log $OPTARGS | ||
33 | |||
34 | IgnoreSIGPIPE=no | ||
35 | |||
36 | [Install] | ||
37 | WantedBy=multi-user.target | ||
38 | |||