Go Back  Mac-Forums.com  > Software > OS X - Darwin and Development > Problem with launching x11 applications

Reply
 
LinkBack Thread Tools
Old 11-07-2009, 07:16 PM   #1 (permalink)
kousik

 
kousik's Avatar
 
Member Since: May 04, 2009
Posts: 21
kousik is on a distinguished road
Mac Specs: Model: Macbook; Processor: Intel Core 2 Duo (2.4GHz); RAM: 2GB (DDR3); Video memory: 256MB
Exclamation Problem with launching x11 applications

Let me try to explain my problem as best as I can. Please bear with me and let me know what other information I need to provide to troubleshoot this.

Machine description:
Macbook 13.3", Mac OSX 10.5.8, Darwin Kernel Version 9.8.0

Problem description:
It all started when darwinport failed to install kdegames4 (and my efforts thereafter to get that installed!). I can no longer launch any x11 applications --e.g., xterm, xpdf, xdvi, inkscape, molden, gnuplot with x11. After the problem had started, if I tried to start any of these, the X icon would begin bouncing in the dock and go away just to come back a few seconds later --- this would keep going on and on --- even if I tried to kill them by finding them in the terminal. Whenever I moused-over the X icon on the dock it would just freeze everything --- and I had to kill the dock to get my computer responding again (luckily I could use spotlight and terminal to get this done). Before this problem, everything used to work flawlessly.

Disgusted, I installed the Xquartz from
XQuartz
but that did not help me much. The same problem comes back while launching (by directly clicking or from terminal) any x11 application, only this time it does not cause everything to freeze up when I mouse over the bouncing X icon.

Funny that I can access x11 applications from another account on the same machine. This is why I believe that the X11 installation on my machine is OK and it's an OSX specific problem caused by messing up some config files on the problematic account.

I didn't find any reasonable differences between the settings in the two accounts -- except for the fact that the problematic account is my main account and it has lots of other applications installed. Grrrrrrrrrr!


Now it's time for some output:
Code:
18:05:57 [438]$ echo $DISPLAY
/tmp/launch-Cy3Z7G/:0

Result of running startx:
Code:
font_cache: Updating FC cache
xauth:  creating new authority file /Users/kousik/.serverauth.13609
xauth: (argv):1:  bad display name "kousiks-apple:1" in "list" command
xauth: (stdin):1:  bad display name "kousiks-apple:1" in "add" command

font_cache: Done

waiting for X server to begin accepting connections .
..
..
Then it puts dots for a while and at the end says:
Code:
..Quitting Xquartz...
Xquartz: start_x11_server: (ipc/send) invalid destination port

giving up.
/usr/X11/bin/xinit:  Connection refused (errno 61):  unable to connect to X server
/usr/X11/bin/xinit:  No such process (errno 3):  unexpected signal 2.
xauth: (argv):1:  bad display name "kousiks-apple:1" in "remove" command

Trying it again gives:
Code:
font_cache: Scanning user font directories to generate X11 font caches
font_cache: Updating FC cache
xauth:  creating new authority file /Users/kousik/.serverauth.20610
xauth: (argv):1:  bad display name "kousiks-apple:1" in "list" command
xauth: (stdin):1:  bad display name "kousiks-apple:1" in "add" command

Xquartz: X11.app = /Applications/Utilities/X11.app/Contents/MacOS/X11
Xquartz: Starting X server: /Applications/Utilities/X11.app/Contents/MacOS/X11 --listenonly
/opt/local/bin:/opt/local/sbin:/Users/kousik/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin:/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin:/usr/X11R6/bin
X11.app: main(): argc=2
        argv[0] = /Applications/Utilities/X11.app/Contents/MacOS/X11.bin
        argv[1] = --listenonly
Waiting for startup parameters via Mach IPC.
X11.app: do_start_x11_server(): argc=6
        argv[0] = /usr/X11/bin/X
        argv[1] = :1
        argv[2] = -nolisten
        argv[3] = tcp
        argv[4] = -auth
        argv[5] = /Users/kousik/.serverauth.20610

