summaryrefslogtreecommitdiffstats
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:15:49 +0000
commit3312a2fd9097636fccd7c439369926a806956221 (patch)
tree76a5220f13b571b092a949b271411deb6a146cc0 /meta/recipes-graphics/mini-x-session
parent16e8d79ba4c3db1bc6e8242cf2eee9c853a4b6c6 (diff)
downloadpoky-3312a2fd9097636fccd7c439369926a806956221.tar.gz
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. (From OE-Core rev: badf3a32b9737f2ad6f9c9ff2fe623fe17295946) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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
17fi 17fi
18 18
19MINI_X_SESSION_DIR=/etc/mini_x/session.d 19MINI_X_SESSION_DIR=/etc/mini_x/session.d
20if [ -d "$MINI_X_SESSION_DIR"]; then 20if [ -d "$MINI_X_SESSION_DIR" ]; then
21 # Execute session file on behalf of file owner 21 # Execute session file on behalf of file owner
22 find $MINI_X_SESSION_DIR -type f | while read SESSIONFILE; do 22 find $MINI_X_SESSION_DIR -type f | while read SESSIONFILE; do
23 set +e 23 set +e
24 USERNAME=`stat -c %U $SESSIONFILE` 24 USERNAME=`stat -c %U $SESSIONFILE`
25 # Using su rather than sudo as latest 1.8.1 cause failure [YOCTO #1211] 25 # Using su rather than sudo as latest 1.8.1 cause failure [YOCTO #1211]
26 su -l -c '$SESSIONFILE&' $USERNAME 26# su -l -c '$SESSIONFILE&' $USERNAME
27 sudo -b -i -u $USERNAME $SESSIONFILE&
27 set -e 28 set -e
28 done 29 done
29fi 30fi
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"
13SRC_URI = "file://mini-x-session" 13SRC_URI = "file://mini-x-session"
14S = "${WORKDIR}" 14S = "${WORKDIR}"
15 15
16RDEPENDS_${PN} = "sudo"
17
16inherit update-alternatives 18inherit update-alternatives
17 19
18ALTERNATIVE_${PN} = "x-session-manager" 20ALTERNATIVE_${PN} = "x-session-manager"