This is the mail archive of the
cygwin-xfree
mailing list for the Cygwin XFree86 project.
Starting X server and checkX
- From: Angelo Graziosi <Angelo dot Graziosi at roma1 dot infn dot it>
- To: cygwin-xfree at cygwin dot com
- Date: Tue, 24 Jul 2007 16:43:22 +0200 (MET DST)
- Subject: Starting X server and checkX
- Reply-to: cygwin-xfree at cygwin dot com
Following this discussion
http://cygwin.com/ml/cygwin-xfree/2006-07/msg00131.html
I have tried to modify the script in this way (to start X+urxvt):
-------------------------------------------------
#!/bin/bash
start_XWin()
{
#export DISPLAY=127.0.0.1:0.0
export DISPLAY=:0
#export PATH=/usr/X11R6/bin:"$PATH"
export XAPPLRESDIR=/usr/X11R6/lib/X11/app-defaults
export XCMSDB=/usr/X11R6/lib/X11/Xcms.txt
export XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
export XNLSPATH=/usr/X11R6/lib/X11/locale
# Cleanup from last run.
rm -rf /tmp/.X11-unix
XWin -multiwindow -clipboard -silent-dup-error +bs &
}
/usr/bin/checkX || start_XWin
exec /usr/bin/urxvt -e /usr/bin/bash -l
-------------------------------------------------
The aim of
/usr/bin/checkX || start_XWin
should be that if X is not running "start_XWin" should be executed.
If X is running, "start_XWin" is avoided.
But when I try to open other URXVT windows, there is the Cygwin/X error:
A fatal error has occurred and Cygwin/X now exit...
This mean that "start_XWin" is always executed.
So, How to solve this?
When X is running, 'checkX' return 0 (from checkX --help), so WHY
A B
/usr/bin/checkX || start_XWin
should work ?
(In C/C++ if A is 0, B is always executed; if A != 0 then B is never
executed... or NOT?)
Cheers,
Angelo.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/