Author: qboosh
Date: Sat Mar 31 07:16:24 2012
New Revision: 12535

Modified:
   xinitrc-ng/trunk/Xclients
Log:
- fixed xsession type finding by altnames or by non-literal user's choice

Modified: xinitrc-ng/trunk/Xclients
==============================================================================
--- xinitrc-ng/trunk/Xclients   (original)
+++ xinitrc-ng/trunk/Xclients   Sat Mar 31 07:16:24 2012
@@ -51,14 +51,14 @@
                        if [ "$n" = "$__XSESSION" ]; then
                                progname=$(grep "^Exec=" $f)
                                progname=${progname##Exec=}
-                               break
+                               break 2
                        fi
                done
        done
        echo $progname
 }
 
-[ -f $syswmfile ] && . $syswmfile    
+[ -f $syswmfile ] && . $syswmfile
 
 # HOME_ETC support
 if [ -n "$HOME_ETC" ]; then
@@ -78,15 +78,15 @@
 [ -n "$*" ] && USERWM="$*"
 
 if [ -n "$USERWM" ]; then
-        # Tray to run literal user choice first
+        # Try to run literal user choice first
        loadsess $USERWM
        # if it fails - take another actions
        WM_CHOICE=$(findxsession $USERWM)
-       if [ -z "$WM_CHOICE" ]; then
-               echo "Sorry - nothing known about $USERWM" >&2
-               echo "Resuming with system defaults..." >&2
-               WM_CHOICE=$DEFAULTWM
-       fi      
+       if [ -n "$WM_CHOICE" ]; then
+               loadsess $WM_CHOICE
+       fi
+       echo "Sorry - nothing known about $USERWM" >&2
+       echo "Resuming with system defaults..." >&2
 fi
 
 loadsess $DEFAULTWM
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to