Re: Issue with XWin under xlaunch

2012-04-24 Thread Ken Brown

On 4/24/2012 7:54 AM, Jon TURNEY wrote:

On 23/04/2012 16:04, Ken Brown wrote:

I've added some code to capture stdout and stderr from these subprocesses to
the X server log, and to more clearly diagnose problems which could occur
while fork/exec-ing them.


Would it be possible for you to also add some code for diagnosing problems with 
processes started from .startxwinrc?  I'm hoping it might help with the problem 
I reported in

   http://cygwin.com/ml/cygwin-xfree/2012-04/msg00050.html


Hmm.. not sure code is really needed.  You can see the output from startxwin
by running it from a terminal, or capture it by changing the shortcut which
runs it to something like the following (perhaps we should do that by default)

C:\cygwin\bin\run.exe /usr/bin/bash.exe -l -c '/usr/bin/startxwin.exe

/var/log/xwin/startxwin.log 2>&1'


That doesn't help, but I'll reply to my original thread to explain why. 
 I shouldn't have interjected my question into this thread.


Ken


--
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: Issue with XWin under xlaunch

2012-04-24 Thread Eliot Moss

Ok, I can see that perhaps in some ways I was being foolish and
could have figured out more of this myself.  But here's something
interesting.  I tried this:

- "Pin to Start Menu" of the supplied XLaunch short cut
- Edit to change the command to:
  "/usr/bin/xlaunch.exe -run /home/Eliot/config.xlaunch"
  (since I want to start things, not build/edit a config file)

  The full line in the shortcut is:
  C:\cygwin\bin\run.exe /usr/bin/bash.exe -l -c "/usr/bin/xlaunch.exe -run 
/home/Eliot/config.xlaunch"

This works, without putting in the explicit /usr/bin/ everywhere
in the .XWinrc file.

BUT: I get the "extra" icon I don't want, this time for XLaunch
rather than for StartXWin.  So the "extra" icon seems to have to
do with the bash that run.exe is starting and the fact that the bash
is still there as parent to the still-running XLaunch (or StartXWin).
Perhaps it is because the bash does not start the program under it
in the same way that run.exe does?

Regards -- EM


--
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: Issue with XWin under xlaunch

2012-04-24 Thread Jon TURNEY
On 23/04/2012 16:04, Ken Brown wrote:
>> I've added some code to capture stdout and stderr from these subprocesses to
>> the X server log, and to more clearly diagnose problems which could occur
>> while fork/exec-ing them.
> 
> Would it be possible for you to also add some code for diagnosing problems 
> with processes started from .startxwinrc?  I'm hoping it might help with the 
> problem I reported in
> 
>   http://cygwin.com/ml/cygwin-xfree/2012-04/msg00050.html

Hmm.. not sure code is really needed.  You can see the output from startxwin
by running it from a terminal, or capture it by changing the shortcut which
runs it to something like the following (perhaps we should do that by default)

C:\cygwin\bin\run.exe /usr/bin/bash.exe -l -c '/usr/bin/startxwin.exe
>>/var/log/xwin/startxwin.log 2>&1'

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

--
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: Issue with XWin under xlaunch

2012-04-24 Thread Jon TURNEY
On 23/04/2012 17:41, Eliot Moss wrote:
> Ok -- by perusing the log I figured it out ...

> [727848.279] executing 'xterm -display :0.0 -ls -title swarm -bg 
> rgbi:.0/.20/.0 -geometry 120x47+0+0 -e /usr/bin/ssh m...@swarm.cs.umass.edu', 
> pid 13748
> [727848.311] (pid 13748 stderr) /bin/sh: xterm: command not found

> In the past, .XWinrc names of files such as "xterm"
> worked just fine. Apparently something changed about
> the PATH used, and "xterm" was not being found. When
> I write /usr/bin/xterm, it starts up. You can see the
> first case and the second in the attached log file.
> 
> So, I think xlaunch is ok, but this was a surprising
> difference :-) ...

This is not intentional.

I can't reproduce this, so I'm not quite sure what is causing this.

What I am expecting to happen is that xlaunch is invoked via the start menu
shortcut which it's package creates, which runs bash -l -c xlaunch, which
reads /etc/profile, which sets PATH to include /usr/bin, which should be
inherited by XWin and used when it execs /bin/sh -c 'your xterm command'.

We try to create the login environment as far up the process hierarchy as
possible, rather than starting the processes from the notification area menu
with bash -l -c, as creating the login environment can be expensive.

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

--
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: Issue with XWin under xlaunch

2012-04-23 Thread Eliot Moss

On 4/23/2012 12:41 PM, Eliot Moss wrote:

Ok -- by perusing the log I figured it out ...