Fatal server error:
Server is already active for display 1
        If this server is no longer running, remove /tmp/.X1-lock
        and start again.

   AbortDDX
Quitting Xquartz...
Xquartz: start_x11_server: (ipc/mig) server died
font_cache: Done
giving up.
/usr/X11/bin/xinit:  Connection refused (errno 61):  unable to connect to X server
/usr/X11/bin/xinit:  No such process (errno 3):  Server error.
xauth: (argv):1:  bad display name "kousiks-apple:1" in "remove" command
Looks like it's setting the DISPLAY to localhost:1 ("kousiks-apple" is the hostname). But I don't see where and how since the output of "echo $DISPLAY" is the same as above!

It spits out the PATH variable at the top because I put "echo $PATH" in the script /Applications/Utilities/X11.app/Contents/MacOS/X11.

I followed the instructions on this page
Leopard and X11
but that too did not help me.


Output of running xinit
Code:
Xquartz: X11.app = /Applications/Utilities/X11.app/Contents/MacOS/X11
Xquartz: Starting X server: /Applications/Utilities/X11.app/Contents/MacOS/X11 --listenonly
/opt/local/bin:/opt/local/sbin:/Users/kousik/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin:/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin
X11.app: main(): argc=2
        argv[0] = /Applications/Utilities/X11.app/Contents/MacOS/X11.bin
        argv[1] = --listenonly
Waiting for startup parameters via Mach IPC.
X11.app: do_start_x11_server(): argc=2
        argv[0] = X
        argv[1] = :0
Xquartz starting:
X.Org X Server 1.5.3-apple14
Build Date: 20090812
(EE) XKB: Couldn't open rules file /usr/X11/share/X11/xkb/rules/base
(EE) XKB: No components provided for device Virtual core keyboard
(EE) XKB: Couldn't open rules file /usr/X11/share/X11/xkb/rules/base
(EE) XKB: No components provided for device keyboard

waiting for X server to shut down
I installed the package xkeyboard-config-1.7 to fix the problem with xkb as told somewhere else -- without any visible effect.


In the following link you can find a snapshot of my ~/Library/Prefereces/org.x.X11.plist file
Picasa Web Albums - kousik - Technical

Please please pleeeeease............. help me solve this problem!
__________________
System specs: (1) 13" Macbook Aluminum Unibody (OSX 10.5.8, Darwin 9.8.0, Intel Core2 duo 2.4GHz, 2GB 1067MHz DDR3 RAM, NVIDIA GeForce 9400M) (2) Dell Inspiron 6000 (Intel Pentium M 1.8GHz, 2GB DDR2 SDRAM) -- triple booting with Puppy Linux 4.31, Kubuntu 9.10 and Windows XP Home.

Last edited by kousik; 11-07-2009 at 08:44 PM. Reason: added some more outputs
kousik is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this post
Reply With Quote
Old 11-17-2009, 05:32 PM   #2 (permalink)
kousik

 
kousik's Avatar
 
Member Since: May 04, 2009
Posts: 21
kousik is on a distinguished road
Mac Specs: Model: Macbook; Processor: Intel Core 2 Duo (2.4GHz); RAM: 2GB (DDR3); Video memory: 256MB
Nobody had this problem before?
Please help me fix this problem.... I'll reaaaaaaaaaaaaally appreciate your help. Thanks!
__________________
System specs: (1) 13" Macbook Aluminum Unibody (OSX 10.5.8, Darwin 9.8.0, Intel Core2 duo 2.4GHz, 2GB 1067MHz DDR3 RAM, NVIDIA GeForce 9400M) (2) Dell Inspiron 6000 (Intel Pentium M 1.8GHz, 2GB DDR2 SDRAM) -- triple booting with Puppy Linux 4.31, Kubuntu 9.10 and Windows XP Home.
kousik is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this post
Reply With Quote
Old 11-17-2009, 11:35 PM   #3 (permalink)
rman

 
rman's Avatar
 
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,190
rman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud of
Mac Specs: 2 x 3.0GHz Quad-Core, 6GB OS X 10.5.7
Cool

