Re: xinitrc follies

"E. Rogan Creswick" <[email protected]>
Newsgroups gmane.org.user-groups.linux.pdxlug
Message-ID <[email protected]>
Carla Schroder writes:
  > #!/bin/sh
 > 
 > ARG=$1
 > DEFAULTWM="afterstep"
 > 
 > if [ ! $ARG ]; then
 >     ARG=$DEFAULTWM
 > fi
 > 
 > if [ $ARG = "gnome" ];then
 >    WM=gnome-session
 > elif [ $ARG = "kde" ];then
 >    WM=startkde
 > elif [ $ARG = "after" ];then
 >    WM=afterstep
 > else
 >    WM=$DEFAULTWM
 > fi
 > 
 > exec $WM
 > 
 > Running 'startx' launches the default. But when I try 'startx gnome' or 
 > 'startx kde', it looks like X starts, then closes right away. Anything I use 
 > as DEFAULTWM works. Any brilliant notions?
 
You have quotes arround the default option when you assign it to
$DEFAULTWM, but you don't have the others quoted (when assigning to
$WM).  Could this be the issue?  I'm not much for bash scripting on
any given day, but a case/esac may be cleaner.

I'd love to see your final solution, this would be cool to have.
(more kudos if there is a "pretty" solution to specifying
ServerLayouts also).

-Rogan

 > 
 > thanks!
 > 
 > -- 
 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 > Carla Schroder
 > this message brought to you
 > by Libranet 2.8 and Kmail
 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 > 
 > _______________________________________________
 > PDXLUG mailing list
 > [email protected]
 > http://pdxlug.org/mailman/listinfo/pdxlug
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.