In the past, .XWinrc names of files such as "xterm"
worked just fine. Apparently something changed about
the PATH used, and "xterm" was not being found. When
I write /usr/bin/xterm, it starts up. You can see the
first case and the second in the attached log file.

So, I think xlaunch is ok, but this was a surprising
difference :-) ...

Regards -- Eliot Moss


PS -- I can confirm that adding /usr/bin solves the
problem with the current released XWin.exe as well as
with the 20120423 snapshot you asked me to test.  E

--
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: Issue with XWin under xlaunch

2012-04-23 Thread Eliot Moss

Ok -- by perusing the log I figured it out ...

In the past, .XWinrc names of files such as "xterm"
worked just fine. Apparently something changed about
the PATH used, and "xterm" was not being found. When
I write /usr/bin/xterm, it starts up. You can see the
first case and the second in the attached log file.

So, I think xlaunch is ok, but this was a surprising
difference :-) ...

Regards -- Eliot Moss
InitConnectionLimits: MaxClients = 255
Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 1.12.0.0
OS: Windows 7 Service Pack 1 [Windows NT 6.1 build 7601] (WoW64)
Snapshot: 20120423-git-638383315ef51e46

XWin was started with the following command line:

XWin :0 -multiwindow -clipboard -nowgl -ac -unixkill -clipboard 
 -resize -engine 1 -emulate3buttons 100 