I looked at the content of my DISPLAY variable and looked similar to yours. If you run xterm from your terminal window what happens?
__________________
Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!
rman is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this post
Reply With Quote
Old 11-18-2009, 05:01 AM   #4 (permalink)
kousik

 
kousik's Avatar
 
Member Since: May 04, 2009
Posts: 21
kousik is on a distinguished road
Mac Specs: Model: Macbook; Processor: Intel Core 2 Duo (2.4GHz); RAM: 2GB (DDR3); Video memory: 256MB
Quote:
Originally Posted by rman View Post
I looked at the content of my DISPLAY variable and looked similar to yours. If you run xterm from your terminal window what happens?
Thanks for the reply.

However, when I try to run xterm (or /usr/X11/bin/xterm) in the terminal (i.e., terminal.app) it does not launch xterm at all; only the X icon on the doc comes and goes away repeatedly -- just like any other x11-based application behaving nowadays on this account.

As I mentioned earlier, when I try to run ANY x11 application in another account on the SAME machine it runs perfectly fine!
__________________
System specs: (1) 13" Macbook Aluminum Unibody (OSX 10.5.8, Darwin 9.8.0, Intel Core2 duo 2.4GHz, 2GB 1067MHz DDR3 RAM, NVIDIA GeForce 9400M) (2) Dell Inspiron 6000 (Intel Pentium M 1.8GHz, 2GB DDR2 SDRAM) -- triple booting with Puppy Linux 4.31, Kubuntu 9.10 and Windows XP Home.
kousik is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this post
Reply With Quote
Old 11-18-2009, 11:27 AM   #5 (permalink)
cradom

 
Member Since: Feb 14, 2004
Location: South-East Texas
Posts: 1,054
cradom is a jewel in the roughcradom is a jewel in the roughcradom is a jewel in the rough
Mac Specs: B&W 350 G3, upgraded to 1ghz G4 with Sonnet Zif.
Code:
If this server is no longer running, remove /tmp/.X1-lock
        and start again.
Have you looked in your /tmp folder to see if there's a lock file?
After a crash, X11 wont start if the lock file is still there.
__________________
Have you ever noticed that anybody going slower than you is an idiot and anyone going faster than you is a maniac? (George Carlin)
cradom is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this post
Reply With Quote
Old 11-18-2009, 07:24 PM   #6 (permalink)
kousik

 
kousik's Avatar
 
Member Since: May 04, 2009
Posts: 21
kousik is on a distinguished road
Mac Specs: Model: Macbook; Processor: Intel Core 2 Duo (2.4GHz); RAM: 2GB (DDR3); Video memory: 256MB
Quote:
Originally Posted by cradom View Post
Code:
If this server is no longer running, remove /tmp/.X1-lock
        and start again.
Have you looked in your /tmp folder to see if there's a lock file?
After a crash, X11 wont start if the lock file is still there.
Well, there were two files: .X1-lock and .X0-lock in /tmp. I first removed the first one, and tried to run xterm in the terminal --- the same problem persisted (i.e, xterm did not start and only the X icon kept coming back in the dock). Most importantly, it did not recreate the lock file!!!

I deleted the other file, .X0-lock too --- and I saw no effect and neither was this lock file recreated when I tried to run xterm again.

[From my other account (where X11 apps still run flawlessly) on the same machine, I can see that if I launch xterm, it creates .X0-lock in /tmp. Now it makes me wonder what actually created .X1-lock in the first place!!! Well, for the time being, I am happy with it assuming some other X11 app did that!]

Thanks for your reply!
__________________
System specs: (1) 13" Macbook Aluminum Unibody (OSX 10.5.8, Darwin 9.8.0, Intel Core2 duo 2.4GHz, 2GB 1067MHz DDR3 RAM, NVIDIA GeForce 9400M) (2) Dell Inspiron 6000 (Intel Pentium M 1.8GHz, 2GB DDR2 SDRAM) -- triple booting with Puppy Linux 4.31, Kubuntu 9.10 and Windows XP Home.

