diff options
Diffstat (limited to 'poky/meta/recipes-graphics/wayland/weston-init')
-rw-r--r-- | poky/meta/recipes-graphics/wayland/weston-init/71-weston-drm.rules | 2 | ||||
-rwxr-xr-x | poky/meta/recipes-graphics/wayland/weston-init/weston-start | 6 | ||||
-rw-r--r-- | poky/meta/recipes-graphics/wayland/weston-init/weston.service (renamed from poky/meta/recipes-graphics/wayland/weston-init/weston@.service) | 14 | ||||
-rw-r--r-- | poky/meta/recipes-graphics/wayland/weston-init/weston.socket | 14 | ||||
-rw-r--r-- | poky/meta/recipes-graphics/wayland/weston-init/weston@.socket | 10 |
5 files changed, 29 insertions, 17 deletions
diff --git a/poky/meta/recipes-graphics/wayland/weston-init/71-weston-drm.rules b/poky/meta/recipes-graphics/wayland/weston-init/71-weston-drm.rules deleted file mode 100644 index 1a1b8bbda..000000000 --- a/poky/meta/recipes-graphics/wayland/weston-init/71-weston-drm.rules +++ /dev/null @@ -1,2 +0,0 @@ -ACTION=="add", SUBSYSTEM=="graphics", KERNEL=="fb0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="weston@root.service" -ACTION=="add", SUBSYSTEM=="drm", KERNEL=="card0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="weston@root.service" diff --git a/poky/meta/recipes-graphics/wayland/weston-init/weston-start b/poky/meta/recipes-graphics/wayland/weston-init/weston-start index ccc709342..0b93dc964 100755 --- a/poky/meta/recipes-graphics/wayland/weston-init/weston-start +++ b/poky/meta/recipes-graphics/wayland/weston-init/weston-start @@ -33,6 +33,10 @@ if [ -n "$WESTON_USER" ]; then echo "ERROR: If you have WESTON_USER variable set, you also need WESTON_TTY." exit 1 fi + if [ -z "$WESTON_GROUP" ]; then + # no explicit WESTON_GROUP given, therefore use WESTON_USER + export WESTON_GROUP="${WESTON_USER}" + fi weston_args_user="-u $WESTON_USER -t $WESTON_TTY" fi @@ -75,7 +79,7 @@ if test -z "$XDG_RUNTIME_DIR"; then fi if [ -n "$WESTON_USER" ] then - chown $WESTON_USER:$WESTON_USER $XDG_RUNTIME_DIR + chown $WESTON_USER:$WESTON_GROUP $XDG_RUNTIME_DIR fi fi diff --git a/poky/meta/recipes-graphics/wayland/weston-init/weston@.service b/poky/meta/recipes-graphics/wayland/weston-init/weston.service index ce8f4fb71..e09625b31 100644 --- a/poky/meta/recipes-graphics/wayland/weston-init/weston@.service +++ b/poky/meta/recipes-graphics/wayland/weston-init/weston.service @@ -9,6 +9,7 @@ Documentation=man:weston(1) man:weston.ini(5) Documentation=http://wayland.freedesktop.org/ # Make sure we are started after logins are permitted. +Requires=systemd-user-sessions.service After=systemd-user-sessions.service # If Plymouth is used, we want to start when it is on its way out. @@ -18,6 +19,9 @@ After=plymouth-quit-wait.service Wants=dbus.socket After=dbus.socket +# Ensure the socket is present +Requires=weston.socket + # Since we are part of the graphical session, make sure we are started before # it is complete. Before=graphical.target @@ -37,10 +41,11 @@ TimeoutStartSec=60 WatchdogSec=20 # The user to run Weston as. -User=%I +User=weston +Group=weston -# Make sure working directory is users home directory -WorkingDirectory=/home/%i +# Make sure the working directory is the users home directory +WorkingDirectory=/home/weston # Set up a full user session for the user, required by Weston. PAMName=weston-autologin @@ -61,5 +66,6 @@ UtmpIdentifier=tty7 UtmpMode=user [Install] +# Note: If you only want weston to start on-demand, remove this line with a +# service drop file WantedBy=graphical.target -DefaultInstance=tty7 diff --git a/poky/meta/recipes-graphics/wayland/weston-init/weston.socket b/poky/meta/recipes-graphics/wayland/weston-init/weston.socket new file mode 100644 index 000000000..c1bdc83c0 --- /dev/null +++ b/poky/meta/recipes-graphics/wayland/weston-init/weston.socket @@ -0,0 +1,14 @@ +[Unit] +Description=Weston socket +RequiresMountsFor=/run + +[Socket] +ListenStream=/run/wayland-0 +SocketMode=0775 +SocketUser=weston +SocketGroup=wayland +RemoveOnStop=yes + +[Install] +WantedBy=sockets.target + diff --git a/poky/meta/recipes-graphics/wayland/weston-init/weston@.socket b/poky/meta/recipes-graphics/wayland/weston-init/weston@.socket deleted file mode 100644 index f1790d74a..000000000 --- a/poky/meta/recipes-graphics/wayland/weston-init/weston@.socket +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Weston Wayland socket -After=user-runtime-dir@1000.service - -[Socket] -ListenStream=/run/user/1000/wayland-%I - -[Install] -WantedBy=sockets.target - |