How do I start WM?
Mike Ayers
mike_ayers@tvworks.com
Thu Feb 25 18:44:00 GMT 2010
> From: cygwin-xfree-owner@cygwin.com [mailto:cygwin-xfree-
> owner@cygwin.com] On Behalf Of Joseph Ess
> Sent: Thursday, February 25, 2010 8:16 AM
> I can reproduce your finding. Putting just "openbox &" in my ~/xinitrc
> does not work.
> Putting the "exec openbox-session >/tmp/openbox.log 2>&1" line in works
> fine for the few minutes I tested.
Here's my .xinitrc, modified for your pleasure:
[SNIP]
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
xclock -geometry 50x50-1+1 &
xterm -geometry 80x25+0-0 &
exec xterm -geometry 80x20+0+0 -C -name Console &
openbox
[/SNIP]
Notice the first line. This is a script. When it ends, startx ends, as does your X session. Notice the last line. The X session now lasts as long as the window manager. Note the lack of redirects on the window manager, and the use of a console window. I haven't tested this extensively with 1.7, but it's worked like a rock in the past.
HTH,
Mike
More information about the Cygwin-xfree
mailing list