Re: [1.7] On checkX

2009-09-05 Thread Angelo Graziosi

Charles Wilson wrote:

Try this:


I have tried your script. It creates 6 logs (attached) and NO 
stackdump!!. But if one tries to copy/paste something, the 
'clipboard'/system hangs...



Try adding --notty to each invocation of checkX...that works for me.


It seems that it works also for me! It creates only 2 logs (without 
stackdump and clipboard problems):


$ cat checkX_0.log checkX_1.log
  5 [main] checkX 3612 fhandler_console::fixup_after_fork_exec: 
error opening input console handle for /dev/console after fork/exec, 
errno 13, Win32 error 5
958 [main] checkX 3612 fhandler_console::fixup_after_fork_exec: 
error opening output console handle for /dev/console after fork/exec, 
errno 13, Win32 error 5

starting xserver
  4 [main] checkX 3876 fhandler_console::fixup_after_fork_exec: 
error opening input console handle for /dev/console after fork/exec, 
errno 13, Win32 error 5
  19455 [main] checkX 3876 fhandler_console::fixup_after_fork_exec: 
error opening output console handle for /dev/console after fork/exec, 
errno 13, Win32 error 5


but the massages of checkX are flagged by Windows to which one should 
click OK, OK,...


Anyway, currently, I am adopting another way to start X and friends, a 
method that does not uses checkX.



Cheers,
Angelo.


checkX-logs.tar.bz2
Description: Binary data
--
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/

Re: [1.7] On checkX

2009-09-04 Thread Charles Wilson
Angelo Graziosi wrote:
 Charles Wilson wrote:
 Unfortunately, I can't reproduce.
 
 Ugh! I forgot to say that I start those scripts with links on desktop...
 
 For example:
 
 mkshortcut -AD \
 -n ${urxvt} \
 -a bash -l start_urxvt.sh \
 -i /usr/bin/XWin.exe \
 -d Console unicode \
 /usr/bin/run.exe

