This is the mail archive of the cygwin-xfree mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Starting X server and checkX


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]