[OE-core] [PATCH] mini-x-session: Fix starting of x-session

Saul Wold sgw at linux.intel.com
Tue Feb 26 00:41:50 UTC 2013


We need to use sudo semantics since it does not start correctly
with su.

The test was constructed incorrectly.

Signed-off-by: Saul Wold <sgw at linux.intel.com>
---
 meta/recipes-graphics/mini-x-session/files/mini-x-session | 5 +++--
 1 file changed, 3 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 91f1592..dca655a 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
-- 
1.8.0.2





More information about the Openembedded-core mailing list