This is the mail archive of the
cygwin-xfree
mailing list for the Cygwin XFree86 project.
RE: How do I start WM?
- From: "Mike Ayers" <mike_ayers at tvworks dot com>
- To: <cygwin-xfree at cygwin dot com>
- Date: Thu, 25 Feb 2010 10:44:16 -0800
- Subject: RE: How do I start WM?
- References: <653175.57915.qm@web39608.mail.mud.yahoo.com>
- Reply-to: cygwin-xfree at cygwin dot com
> 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