summaryrefslogtreecommitdiff
path: root/meta/recipes-graphics/mini-x-session
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2013-02-21 08:11:50 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-28 23:14:40 +0000
commitbadf3a32b9737f2ad6f9c9ff2fe623fe17295946 (patch)
treee33a918d9efc29f7b29a12692af03a4152a48a28 /meta/recipes-graphics/mini-x-session
parent0a00a4328d3fc52ece604f268b7110ef210826a9 (diff)
downloadopenembedded-core-badf3a32b9737f2ad6f9c9ff2fe623fe17295946.tar.gz
openembedded-core-badf3a32b9737f2ad6f9c9ff2fe623fe17295946.tar.bz2
openembedded-core-badf3a32b9737f2ad6f9c9ff2fe623fe17295946.zip
mini-x-session: Fix starting of x-session
We need to use sudo semantics since it does not start correctly with su. Added RDEPENDS to ensure it's present on target. The SESSION_DIR test was constructed incorrectly, so fixed it. Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-graphics/mini-x-session')
-rw-r--r--meta/recipes-graphics/mini-x-session/files/mini-x-session5
-rw-r--r--meta/recipes-graphics/mini-x-session/mini-x-session_0.1.bb2
2 files changed, 5 insertions, 2 deletions
diff --git a/meta/recipes-graphics/mini-x-session/files/mini-x-session b/meta/recipes-graphics/mini-x-session/files/mini-x-session
index 91f1592c25..dca655a913 100644
--- a/meta/recipes-graphics/mini-x-session/files/mini-x-session
+++ b/meta/recipes-graphics/mini-x-session/files/mini-x-session
@@ -17,13 +17,14 @@ exec /etc/mini_x/session
fi
MINI_X_SESSION_DIR=/etc/mini_x/session.d
-if [ -d "$MINI_X_SESSION_DIR"]; then
+if [ -d "$MINI_X_SESSION_DIR" ]; then
# Execute session file on behalf of file owner
find $MINI_X_SESSION_DIR -type f | while read SESSIONFILE; do
set +e
USERNAME=`stat -c %U $SESSIONFILE`
# Using su rather than sudo as latest 1.8.1 cause failure [YOCTO #1211]
- su -l -c '$SESSIONFILE&' $USERNAME
+# su -l -c '$SESSIONFILE&' $USERNAME
+ sudo -b -i -u $USERNAME $SESSIONFILE&
set -e
done
fi
diff --git a/meta/recipes-graphics/mini-x-session/mini-x-session_0.1.bb b/meta/recipes-graphics/mini-x-session/mini-x-session_0.1.bb
index 8106cbbf55..3819ee350e 100644
--- a/meta/recipes-graphics/mini-x-session/mini-x-session_0.1.bb
+++ b/meta/recipes-graphics/mini-x-session/mini-x-session_0.1.bb
@@ -13,6 +13,8 @@ RCONFLICTS_${PN} = "matchbox-common"
SRC_URI = "file://mini-x-session"
S = "${WORKDIR}"
+RDEPENDS_${PN} = "sudo"
+
inherit update-alternatives
ALTERNATIVE_${PN} = "x-session-manager"