This is the mail archive of the cygwin-xfree@cygwin.com 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]

Re: run.exe won't start in shell (w2k)


Thanks for your answer ... but it's not what i'm
searching. start is a nt's cmd internal, and i don't
like the idea of doing "cmd /c start [...]" in shell
scripts. I think that's just not ... clean.
Here is the script i try to run, just in case it
triggers some ideas:
-----8<----------8<----------8<----------8<----------
#!/usr/bin/sh
#
# /usr/local/bin/xloc.sh
# start XWin without xkb and load my xmodmap
#
TST_CMD="egrep -ic"
TST_STR="^winInitMultiWindowWM.*successfully opened
the display"
TST_FIL="/tmp/XWin.log"
X_OPTS="-kb -ac -multiwindow -nowinkill -unixkill"
LOOPS="0"
MAX_LOOPS="500"

export DISPLAY=127.0.0.1:0.0
# eval `ssh-agent`
# rm -rf /tmp/.X11-unix

echo "# Hello `whoami`@`uname -n`"
echo "# Trying to start X on DISPLAY $DISPLAY"
if [ "`ps -ef | egrep -c XWin`" -ne "0" ] ; then
        echo "# XWin process already there ...
skipping launch"
else
        /usr/X11R6/bin/run /usr/X11R6/bin/XWin.exe
$X_OPTS
        echo -n "# Please wait for X to start "
        TST_RES=`$TST_CMD "$TST_STR" $TST_FIL`
        while [ "$TST_RES" -eq "0" ] ; do
                echo -n "."
                LOOPS=`expr $LOOPS + 1`
                if [ "$LOOPS" -eq "$MAX_LOOPS" ] ;
then
                        echo -e "\n# MAX_LOOPS
($MAX_LOOPS) reached: aborting"
                        exit 1
                fi
                TST_RES=`$TST_CMD "$TST_STR" $TST_FIL`
        done
fi
echo -e "\n# OK ($LOOPS/$MAX_LOOPS loops done)."
echo "# Now loading modmap"
/usr/X11R6/bin/run /usr/X11R6/bin/xmodmap -display
$DISPLAY /etc/X11/xinit/.xmodmap
echo "# All done ..."
exit 0
-----8<----------8<----------8<----------8<----------
I use it via a windows shortcut:
(D:\cygwin\usr\X11R6\bin\run.exe D:\cygwin\bin\sh.exe
-c "/usr/local/bin/xloc.sh >/tmp/xloc.log 2>&1") in my
startup menu to automatically start X with my session,
and have my french keyboard correctly configured with
aix x clients.
It works just fine with xp, but not with w2k.

Thanks for yout time,
Gaël.

> Replace 'run' by 'start'...
> a+
> -- 
> Philippe Bastiani
> "gagou" <zegagou@yahoo.com> a écrit dans le message
de
>
20030627110908.17724.qmail@web41702.mail.yahoo.com">new>
s:20030627110908.17724.qmail@web41702.mail.yahoo.com...
> > Hi,
> >
> > I'm trying to launch XWin via run.exe in a shell
> > script (eg /usr/X11R6/bin/run path_to_x-app)
> > This works fine under xp pro, but not under w2k:
it
> > ends up with a windows message box saying: "Error:
> > could not start dos_path_where_i_am".
> > If i try to strace it, it doesn't bug anymore...
> > Is this by design ?
> > Is there anything I can do to find out more
> > informations ?


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


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