Using a short cut to my script, just like your shortcut (except mine is
on my own desktop, not all-users'), I...can't reproduce your problem. WJJFM.

 Indeed, if I start the script from Cygwin.bat, there is not
 checkX.exe.stackdump in the HOME! It is created ONLY starting the script
 with the link...
 
 ...and, in that case, the lines:
 
 [...]
 while ! /usr/bin/checkX
 do
   printf waiting for xserver to start\n
   sleep 1
 done
 [...]
 
 cause a NON-empty checkX.exe.stackdump:
 
 $ cat checkX.exe.stackdump
 Exception: STATUS_ACCESS_VIOLATION at eip=6E7C3CD0

I don't know what to tell you.  Please try to use the -debug options, as
I recommended before.

 Not only, also a bad interference between XWin and clipboard: trying to
 copy/paste (double click in urxvt shell), they hang and when I try to
 'Restart Now' the PC, Windows says 'xwinclip has not finished yet...'

Also can't reproduce. WJFFM.

 Now, If I want start your script from the link, How can I capture the
 output?
 
 For example, I have tried modifying it with:

Try this:


#!/bin/sh
export DISPLAY=127.0.0.1:0.0
let -a n=0
DBGLVL=1

start_XWin()
{
# Cleanup from last run.
rm -rf /tmp/.X11-unix
printf starting xserver\n ~/checkX_${n}.log

XWin -multiwindow -clipboard -silent-dup-error 2/dev/null 
}

/usr/bin/checkX --debug=$DBGLVL ~/checkX_${n}.log 21 || start_XWin
n=`expr $n + 1`

while ! /usr/bin/checkX --debug=$DBGLVL ~/checkX_${n}.log 21
do
  printf waiting for xserver to start [$n]\n ~/checkX_${n}.log
  sleep 1
  n=`expr $n + 1`
done
sleep 1
/usr/bin/urxvt-X 


--
Chuck


--
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/



Re: [1.7] On checkX

2009-09-04 Thread Charles Wilson
Charles Wilson wrote:
 Angelo Graziosi wrote:
 Charles Wilson wrote:
 Unfortunately, I can't reproduce.
 Ugh! I forgot to say that I start those scripts with links on desktop...

 For example:

 mkshortcut -AD \
 -n ${urxvt} \
 -a bash -l start_urxvt.sh \
 -i /usr/bin/XWin.exe \
 -d Console unicode \
 /usr/bin/run.exe
 
 Using a short cut to my script, just like your shortcut (except mine is
 on my own desktop, not all-users'), I...can't reproduce your problem. WJJFM.

Hmm. Spoke too soon.  It appears, that if I turn on --debug, then I get the

  5 [main] checkX 5048 fhandler_console::fixup_after_fork_exec:
error opening input console handle for /dev/console after fork/exec,
errno 13, Win32 error 5
   2342 [main] checkX 5048 fhandler_console::fixup_after_fork_exec:
error opening output console handle for /dev/console after fork/exec,
errno 13, Win32 error

errors in my log, but only when launching from a shortcut.  However, I
think that's expected...since checkX deliberately does not allocate a
console, and is *supposed* to use the presence/absence of a console to
determine whether to create MessageBoxes for log entries, or send them
to the (redirected?) stdout.

Try adding --notty to each invocation of checkX...that works for me.
It's annoying, but it works and allows you to see the debug messages.
Interestingly, the log files are now much smaller as expected -- what
isn't expected is they STILL get the fhandler_console error messages.

I wonder if /that/ is just a cygwin bug, in that it tries to open the
consoles of an exec'ed program, even if that program is not a console
program...I'll look in to that, later.

--
Chuck

--
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/



Re: [1.7] On checkX

2009-08-29 Thread Angelo Graziosi

Charles Wilson wrote:

Unfortunately, I can't reproduce.


Ugh! I forgot to say that I start those scripts with links on desktop...

For example:

mkshortcut -AD \
-n ${urxvt} \
-a bash -l start_urxvt.sh \
-i /usr/bin/XWin.exe \
-d Console unicode \
/usr/bin/run.exe

Indeed, if I start the script from Cygwin.bat, there is not 
checkX.exe.stackdump in the HOME! It is created ONLY starting the script 
with the link...


...and, in that case, the lines:

[...]
while ! /usr/bin/checkX
do
  printf waiting for xserver to start\n
  sleep 1
done
[...]

cause a NON-empty checkX.exe.stackdump:

$ cat checkX.exe.stackdump
Exception: STATUS_ACCESS_VIOLATION at eip=6E7C3CD0


Not only, also a bad interference between XWin and clipboard: trying to 
copy/paste (double click in urxvt shell), they hang and when I try to 
'Restart Now' the PC, Windows says 'xwinclip has not finished yet...'



Now, If I want start your script from the link, How can I capture the 
output?


For example, I have tried modifying it with:

[...]
check_and_start()
{
/usr/bin/checkX --no-silent || start_XWin
}

check_and_start 21 | tee /tmp/checkx.log
[...]

but only XWin starts NOT urxvt! and

$ cat /tmp/checkx.log
  5 [main] checkX 3292 fhandler_console::fixup_after_fork_exec: 
error opening input console handle for /dev/console after fork/exec, 
errno 13, Win32 error 5
112 [main] checkX 3292 fhandler_console::fixup_after_fork_exec: 
error opening output console handle for /dev/console after fork/exec, 
errno 13, Win32 error 5



Cheers,
Angelo.



Try running checkX with (progressively):
  --no-silent
  --verbose
  --debug
  --debug=2
  --debug=3
  --debug=4
this should help to narrow down how far it gets (and perhaps why) before
dying. You may also need to use the --nogui option, and redirect stderr
to a logfile.

--
Chuck


#!/bin/sh
export DISPLAY=127.0.0.1:0.0

start_XWin()
{
# Cleanup from last run.
rm -rf /tmp/.X11-unix

XWin -multiwindow -clipboard -silent-dup-error 2/dev/null 
}

/usr/bin/checkX || start_XWin

while ! /usr/bin/checkX
do
  printf waiting for xserver to start\n
  sleep 1
done
sleep 1
/usr/bin/urxvt-X 



--
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/



Re: [1.7] On checkX

2009-08-28 Thread Charles Wilson
[Redirecting to cygwin-xfree; Reply-To set]

Angelo Graziosi wrote:

 /usr/bin/checkX || start_XWin
 [...]
 
 Now, it happens that, often (perhaps always), if the x-server is not
 running, then checkX stackdumps, in the sense I find
 checkX.exe.stackdump in HOME, but it is empty! 0 bytes.

What version of checkX.exe? Please do:

$ cygcheck -cd checkx run2

Also,

$ uname -a

--
Chuck

--
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/



Re: [1.7] On checkX

2009-08-28 Thread Charles Wilson
[redirecting, AGAIN, to cygwin-xfree. This is OT for the main cygwin list]

Unfortunately, I can't reproduce.  Try running checkX with (progressively):
  --no-silent
  --verbose
  --debug
  --debug=2
  --debug=3
  --debug=4
this should help to narrow down how far it gets (and perhaps why) before
dying. You may also need to use the --nogui option, and redirect stderr
to a logfile.

--
Chuck


#!/bin/sh
export DISPLAY=127.0.0.1:0.0

start_XWin()
{
# Cleanup from last run.
rm -rf /tmp/.X11-unix

XWin -multiwindow -clipboard -silent-dup-error 2/dev/null 
}

/usr/bin/checkX || start_XWin

while ! /usr/bin/checkX
do
  printf waiting for xserver to start\n
  sleep 1
done
sleep 1
/usr/bin/urxvt-X 


--
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/