Last edited by kousik; 11-18-2009 at 07:30 PM.
kousik is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this post
Reply With Quote
Old 11-18-2009, 11:39 PM   #7 (permalink)
cradom

 
Member Since: Feb 14, 2004
Location: South-East Texas
Posts: 1,054
cradom is a jewel in the roughcradom is a jewel in the roughcradom is a jewel in the rough
Mac Specs: B&W 350 G3, upgraded to 1ghz G4 with Sonnet Zif.
I believe each user running X11 creates it's own lock file for that session.
If the session exits cleanly, the lock file is deleted (or should be).
Are you using your own .xinit file or the systems? Have you edited the system .xinit file in any way?
Have you tried any other window manager like windowmaker (just fishing here)?
What happens if you run X11 from /Applications/Utilities by double clicking on it?
Take a look here and see if anything helps (it's a little old, but usefull):
Sao's Place - Fink & Apple's X11
__________________
Have you ever noticed that anybody going slower than you is an idiot and anyone going faster than you is a maniac? (George Carlin)
cradom is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this post
Reply With Quote
Old Yesterday, 12:04 AM   #8 (permalink)
kousik

 
kousik's Avatar
 
Member Since: May 04, 2009
Posts: 21
kousik is on a distinguished road
Mac Specs: Model: Macbook; Processor: Intel Core 2 Duo (2.4GHz); RAM: 2GB (DDR3); Video memory: 256MB
Quote:
Originally Posted by cradom View Post
Are you using your own .xinit file or the systems? Have you edited the system .xinit file in any way?
Can you believe that I had this line in ~/.xinitrc and I pretended not seeing it?
Code:
/sw/bin/startkde 2>&1
It must have gotten there while I was trying to install kdegames as I mentioned in my first post, and KDE (which was never installed properly) was supposed to be invoked by it.

I feel like kicking myself ---- after all, it was the first thing I should have noticed!

I manually removed the file, ~/.xinitrc, and everything now works fine.

Thank you all for your help.
__________________
System specs: (1) 13" Macbook Aluminum Unibody (OSX 10.5.8, Darwin 9.8.0, Intel Core2 duo 2.4GHz, 2GB 1067MHz DDR3 RAM, NVIDIA GeForce 9400M) (2) Dell Inspiron 6000 (Intel Pentium M 1.8GHz, 2GB DDR2 SDRAM) -- triple booting with Puppy Linux 4.31, Kubuntu 9.10 and Windows XP Home.

Last edited by kousik; Yesterday at 12:17 AM.
kousik is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this post
Reply With Quote
Old Yesterday, 01:42 AM   #9 (permalink)
cradom

 
Member Since: Feb 14, 2004
Location: South-East Texas
Posts: 1,054
cradom is a jewel in the roughcradom is a jewel in the roughcradom is a jewel in the rough
Mac Specs: B&W 350 G3, upgraded to 1ghz G4 with Sonnet Zif.
It's the little things that mess you up
Glad you got it working.
__________________
Have you ever noticed that anybody going slower than you is an idiot and anyone going faster than you is a maniac? (George Carlin)
cradom is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this post
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
X11 question; Need advice. GARoss OS X - Applications and Games 4 06-22-2009 09:07 AM
Change in default "open with" applications revert back after reboot kousik OS X - Applications and Games 3 05-07-2009 05:10 AM
Problem displaying text OS X keep.it.up OS X - Operating System 1 03-01-2009 09:10 PM
X11 - help! nickthedog OS X - Applications and Games 10 07-26-2007 08:26 AM
Problem with Open office and X11 Chambers OS X - Applications and Games 4 07-05-2007 11:06 PM

 
 
 
     
Home Calendar Get New
     

Copyright ©2001-2009 Mac-Forums.com. All Rights Reserved. A division of iNET Interactive.

Other iNET Interactive Sites: Web Hosting Talk | Swish Talk | Hosting Catalog.com| Dev Papers| Deleted Domains| Hot Scripts

Powered by vBulletin
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.