New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus • Advice and insight from world-class Apple enthusiasts • Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Problem with launching x11 applications


Post Reply New Thread Subscribe

 
Thread Tools
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

kousik is offline
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.
QUOTE Thanks
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

kousik is offline
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.
QUOTE Thanks
rman

 
rman's Avatar
 
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,591
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.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi

rman is offline
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!
QUOTE Thanks
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

kousik is offline
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.
QUOTE Thanks
cradom

 
cradom's Avatar
 
Member Since: Feb 14, 2004
Location: Nederland, Texas
Posts: 2,996
cradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant future
Mac Specs: 21in iMac core2 Duo- 13in macbook - 10.9 on both

cradom is offline
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.

Craig Domingue - resident redneck.
“Never argue with an idiot. He will only bring you down to his level and beat you with experience.”, George Carlin
QUOTE Thanks
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

kousik is offline
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.
QUOTE Thanks
cradom

 
cradom's Avatar
 
Member Since: Feb 14, 2004
Location: Nederland, Texas
Posts: 2,996
cradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant future
Mac Specs: 21in iMac core2 Duo- 13in macbook - 10.9 on both

cradom is offline
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

Craig Domingue - resident redneck.
“Never argue with an idiot. He will only bring you down to his level and beat you with experience.”, George Carlin
QUOTE Thanks
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

kousik is offline
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.
QUOTE Thanks
cradom

 
cradom's Avatar
 
Member Since: Feb 14, 2004
Location: Nederland, Texas
Posts: 2,996
cradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant future
Mac Specs: 21in iMac core2 Duo- 13in macbook - 10.9 on both

cradom is offline
It's the little things that mess you up
Glad you got it working.

Craig Domingue - resident redneck.
“Never argue with an idiot. He will only bring you down to his level and beat you with experience.”, George Carlin
QUOTE Thanks

Post Reply New Thread Subscribe


« Distributed Objects | QT Framework precompilation with XCode »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
Forum Jump

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

All times are GMT -4. The time now is 10:23 PM.

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

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?