This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: Does xinit do magic stuff?
- From: luke dot kendall at cisra dot canon dot com dot au
- To: cygwin-xfree at cygwin dot com
- Date: Fri, 23 Jul 2004 17:47:08 +1000 (EST)
- Subject: Re: Does xinit do magic stuff?
- Reply-to: cygwin-xfree at cygwin dot com
On 23 Jul, To: cygwin-xfree@cygwin.com wrote:
> I ask only to try to understand. I think the correct fix is to use
> xinit.
The new script seems to work completely reliably. I'm still interested
in xinit's magic, though. :-)
luke
#!/bin/sh
#
# Start up X. Allow XSERVER_ARGS to define args to pass to the X server.
#
# Author: Luke Kendall
#
MYNAME=`basename $0`
USAGE="$MYNAME
This will start X (by running $HOME/.xserverrc if that file exists),
otherwise by running xinit -- \$XSERVER_ARGS.
An example of the (optional) ~/.xserverrc file:
xinit -- \$XSERVER_ARGS
The default window manager is wmaker; use \$WINDOWMANAGER to override."
#
# Process the command line arguments.
# Of which there are none, presently.
#
if [ $# != 0 ]
then
echo "Usage: $USAGE" >&2
exit 1
fi
#
# If the user has a .xserverrc, use that instead of the default, which is to
# run "xinit -- $XSERVER_ARGS".
# XSERVER_ARGS are defined in /etc/profile.d/cisra.sh
#
if [ -f $HOME/.xserverrc ]
then
$HOME/.xserverrc &
else
xinit -- $XSERVER_ARGS &
fi > /tmp/XWin.xlog.$USER 2>&1 # Collect all the ugly output
echo "Please see /tmp/XWin.xlog.$USER for extra X11 startup output"