wayland: change wayland user from weston to root
This commit changes the wayland user from weston to root. That makes video and audio playback possible for the root user. https://onedigi.atlassian.net/browse/DEL-8211 Signed-off-by: Mike Engel <Mike.Engel@digi.com>
This commit is contained in:
parent
a0fa0d3812
commit
bc34bb68e8
|
|
@ -61,7 +61,7 @@ do_install:append() {
|
|||
sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
|
||||
# /etc/default/weston
|
||||
install -d ${D}${sysconfdir}/default
|
||||
echo "WESTON_USER=weston" > ${D}${sysconfdir}/default/weston
|
||||
echo "WESTON_USER=root" > ${D}${sysconfdir}/default/weston
|
||||
|
||||
# check GPU
|
||||
install -d ${D}/home/root/
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ else
|
|||
echo "Configure weston on pixman" > /dev/kmsg
|
||||
echo "#Autogenerated" > /etc/default/weston
|
||||
echo "OPTARGS=--use-pixman" >> /etc/default/weston
|
||||
echo "WESTON_USER=weston" >> /etc/default/weston
|
||||
echo "WESTON_USER=root" >> /etc/default/weston
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -29,11 +29,7 @@ do
|
|||
done
|
||||
EOF
|
||||
chmod +x /tmp/pulse_temp_switch.sh
|
||||
if [ "$USER" == "weston" ]; then
|
||||
script -qc "/tmp/pulse_temp_switch.sh"
|
||||
else
|
||||
script -qc "su -l weston -c /tmp/pulse_temp_switch.sh"
|
||||
fi
|
||||
script -qc "/tmp/pulse_temp_switch.sh"
|
||||
|
||||
rm -f /tmp/pulse_temp_switch.sh
|
||||
|
||||
|
|
|
|||
|
|
@ -30,11 +30,11 @@ ConditionPathExists=/dev/tty0
|
|||
# Requires systemd-notify.so Weston plugin.
|
||||
#Type=notify
|
||||
EnvironmentFile=-/etc/default/weston
|
||||
Environment="XDG_RUNTIME_DIR=/home/weston"
|
||||
Environment="WESTON_USER=weston"
|
||||
Environment="XDG_RUNTIME_DIR=/home/root"
|
||||
Environment="WESTON_USER=root"
|
||||
Environment="WL_EGL_GBM_FENCE=0"
|
||||
#ExecStart=/usr/bin/weston-launch -- --modules=systemd-notify.so --log=/home/weston/weston.log $OPTARGS
|
||||
ExecStart=/usr/bin/weston-start --modules=systemd-notify.so --log=/home/weston/weston.log $OPTARGS
|
||||
ExecStart=/usr/bin/weston-start --modules=systemd-notify.so --log=/home/root/weston.log $OPTARGS
|
||||
ExecStop=/usr/bin/killall weston-launch
|
||||
|
||||
# Optional watchdog setup
|
||||
|
|
@ -42,11 +42,11 @@ ExecStop=/usr/bin/killall weston-launch
|
|||
#WatchdogSec=20
|
||||
|
||||
# The user to run Weston as.
|
||||
User=weston
|
||||
Group=weston
|
||||
User=root
|
||||
Group=root
|
||||
|
||||
# Make sure the working directory is the users home directory
|
||||
WorkingDirectory=/home/weston
|
||||
WorkingDirectory=/home/root
|
||||
|
||||
# Set up a full user session for the user, required by Weston.
|
||||
PAMName=weston-autologin
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
weston_args=$*
|
||||
|
||||
if [ -z "$WESTON_USER" ]; then
|
||||
WESTON_USER=weston
|
||||
WESTON_USER=root
|
||||
fi
|
||||
if [ "$USER" != "$WESTON_USER" ]; then
|
||||
weston_args_user="-u $WESTON_USER"
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
if [ "$USER" == "weston" ]; then
|
||||
export XDG_RUNTIME_DIR=/run/user/`id -u weston`
|
||||
if [ "$USER" == "root" ]; then
|
||||
export XDG_RUNTIME_DIR=/run/user/`id -u root`
|
||||
|
||||
export ELM_ENGINE=wayland_shm
|
||||
export ECORE_EVAS_ENGINE=wayland_shm
|
||||
export ECORE_EVAS_ENGINE=wayland_shm
|
||||
export GDK_BACKEND=wayland
|
||||
export PULSE_RUNTIME_PATH=/run/user/`id -u weston`
|
||||
export PULSE_RUNTIME_PATH=/run/user/`id -u root`
|
||||
if [ -e $XDG_RUNTIME_DIR/wayland-0 ]; then
|
||||
export WAYLAND_DISPLAY=wayland-0
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue