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
|
sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
|
||||||
# /etc/default/weston
|
# /etc/default/weston
|
||||||
install -d ${D}${sysconfdir}/default
|
install -d ${D}${sysconfdir}/default
|
||||||
echo "WESTON_USER=weston" > ${D}${sysconfdir}/default/weston
|
echo "WESTON_USER=root" > ${D}${sysconfdir}/default/weston
|
||||||
|
|
||||||
# check GPU
|
# check GPU
|
||||||
install -d ${D}/home/root/
|
install -d ${D}/home/root/
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ else
|
||||||
echo "Configure weston on pixman" > /dev/kmsg
|
echo "Configure weston on pixman" > /dev/kmsg
|
||||||
echo "#Autogenerated" > /etc/default/weston
|
echo "#Autogenerated" > /etc/default/weston
|
||||||
echo "OPTARGS=--use-pixman" >> /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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,11 +29,7 @@ do
|
||||||
done
|
done
|
||||||
EOF
|
EOF
|
||||||
chmod +x /tmp/pulse_temp_switch.sh
|
chmod +x /tmp/pulse_temp_switch.sh
|
||||||
if [ "$USER" == "weston" ]; then
|
script -qc "/tmp/pulse_temp_switch.sh"
|
||||||
script -qc "/tmp/pulse_temp_switch.sh"
|
|
||||||
else
|
|
||||||
script -qc "su -l weston -c /tmp/pulse_temp_switch.sh"
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f /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.
|
# Requires systemd-notify.so Weston plugin.
|
||||||
#Type=notify
|
#Type=notify
|
||||||
EnvironmentFile=-/etc/default/weston
|
EnvironmentFile=-/etc/default/weston
|
||||||
Environment="XDG_RUNTIME_DIR=/home/weston"
|
Environment="XDG_RUNTIME_DIR=/home/root"
|
||||||
Environment="WESTON_USER=weston"
|
Environment="WESTON_USER=root"
|
||||||
Environment="WL_EGL_GBM_FENCE=0"
|
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-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
|
ExecStop=/usr/bin/killall weston-launch
|
||||||
|
|
||||||
# Optional watchdog setup
|
# Optional watchdog setup
|
||||||
|
|
@ -42,11 +42,11 @@ ExecStop=/usr/bin/killall weston-launch
|
||||||
#WatchdogSec=20
|
#WatchdogSec=20
|
||||||
|
|
||||||
# The user to run Weston as.
|
# The user to run Weston as.
|
||||||
User=weston
|
User=root
|
||||||
Group=weston
|
Group=root
|
||||||
|
|
||||||
# Make sure the working directory is the users home directory
|
# 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.
|
# Set up a full user session for the user, required by Weston.
|
||||||
PAMName=weston-autologin
|
PAMName=weston-autologin
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
weston_args=$*
|
weston_args=$*
|
||||||
|
|
||||||
if [ -z "$WESTON_USER" ]; then
|
if [ -z "$WESTON_USER" ]; then
|
||||||
WESTON_USER=weston
|
WESTON_USER=root
|
||||||
fi
|
fi
|
||||||
if [ "$USER" != "$WESTON_USER" ]; then
|
if [ "$USER" != "$WESTON_USER" ]; then
|
||||||
weston_args_user="-u $WESTON_USER"
|
weston_args_user="-u $WESTON_USER"
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
if [ "$USER" == "weston" ]; then
|
if [ "$USER" == "root" ]; then
|
||||||
export XDG_RUNTIME_DIR=/run/user/`id -u weston`
|
export XDG_RUNTIME_DIR=/run/user/`id -u root`
|
||||||
|
|
||||||
export ELM_ENGINE=wayland_shm
|
export ELM_ENGINE=wayland_shm
|
||||||
export ECORE_EVAS_ENGINE=wayland_shm
|
export ECORE_EVAS_ENGINE=wayland_shm
|
||||||
export ECORE_EVAS_ENGINE=wayland_shm
|
export ECORE_EVAS_ENGINE=wayland_shm
|
||||||
export GDK_BACKEND=wayland
|
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
|
if [ -e $XDG_RUNTIME_DIR/wayland-0 ]; then
|
||||||
export WAYLAND_DISPLAY=wayland-0
|
export WAYLAND_DISPLAY=wayland-0
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue