Jeremy wrote:

>> I am helping port alternative window managers to MacOS. One of them isn't 
>> working right, so I want to use gdb on the wm binary.
>> 
>> On a true *nix machine, I could start X without a wm running, then invoke a 
>> wm from an xterm. This is useful if I want to run gdb on the wm. It's not 
>> how one normally sets up an X11 environment, but is the way one would do it 
>> to test the wm.
> 
> Yeah, that's usually how I debug quartz-wm.
> 
>> On Snow Leopard, I am having trouble figuring out how to replicate this. If 
>> I comment out all the lines in my .xinitrc, and try to run my wm from a 
>> terminal, this doesn't work. I get a unstable condition where processes keep 
>> re-spawning and I cannot kill them, and have to reboot to recover.
> 
> Weird.  I certainly don't see that.  What is actually respawning?  What is 
> written to /var/log/system.log?

X11.app is re-spawning, which is causing other things to re-spawn like 
fc-cache. I'll append the section of the syslog showing this, at the bottom of 
the message.

I learned that if I edit .xinitrc during the race condition, and put back a 
line with a window manager, the next time X11.app spawns, everything returns to 
normal, and I don't have to reboot.

I'm not that interested in exploring the race condition further because it's 
not a config I normally use, but I'm happy to look into it further if you're 
interested.

>> Can anyone recommend a step by step process I can use on SL so that I can 
>> run gdb on a window manager at the shell prompt.
> 
> mkdir ~/.xinitrc.d
> echo "exec /usr/X11/bin/xterm" > ~/.xinitrc.d/90-debug-xterm.sh # or /opt/X11 
> instead of /usr/X11
> chmod 755 ~/.xinitrc.d/90-debug-xterm.sh
> open -a XQuartz # or open -a X11 if you want that one instead

Great, I will try that.


Doh123 wrote:

> That is actually very easy to do.
> 
> just set a $DISPLAY, then run X11.bin directly for that $DISPLAY.. then you 
> can launch any wm you want on that same $DISPLAY...
> 
> like...
> cd into Xquartz/Contents/MacOS
> do a... export DISPLAY=:55
> then do a ./X11.bin :55
> 
> at that point it will start up just the X server with no window manager or 
> anything else... if you open an xterm it will have no window decoration or 
> anything.  Just use an export DISPLAY=:55 in another terminal then launch the 
> window manager executable and see if it runs.

Can I really set my own DISPLAY? I thought that was something one can't mess 
with.

I will try this as well.

Thanks guys for the input.

Dave

Jeremy at your request here is the section of the syslog showing the respawning.

Jan 29 10:38:48 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]: X11.app: 
main(): argc=2
Jan 29 10:38:48 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]:   argv[0] 
= /Applications/Utilities/XQuartz.app/Contents/MacOS/X11.bin
Jan 29 10:38:48 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]:   argv[1] 
= -psn_0_86037
Jan 29 10:38:48 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]: Waiting 
for startup parameters via Mach IPC.
Jan 29 10:38:48 Garuda org.macosforge.xquartz.startx[266]: font_cache: Scanning 
user font directories to generate X11 font caches
Jan 29 10:38:48 Garuda defaults[302]: \nThe domain/default pair of 
(org.macosforge.xquartz.X11, dpi) does not exist
Jan 29 10:38:48 Garuda org.macosforge.xquartz.privileged_startx[280]: 
font_cache: Scanning system font directories to generate X11 font caches
Jan 29 10:38:54 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]: X11.app: 
Listening on socket for fd handoff:  (4) /var/tmp/tmp.0.17fbKt
Jan 29 10:38:54 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]: X11.app: 
Thread created for handoff.  Returning success to tell caller to connect and 
push the fd.
Jan 29 10:38:54 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]: X11.app: 
Received new $DISPLAY fd: 6 ... sleeping to allow xinitrc to catchup.
Jan 29 10:38:54 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]: X11.app: 
do_start_x11_server(): argc=6
Jan 29 10:38:54 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]:   argv[0] 
= /opt/X11/bin/X
Jan 29 10:38:54 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]:   argv[1] 
= :0
Jan 29 10:38:54 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]:   argv[2] 
= -nolisten
Jan 29 10:38:54 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]:   argv[3] 
= tcp
Jan 29 10:38:54 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]:   argv[4] 
= -auth
Jan 29 10:38:54 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]:   argv[5] 
= /Users/davidray/.serverauth.266
Jan 29 10:38:54 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]: Xquartz 
starting:
Jan 29 10:38:54 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]: X.Org X 
Server 1.9.3
Jan 29 10:38:54 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]: Build 
Date: 20101219
Jan 29 10:38:56 Garuda org.macosforge.xquartz.startx[266]: /opt/X11/bin/xinit: 
XFree86_VT property unexpectedly has 0 items instead of 1
Jan 29 10:38:56 Garuda org.macosforge.xquartz.startx[266]: /opt/X11/bin/xinit: 
connection to X server lost
Jan 29 10:38:57 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]: X11.app 
Handing off fd to server thread via DarwinListenOnOpenFD(6)
Jan 29 10:38:57 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]: 
DarwinListenOnOpenFD: 6
Jan 29 10:38:57 Garuda [0x0-0x15015].org.macosforge.xquartz.X11[257]: Quitting 
Xquartz
Jan 29 10:38:59 Garuda org.macosforge.xquartz.startx[421]: font_cache: Scanning 
user font directories to generate X11 font caches
Jan 29 10:38:59 Garuda org.macosforge.xquartz.privileged_startx[280]: 
font_cache: Scanning system font directories to generate X11 font caches
Jan 29 10:38:59 Garuda defaults[454]: \nThe domain/default pair of 
(org.macosforge.xquartz.X11, dpi) does not exist
Jan 29 10:39:01 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]: X11.app: 
main(): argc=2
Jan 29 10:39:01 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]:   argv[0] 
= /Applications/Utilities/XQuartz.app/Contents/MacOS/X11.bin
Jan 29 10:39:01 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]:   argv[1] 
= -psn_0_90134
Jan 29 10:39:01 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]: Waiting 
for startup parameters via Mach IPC.
Jan 29 10:39:03 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]: X11.app: 
Listening on socket for fd handoff:  (4) /var/tmp/tmp.0.0K5bHv
Jan 29 10:39:03 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]: X11.app: 
Thread created for handoff.  Returning success to tell caller to connect and 
push the fd.
Jan 29 10:39:03 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]: X11.app: 
Received new $DISPLAY fd: 6 ... sleeping to allow xinitrc to catchup.
Jan 29 10:39:03 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]: X11.app: 
do_start_x11_server(): argc=6
Jan 29 10:39:03 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]:   argv[0] 
= /opt/X11/bin/X
Jan 29 10:39:03 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]:   argv[1] 
= :0
Jan 29 10:39:03 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]:   argv[2] 
= -nolisten
Jan 29 10:39:03 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]:   argv[3] 
= tcp
Jan 29 10:39:03 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]:   argv[4] 
= -auth
Jan 29 10:39:03 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]:   argv[5] 
= /Users/davidray/.serverauth.421
Jan 29 10:39:03 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]: Xquartz 
starting:
Jan 29 10:39:03 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]: X.Org X 
Server 1.9.3
Jan 29 10:39:03 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]: Build 
Date: 20101219
Jan 29 10:39:05 Garuda org.macosforge.xquartz.startx[421]: /opt/X11/bin/xinit: 
XFree86_VT property unexpectedly has 0 items instead of 1
Jan 29 10:39:05 Garuda org.macosforge.xquartz.startx[421]: /opt/X11/bin/xinit: 
connection to X server lost
Jan 29 10:39:06 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]: X11.app 
Handing off fd to server thread via DarwinListenOnOpenFD(6)
Jan 29 10:39:06 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]: 
DarwinListenOnOpenFD: 6
Jan 29 10:39:06 Garuda [0x0-0x16016].org.macosforge.xquartz.X11[559]: Quitting 
Xquartz
Jan 29 10:39:09 Garuda org.macosforge.xquartz.startx[589]: font_cache: Scanning 
user font directories to generate X11 font caches
Jan 29 10:39:09 Garuda org.macosforge.xquartz.privileged_startx[280]: 
font_cache: Scanning system font directories to generate X11 font caches
Jan 29 10:39:09 Garuda defaults[621]: \nThe domain/default pair of 
(org.macosforge.xquartz.X11, dpi) does not exist
Jan 29 10:39:14 Garuda org.macosforge.xquartz.startx[589]: Xquartz: Unable to 
locate waiting server: org.macosforge.xquartz.X11
Jan 29 10:39:14 Garuda org.macosforge.xquartz.startx[589]: Xquartz: X11.app = 
/Applications/Utilities/XQuartz.app/Contents/MacOS/X11
Jan 29 10:39:14 Garuda org.macosforge.xquartz.startx[589]: Xquartz: Starting X 
server: /Applications/Utilities/XQuartz.app/Contents/MacOS/X11 --listenonly
Jan 29 10:39:14 Garuda org.macosforge.xquartz.startx[589]: X11.app: main(): 
argc=2
….
…..
and on and on





_______________________________________________
Xquartz-dev mailing list
Xquartz-dev@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev

Reply via email to