summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/wayland/weston-init
diff options
context:
space:
mode:
authorTom Hochstein <tom.hochstein@nxp.com>2018-06-25 21:11:45 -0500
committerOtavio Salvador <otavio@ossystems.com.br>2018-07-05 15:32:27 -0300
commit6c50f608063f673f8763d2baebf1c486cb5ed63a (patch)
tree5c452a28b6a849e6397c46a8e426a6c90cf6bd16 /recipes-graphics/wayland/weston-init
parent3650dc2b1d17ea3d3c0388a890592f89c47d84de (diff)
downloadmeta-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')
-rw-r--r--recipes-graphics/wayland/weston-init/imxdrm/weston.config3
-rw-r--r--recipes-graphics/wayland/weston-init/mx8mm/weston.config3
-rw-r--r--recipes-graphics/wayland/weston-init/weston.config2
-rw-r--r--recipes-graphics/wayland/weston-init/weston.service38
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
2OPTARGS="--xwayland"
3DESKTOP_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
2OPTARGS="--xwayland --use-g2d=1"
3DESKTOP_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
2OPTARGS="--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]
2Description=Weston Wayland Compositor (on tty7)
3RequiresMountsFor=/run
4Conflicts=getty@tty7.service plymouth-quit.service
5After=systemd-user-sessions.service getty@tty7.service plymouth-quit-wait.service
6
7[Service]
8User=root
9PermissionsStartOnly=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:
13PAMName=login
14
15# Grab tty7
16UtmpIdentifier=tty7
17TTYPath=/dev/tty7
18TTYReset=yes
19TTYVHangup=yes
20TTYVTDisallocate=yes
21
22# stderr to journal so our logging doesn't get thrown into /dev/null
23StandardOutput=tty
24StandardInput=tty
25StandardError=journal
26
27EnvironmentFile=-/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:
31ExecStartPre=/usr/bin/chvt 7
32ExecStart=/usr/bin/weston-launch -- --log=/var/log/weston.log $OPTARGS
33
34IgnoreSIGPIPE=no
35
36[Install]
37WantedBy=multi-user.target
38