SysVinit sets by default the $HOME directory to "/" for the init scripts.
 It's picked then by the weston-launcher and make weston-terminal to have
 wrongly set $HOME environment variable for the root user.

Signed-off-by: Adrian Fiergolski <adrian.fiergol...@fastree3d.com>
---
 Sorry, the previous patch far wrongly formatted.
 
 meta/recipes-graphics/wayland/weston-init.bb   | 1 +
 meta/recipes-graphics/wayland/weston-init/init | 1 +
 2 files changed, 2 insertions(+)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 65d7b81dc5..6b78e6722f 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -30,6 +30,7 @@ DEFAULTBACKEND_x86-x32 = "fbdev"
 do_install() {
         if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
                install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
+               sed -i 's#ROOTHOME#${ROOT_HOME}#' 
${D}/${sysconfdir}/init.d/weston
         fi
        install -D -p -m0644 ${WORKDIR}/weston.ini 
${D}${sysconfdir}/xdg/weston/weston.ini
        install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
diff --git a/meta/recipes-graphics/wayland/weston-init/init 
b/meta/recipes-graphics/wayland/weston-init/init
index d3e87c6cef..a849f29bcb 100644
--- a/meta/recipes-graphics/wayland/weston-init/init
+++ b/meta/recipes-graphics/wayland/weston-init/init
@@ -30,6 +30,7 @@ done
 case "$1" in
   start)
         . /etc/profile
+       export HOME=ROOTHOME
 
         weston-start -- $OPTARGS
   ;;
-- 
2.30.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#149467): 
https://lists.openembedded.org/g/openembedded-core/message/149467
Mute This Topic: https://lists.openembedded.org/mt/81351162/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to