public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* Re: [1.7] On checkX
       [not found] <4A9871EA.6010901@alice.it>
@ 2009-08-29  0:46 ` Charles Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Charles Wilson @ 2009-08-29  0:46 UTC (permalink / raw)
  To: cygwin, cygwin-xfree

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [1.7] On checkX
@ 2009-09-05  8:30 Angelo Graziosi
  0 siblings, 0 replies; 5+ messages in thread
From: Angelo Graziosi @ 2009-09-05  8:30 UTC (permalink / raw)
  To: XCygwin

[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]

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.

[-- Attachment #2: checkX-logs.tar.bz2 --]
[-- Type: application/octet-stream, Size: 1267 bytes --]

[-- Attachment #3: Type: text/plain, Size: 223 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [1.7] On checkX
  2009-09-04 21:11 ` Charles Wilson
@ 2009-09-04 21:27   ` Charles Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Charles Wilson @ 2009-09-04 21:27 UTC (permalink / raw)
  To: cygwin-xfree

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/


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [1.7] On checkX
  2009-08-29  9:09 Angelo Graziosi
@ 2009-09-04 21:11 ` Charles Wilson
  2009-09-04 21:27   ` Charles Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: Charles Wilson @ 2009-09-04 21:11 UTC (permalink / raw)
  To: cygwin-xfree

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 2>&1 || start_XWin
n=`expr $n + 1`

while ! /usr/bin/checkX --debug=$DBGLVL >~/checkX_${n}.log 2>&1
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/


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [1.7] On checkX
@ 2009-08-29  9:09 Angelo Graziosi
  2009-09-04 21:11 ` Charles Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: Angelo Graziosi @ 2009-08-29  9:09 UTC (permalink / raw)
  To: XCygwin

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 2>&1 | 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/


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-09-05  8:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4A9871EA.6010901@alice.it>
2009-08-29  0:46 ` [1.7] On checkX Charles Wilson
2009-08-29  9:09 Angelo Graziosi
2009-09-04 21:11 ` Charles Wilson
2009-09-04 21:27   ` Charles Wilson
2009-09-05  8:30 Angelo Graziosi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).