On Tue, 19 May 2015 14:38:57 -0400 "Bob Goodwin - Zuni, Virginia, USA" <bobgoodwin@xxxxxxxxxxxx> wrote: > I called it START, it looks like it may need some changing, will I > have to remove [comment] the lines referring to stuff I don't have? > > [bobg@raspberrypi ~]$ ./START > *** Replacing existing ~/.Xclients or creating new one. > ./START: line 109: syntax error near unexpected token `newline' > ./START: line 109: ` echo 'CSESSION="$(type -p > cinnamon-session-cinnamon2d)"' >>' > > No, unless you select them it will ignore them. The problem is that when I pasted the script, some of the lines wrapped, and so the wrapped portion is out of context and generates errors. Here is a version pasted without wrap. If you select lightdm as the started service, you will have to change the switch-to-user to be your username instead of mine. #! /bin/bash #X Window Manager Chooser Script # run the default common X initialization scripts # By using ~/.Xclients instead of ~/.xinitrc # this is run automatically #source /etc/X11/xinit/xinitrc-common XCLIENTS=/home/$USER/.Xclients echo '*** Replacing existing ~/.Xclients or creating new one.' echo '#! /bin/bash' > $XCLIENTS echo ' ' >> $XCLIENTS chmod +x $XCLIENTS if [ "$1" = fb ]; then echo 'exec startfluxbox' >> $XCLIENTS echo 'Starting Fluxbox...' elif [ "$1" = ob ]; then echo 'exec openbox-session' >> $XCLIENTS echo 'Starting Openbox...' elif [ "$1" = fv ]; then echo 'exec fvwm' >> $XCLIENTS echo 'Starting FVWM...' elif [ "$1" = en ]; then echo 'xset b off s 10000 -dpms &' >> $XCLIENTS echo 'exec enlightenment_start' >> $XCLIENTS echo 'Starting Enlightenment (E17)...' elif [ "$1" = lx ]; then echo 'exec startlxde' >> $XCLIENTS echo 'Starting X with LXDE...' elif [ "$1" = xf ]; then echo 'exec startxfce4' >> $XCLIENTS echo 'Starting X with XFCE...' elif [ "$1" = xt ]; then echo 'exec xterm' >> $XCLIENTS echo 'Starting X with xterm...' elif [ "$1" = kd ]; then echo 'STARTKDE="$(type -p startkde)"' >> $XCLIENTS echo 'exec $STARTKDE' >> $XCLIENTS echo 'Starting X with KDE...' elif [ "$1" = gn ]; then echo 'GSESSION="$(type -p gnome-session)"' >> $XCLIENTS echo 'exec $GSESSION' >> $XCLIENTS echo 'Starting X with Gnome...' elif [ "$1" = ma ]; then echo 'MSESSION="$(type -p mate-session)"' >> $XCLIENTS echo 'exec $MSESSION' >> $XCLIENTS echo 'Starting X with MATE...' elif [ "$1" = ci ]; then echo 'CSESSION="$(type -p cinnamon-session-cinnamon2d)"' >> $XCLIENTS echo 'exec $CSESSION' >> $XCLIENTS echo 'Starting X with cinnamon...' elif [ "$1" = li ]; then # echo 'exec dm-tool --session-bus switch-to-user stan lightdm' >> $XCLIENTS echo 'exec dm-tool switch-to-user stan lightdm &' >> $XCLIENTS # echo 'exec dm-tool switch-to-greeter lightdm' >> $XCLIENTS # echo 'exec dm-tool add-local-x-seat 10 switch-to-greeter lightdm' >> $XCLIENTS echo 'Starting X with lightdm...' else echo -e "\n" echo -e "\n" echo Hello, $USER\! Which WM will it be this time? echo -e "\n" echo 'Type the two letter code for the window manager you want.' echo 'Fluxbox - fb ; Enlightenment (E17) - en ; Openbox - ob ; Xterm - xt ;' echo 'FVWM - fv ; XFCE - xf ; LXDE - lx ; KDE - kd ; GNOME - gn ; MATE - ma' echo 'cinnamon - ci' echo 'Hitting enter on blank line will take the default, GNOME unless you change it.' echo 'Enter window manager code as argument to script and avoid this interaction.' echo 'Type Ctl-C to cancel selection.' read WMGR if [ "$WMGR" = fb ]; then echo 'exec startfluxbox' >> $XCLIENTS echo 'Starting Fluxbox...' elif [ "$WMGR" = ob ]; then echo 'exec openbox-session' >> $XCLIENTS echo 'Starting Openbox...' elif [ "$WMGR" = fv ]; then echo 'exec fvwm' >> $XCLIENTS echo 'Starting FVWM...' elif [ "$WMGR" = en ]; then echo 'xset b off s 10000 -dpms &' >> $XCLIENTS echo 'exec enlightenment_start' >> $XCLIENTS echo 'Starting E17...' elif [ "$WMGR" = lx ]; then echo 'exec startlxde' >> $XCLIENTS echo 'Starting X with LXDE...' elif [ "$WMGR" = xf ]; then echo 'exec startxfce4' >> $XCLIENTS echo 'Starting X with XFCE...' elif [ "$WMGR" = xt ]; then echo 'exec xterm' >> $XCLIENTS echo 'Starting X with xterm...' elif [ "$WMGR" = kd ]; then echo 'STARTKDE="$(type -p startkde)"' >> $XCLIENTS echo 'exec $STARTKDE' >> $XCLIENTS echo 'Starting X with KDE...' elif [ "$WMGR" = gn ]; then echo 'GSESSION="$(type -p gnome-session)"' >> $XCLIENTS echo 'exec $GSESSION' >> $XCLIENTS echo 'Starting X with Gnome...' elif [ "$WMGR" = ma ]; then echo 'MSESSION="$(type -p mate-session)"' >> $XCLIENTS echo 'exec $MSESSION' >> $XCLIENTS echo 'Starting X with MATE...' elif [ "$WMGR" = ci ]; then echo 'CSESSION="$(type -p cinnamon-session-cinnamon2d)"' >> $XCLIENTS echo 'exec $CSESSION' >> $XCLIENTS echo 'Starting X with cinnamon...' elif [ "$1" = li ]; then # echo 'exec dm-tool --session-bus switch-to-user stan lightdm' >> $XCLIENTS echo 'exec dm-tool switch-to-user stan lightdm' >> $XCLIENTS echo 'Starting X with lightdm...' else echo 'GSESSION="$(type -p gnome-session)"' >> $XCLIENTS echo 'exec $GSESSION' >> $XCLIENTS echo 'Default to starting X with Gnome...' fi fi sleep 3 # the vt10 specifies to X which virtual terminal to start on, not sure if need -keeptty # the -- tells startx that the client specification is over, here in the .xinitrc file from above # there is also a ttyXX option that seems to do exactly what the vtXX option does. startx #startx -- vt10 #startx -- tty10 exit 0 -- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org