ddxProcessArgument - Initializing default screens
winInitializeScreenDefaults - primary monitor w 1280 h 800
winInitializeScreenDefaults - native DPI x 96 y 96
ddxProcessArgument - arg: :0
ddxProcessArgument - arg: -multiwindow
ddxProcessArgument - arg: -clipboard
ddxProcessArgument - arg: -nowgl
ddxProcessArgument - arg: -ac
ddxProcessArgument - arg: -unixkill
ddxProcessArgument - arg: -clipboard
ddxProcessArgument - arg: -resize
ddxProcessArgument - arg: -engine
ddxProcessArgument - arg: -emulate3buttons
[727789.342] (II) xorg.conf is not supported
[727789.342] (II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more 
information
[727789.342] LoadPreferences: Loading /home/Eliot/.XWinrc
[727789.358] winDetectSupportedEngines - DirectDraw installed, allowing ShadowDD
[727789.358] winDetectSupportedEngines - Windows NT, allowing PrimaryDD
[727789.358] winDetectSupportedEngines - DirectDraw4 installed, allowing 
ShadowDDNL
[727789.358] winDetectSupportedEngines - Returning, supported engines 001f
[727789.358] winSetEngine - Multi Window or Rootless => ShadowGDI
[727789.358] winScreenInit - Using Windows display depth of 32 bits per pixel
[727789.389] winAllocateFBShadowGDI - Creating DIB with width: 1280 height: 800 
depth: 32
[727789.389] winFinishScreenInitFB - Masks: 00ff ff00 00ff
[727789.389] winInitVisualsShadowGDI - Masks 00ff ff00 00ff BPRGB 8 
d 24 bpp 32
[727789.389] winInitMultiWindowWM - Calling pthread_mutex_lock ()
[727789.389] winMultiWindowXMsgProc - Calling pthread_mutex_lock ()
[727789.389] MIT-SHM extension disabled due to lack of kernel support
[727789.405] XFree86-Bigfont extension local-client optimization disabled due 
to lack of shared memory support in the kernel
[727789.436] (II) AIGLX: Loaded and initialized swrast
[727789.436] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[727789.436] [dix] Could not init font path element /usr/share/fonts/OTF/, 
removing from list!
[727789.514] winPositionWindowMultiWindow: (x, y) = (0, 0)
[727789.514]immediately return since hWnd is NULL
[727789.514] winMapWindowMultiWindow - pWin: 800bb6c0
[727789.514] winUpdateWindowsWindow
[727789.529] System: `"/usr/bin/xkbcomp" -w 1 "-R/usr/share/X11/xkb" -xkm 
"/cygdrive/c/Users/Eliot/AppData/Local/Temp/xkb_J7a79Q" -em1 "The XKEYBOARD 
keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not 
fatal to the X server" "/var/lib/xkb/server-0.xkm"'
[727789.670] Loaded XKB keymap /var/lib/xkb/server-0.xkm, defined=0x7f
[727789.670] winPointerWarpCursor - Discarding first warp: 640 400
[727789.670] (dix) initialising device 6
[727789.670] (--) 8 mouse buttons found
[727789.670] (dix) initialising device 7
[727789.670] (--) Setting autorepeat to delay=500, rate=31
[727789.670] (--) Windows keyboard layout: "0409" (0409) "US", type 4
[727789.670] (--) Found matching XKB configuration "English (USA)"
[727789.670] (--) Model = "pc105" Layout = "us" Variant = "none" Options = 
"none"
[727789.670] Rules = "base" Model = "pc105" Layout = "us" Variant = "none" 
Options = "none"
[727789.670] (dix) enabling device 6
[727789.670] (dix) enabling device 7
[727789.670] client(0): Reserved pid(1).
[727789.670] client(0): Reserved cmdname(XWin) and cmdargs(:0 -multiwindow 
-clipboard -nowgl -ac -unixkill -clipboard -resize -engine 1 -emulate3buttons 
100).
[727789.670] winBlockHandler - pthread_mutex_unlock()
[727789.670] winInitMultiWindowWM - pthread_mutex_lock () returned.
[727789.670] winInitMultiWindowWM - pthread_mutex_unlock () returned.
[727789.670] winInitMultiWindowWM - DISPLAY=:0.0
[727789.670] client(20): Reserved pid(-1).
[727789.670] client(20): Reserved cmdname(NULL) and cmdargs(NULL).
[727789.670] AllocNewConnection: client index = 1, socket fd = 7
[727789.670] winMultiWindowXMsgProc - pthread_mutex_lock () returned.
[727789.670] winMultiWindowXMsgProc - pthread_mutex_unlock () returned.
[727789.670] winProcEstablishConnection - winInitClipboard returned.
[727789.670] winMultiWindowXMsgProc - DISPLAY=:0.0
[727789.670] winClipboardProc - DISPLAY=:0.0
[727789.670] winInitMultiWindowWM - XOpenDisplay () returned and successfully 
opened the display.

Re: Issue with XWin under xlaunch

2012-04-23 Thread Ken Brown
On 4/23/2012 9:51 AM, Jon TURNEY wrote:
> On 11/04/2012 11:23, Eliot Moss wrote:
>> When I start XWin using xlaunch, trying to the start
>> programs from the .XWinrc popup menu (right-click on
>> the X icon, left-click on the program's entry in the
>> menu), programs do not start.  I get only those programs
>> started by my script that I told xlaunch to run.
>>
>> I would like to use xlaunch, since it solves the issue
>> I had with the startxwin taskbar icon being visible
>> (when I claim it should not be, and it didn't use to
>> be), but not being able to start additional programs
>> makes this approach less useable.
>>
>> Looking at this from outside, it is hard to say whether
>> the real issue is in xlaunch, in XWin, or the result of
>> some misunderstanding between them.
> 
> At the moment, the output from processes started from the notification area
> icon doesn't go anywhere useful, which can make it hard to debug problems with
> processes started this way.
> 
> I've added some code to capture stdout and stderr from these subprocesses to
> the X server log, and to more clearly diagnose problems which could occur
> while fork/exec-ing them.

Would it be possible for you to also add some code for diagnosing problems with 
processes started from .startxwinrc?  I'm hoping it might help with the problem 
I reported in

  http://cygwin.com/ml/cygwin-xfree/2012-04/msg00050.html

BTW, I tried the snapshot at

  ftp://cygwin.com/pub/cygwinx/XWin.20120423-git-638383315ef51e46.exe.bz2

and the resulting log has a lot of messages like this:

 winMultiWindowXMsgProcErrorHandler - ERROR: BadWindow (invalid Window 
parameter)
 winMultiWindowXMsgProcErrorHandler - ERROR: BadMatch (invalid parameter 
attributes)

Is that to be expected, or does it indicate a real problem?

Ken

--
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: Issue with XWin under xlaunch

2012-04-23 Thread Jon TURNEY
On 11/04/2012 11:23, Eliot Moss wrote:
> When I start XWin using xlaunch, trying to the start
> programs from the .XWinrc popup menu (right-click on
> the X icon, left-click on the program's entry in the
> menu), programs do not start.  I get only those programs
> started by my script that I told xlaunch to run.
> 
> I would like to use xlaunch, since it solves the issue
> I had with the startxwin taskbar icon being visible
> (when I claim it should not be, and it didn't use to
> be), but not being able to start additional programs
> makes this approach less useable.
> 
> Looking at this from outside, it is hard to say whether
> the real issue is in xlaunch, in XWin, or the result of
> some misunderstanding between them.

At the moment, the output from processes started from the notification area
icon doesn't go anywhere useful, which can make it hard to debug problems with
processes started this way.

I've added some code to capture stdout and stderr from these subprocesses to
the X server log, and to more clearly diagnose problems which could occur
while fork/exec-ing them.

Perhaps you could try the snapshot at [1] and see if this gives a bit more
information about why these processes are failing?

[1] ftp://cygwin.com/pub/cygwinx/XWin.20120423-git-638383315ef51e46.exe.bz2

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

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