diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2013-02-01 00:36:15 -0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-01 15:54:00 +0000 |
commit | 982eefe22dba0f007010465e31d5d6adcc59e4d0 (patch) | |
tree | 016681088719293f882c1d75911e93485acd5363 /meta | |
parent | 3ca9ff71dd492fe36e47cfce59ecfd7238e71a8e (diff) | |
download | poky-982eefe22dba0f007010465e31d5d6adcc59e4d0.tar.gz |
mini-x-session: Fix runtime when using without session contents
The script where behaving badly when the session directory does not
exist and also lacking a dependency to 'sudo'. Instead of adding a
dependency on 'sudo' we use 'su' as done in xserver-common.
(From OE-Core rev: 84b58ed421fd14796ddcbc4cc7fc13a5a098d6cc)
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-graphics/mini-x-session/files/mini-x-session | 18 | ||||
-rw-r--r-- | meta/recipes-graphics/mini-x-session/mini-x-session_0.1.bb | 2 |
2 files changed, 11 insertions, 9 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 f7d6c3bdb1..91f1592c25 100644 --- a/meta/recipes-graphics/mini-x-session/files/mini-x-session +++ b/meta/recipes-graphics/mini-x-session/files/mini-x-session | |||
@@ -17,14 +17,16 @@ exec /etc/mini_x/session | |||
17 | fi | 17 | fi |
18 | 18 | ||
19 | MINI_X_SESSION_DIR=/etc/mini_x/session.d | 19 | MINI_X_SESSION_DIR=/etc/mini_x/session.d |
20 | 20 | if [ -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 | for SESSIONFILE in $MINI_X_SESSION_DIR/*; 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 | sudo -b -i -u $USERNAME $SESSIONFILE& | 25 | # Using su rather than sudo as latest 1.8.1 cause failure [YOCTO #1211] |
26 | set -e | 26 | su -l -c '$SESSIONFILE&' $USERNAME |
27 | done | 27 | set -e |
28 | done | ||
29 | fi | ||
28 | 30 | ||
29 | # This resolution is big enough for hob2's max window size. | 31 | # This resolution is big enough for hob2's max window size. |
30 | xrandr -s 1024x768 | 32 | xrandr -s 1024x768 |
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 6f7efb2560..8106cbbf55 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 | |||
@@ -2,7 +2,7 @@ DESCRIPTION = "Mini X session files for poky" | |||
2 | HOMEPAGE = "http://www.yoctoproject.org" | 2 | HOMEPAGE = "http://www.yoctoproject.org" |
3 | BUGTRACKER = "http://bugzilla.pokylinux.org" | 3 | BUGTRACKER = "http://bugzilla.pokylinux.org" |
4 | 4 | ||
5 | PR = "r3" | 5 | PR = "r4" |
6 | 6 | ||
7 | LICENSE = "GPLv2" | 7 | LICENSE = "GPLv2" |
8 | LIC_FILES_CHKSUM = "file://mini-x-session;endline=5;md5=b6430bffbcf05f9760e72938826b7487" | 8 | LIC_FILES_CHKSUM = "file://mini-x-session;endline=5;md5=b6430bffbcf05f9760e72938826b7487" |