Skip to contentSkip to conversation

mini-x-session: Fix starting of x-session

PATCH In review Saul Wold 2 participants 2 messages Feb 26, 2013

lore
Share & tools
lore

Saul Wold

author
#0 lore raw

PATCH 1/1 mini-x-session: Fix starting of x-session

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

The test was constructed incorrectly.

---
 meta/recipes-graphics/mini-x-session/files/mini-x-session | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-graphics/mini-x-session/files/mini-x-session +3 -2
index 91f1592..dca655a 100644
@@ -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
Signature · 1 line
1.8.0.2
#1 lore raw
Quoted 6 lines · Saul Wold

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

The test was constructed incorrectly.

Please add a rdepends on sudo in this case.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br