Re: Script that starts X11.app needs to be rerun to get gnome to start
Re: Script that starts X11.app needs to be rerun to get gnome to start
- Subject: Re: Script that starts X11.app needs to be rerun to get gnome to start
- From: Richard Miles <email@hidden>
- Date: Thu, 17 Mar 2011 21:58:08 -0700
I use the $program value in this script called 74-x.sh which is in .xinitrc.d
Here is the 74-x.sh:
#!/bin/bash
. /sw/bin/init.sh
case $program
in
ctwm) exec ctwm;;
dwm) `dmenu < ~/menu.txt` &
exec dwm;;
evilwm) exec evilwm -term xterm -bw 5;;
pwm) exec pwm;;
fluxbox) exec startfluxbox;;
fvwm) exec /sw/bin/fvwm;;
fvwm2) exec /sw/bin/fvwm2;;
gnome) esd
# quartz-wm -only-proxy &
openbox --replace &
exec gnome-session;;
icewm) xset m 7 2
xinput set-ptr-feedback 0 7 1.9 1
[ -x ~/.icewm/restart ] && source ~/.icewm/restart
icewm-session;;
kde3) esd
/sw/bin/startkde;;
kde4) /sw/opt/kde4/x11/bin/startkde>/dev/null 2>&1;;
openbox) xeyes -geometry 75x75+0-0 &
buici-clock -geometry +1500-0 &
gnome-terminal &
exec openbox-session;;
ognome) esd
exec openbox-gnome-session;;
okde) esd
exec openbox-kde-session;;
ratpoison) /sw/bin/ratpoison;;
wmaker) export G_FILENAME_ENCODING=@locale
exec wmaker;;
xfce4) exec /sw/bin/xfce4-session;;
amiga) buici-clock -geometry +1500-0 &
xeyes -geometry 75x75+0-0 &
xsetroot -solid ForestGreen &
exec amiwm
esac
it should show what is in the window manager of choice.
This works, but not after an initial start of snow leopard. It has to run again and then it works, and it will work
every time after. I have checked what processes are running and it looks like, as an example, $program contains
gnome or kde3 is waiting for something.
On Mar 17, 2011, at 3:50 PM, Jeremy Huddleston wrote:
> What are you trying to do with this script? If you want to choose a specific WM, you should just put that selection in ~/.xinitrc.d/99-wm.sh
>
> mkdir ~/.xinitrc.d
> echo "USERWM=/opt/local/bin/blackbox" > ~/.xinitrc.d/99-wm.sh
> chmod 755 ~/.xinitrc.d/99-wm.sh
>
> Your script is doing many weird things, and I don't know why you're trying to do it that way... perhaps if you explain the reason, I can help you find the best solution.
>
> On Mar 17, 2011, at 14:14, Richard Miles wrote:
>
>> I have a strange curiosity as to why I must run this script again when run the first time after leopard ver 6.6.0.
>> Here is the script:
>> #!/bin/bash
>> #invoke a X program using X windows
>> # first kill any X running by me
>> p_found=`ps ax|grep -v grep|grep X|wc -l`
>> if [ $p_found -gt 0 ]
>> then
>> killall X
>> #open -a -n x11.app
>> fi
>> p_found=`ps ax|grep -v grep|grep quartz-wm|wc -l`
>> if [ $p_found -gt 0 ]
>> then
>> killall quartz-wm
>> fi
>> doit=0
>> case "$1"
>> in
>> 1) export program=fluxbox
>> doit=1;;
>> 2) export program=fvwm
>> doit=1;;
>> f) export program=fvwm2
>> doit=1;;
>> 3) export program=gnome
>> doit=1;;
>> 4) export program=icewm
>> doit=1;;
>> 5) export program=kde3
>> doit=1;;
>> 6) export program=kde4
>> doit=1;;
>> 7) export program=ratpoison
>> doit=1;;
>> 8) export program=wmaker
>> doit=1;;
>> 9) export program=xfce4
>> doit=1;;
>> a) export program=amiga
>> doit=1;;
>> o) export program=openbox
>> doit=1;;
>> g) export program=ognome
>> doit=1;;
>> k) export program=okde
>> doit=1;;
>> c) export program=ctwm
>> doit=1;;
>> d) export program=dwm
>> doit=1;;
>> e) export program=evilwm
>> doit=1;;
>> p) export program=pwm
>> doit=1;;
>> v) export program=vtwm
>> doit=1;;
>> esac
>> if [ "$doit" -eq 1 ]
>> then
>> sleep 20 seconds
>> open -a /Applications/Utilities/X11.app
>> fi
>>
>> This script will run on a second execution, but when run after the imac is initial started, it will start X11.app but not
>> start the intended window manager from the selection chosen.
>> Can someone tell me why?
>>
>> Richard E. Miles
>> email@hidden
>>
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> X11-users mailing list (email@hidden)
>>
>> This email sent to email@hidden
>>
>
Richard E. Miles
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden