Opened 7 years ago

Closed 6 years ago

Last modified 5 years ago

#108 closed crash (Duplicate)

X11 does not start

Reported by: slabrosse@… Owned by: jeremyhu@…
Priority: Important Milestone: 2.3.0
Component: X11.pkg Version: 2.2.1 (xserver-1.3.0-apple20)
Keywords: Cc:

Description

I installed the latest (2.2.1) X11 package on my intel mac running leopard 10.5.2 and it just does not start when I double-click on the icon. This means I don't have any X11 running at the moment (which is quite painful). When I try to install other versions, it runs through all the install process but does not work at the end. Is there a way to uninstall everything in order to re-install the previous version?

Change History (21)

comment:1 Changed 7 years ago by jeremyhu@…

  • Milestone set to 2.3.0
  • Priority changed from blocker to major

Open up Console.app. What gets printed there when you try starting X11.app?

Open up Terminal.app. Run 'DISPLAY="" startx' what happens?

comment:2 Changed 7 years ago by slabrosse@…

Open up Console.app. What gets printed there when you try starting X11.app?

16/05/08 13:31:26 [0x0-0xe10e1].org.x.X11[1928] X11.app: main(): argc=2
16/05/08 13:31:26 [0x0-0xe10e1].org.x.X11[1928] argv[0] = /Applications/Utilities/X11.app/Contents/MacOS/X11
16/05/08 13:31:26 [0x0-0xe10e1].org.x.X11[1928] argv[1] = -psn_0_921825

Open up Terminal.app. Run 'DISPLAY="" startx' what happens?

font_cache: Scanning user font directories to generate X11 font caches
font_cache: Updating FC cache
xauth: creating new authority file /Users/stephane/.serverauth.1983

xinit: Detected Xquartz startup, setting CFProcessPath=/Applications/Utilities/X11-launcher.app/Contents/MacOS/X11
Xquartz starting:
X.org Release 7.2
X.Org X Server 1.3.0-apple20
Build Date: 20080429
font_cache: Done

And X11 is then started and works.

comment:3 Changed 7 years ago by jeremyhu@…

Anything past that in Console.app? Those are messages confirming that it's working... =/

Ok, well then what happens if you have no X11 running and you run 'xterm' in Terminal.app?

comment:4 Changed 7 years ago by slabrosse@…

Actually, the messages in the console only appear when I launch startx from the terminal. Nothing happens if I double-click on the X11 icon.

Then, when no X11 is running, typing xterm in a terminal does not do anything.

comment:5 Changed 7 years ago by jeremyhu@…

What do you mean 'does not do anything'. Does it return with an error? Does it just hang? What is the output of 'ps ax | grep X11'? What happens when you run '/Applications/Utilities/X11.app/Contents/MacOS/X11' at the Terminal?

comment:6 Changed 7 years ago by slabrosse@…

When I double-click on the X11 icon, it looks like it is actually starting except that I do not have access to its menu and I cannot start an xterm.
It takes a long time before in the console, the following message appears :

19/05/08 10:14:38 [0x0-0x1e51e5].org.x.X11[10540] X11.app: main(): argc=2
19/05/08 10:14:38 [0x0-0x1e51e5].org.x.X11[10540] argv[0] = /Applications/Utilities/X11.app/Contents/MacOS/X11

In a terminal :

-bash-3.2$ ps ax | grep X11

1929 ?? S 0:00.02 /bin/bash --login -c /usr/X11/bin/startx

10486 ?? S 0:00.00 /Applications/Utilities/X11.app/Contents/MacOS/X11 -psn_0_1982948
10488 s001 R+ 0:00.00 grep X11

So it seems that it is indeed started but just not functionning the way it should.

After killing the X11 process in the terminal, I tried that :

-bash-3.2$ /Applications/Utilities/X11.app/Contents/MacOS/X11
X11.app: main(): argc=1

argv[0] = /Applications/Utilities/X11.app/Contents/MacOS/X11

with essentially the same results as launching it by double-clic.

comment:7 Changed 7 years ago by jeremyhu@…

can you please 'echo $DISPLAY' in Terminal.app?
Also... looks a bit suspicious that startx is running but not the server... Can you install pstree and run 'pstree -s X11'

comment:8 Changed 7 years ago by slabrosse@…

When I kill startx from the terminal, a new one starts right away:

-bash-3.2$ ps ax | grep X11
10607 ?? S 0:00.02 /bin/bash --login -c /usr/X11/bin/startx
11999 s001 R+ 0:00.00 grep X11
-bash-3.2$ sudo kill 10607
-bash-3.2$ ps ax | grep X11
12009 ?? S 0:00.02 /bin/bash --login -c /usr/X11/bin/startx
12052 s001 R+ 0:00.00 grep X11

Here is the DISPLAY :

-bash-3.2$ echo $DISPLAY
/tmp/launch-k1aBUa/:0

and the result of pstree:

-bash-3.2$ pstree -s X11
-+= 00001 root /sbin/launchd

\-+= 00276 stephane /sbin/launchd

+= 12009 stephane /bin/bash --login -c /usr/X11/bin/startx

| \--- 12050 stephane xset -b
\--= 12055 stephane /Applications/Utilities/X11.app/Contents/MacOS/X11 -psn_

comment:9 Changed 7 years ago by jeremyhu@…

Ok, so why is startx running xset? Is that in your .profile or .bashrc somewhere?

comment:10 Changed 7 years ago by slabrosse@…

yes, I had xset -b in my .bashrc to avoid beeps. Now, if I remove it, it works.
The only remaining little problem is that two X11 icons appear in the dock. It might come from all the different trials I made to solve my X11 problems. Is there something I can do for that ?

comment:11 Changed 7 years ago by jeremyhu@…

Same questsions. When X11 is running with the two icons, open up Terminal.app and tell me:
echo $DISPLAY
pstree -s X11

also, copy-paste all the lines pertaining to X11's startup from Console.app

comment:12 Changed 7 years ago by slabrosse@…

here is what the console says:

20/05/08 20:06:56 [0x0-0x2ff2ff].org.x.X11[25011] X11.app: main(): argc=2
20/05/08 20:06:56 [0x0-0x2ff2ff].org.x.X11[25011] argv[0] = /Applications/Utilities/X11.app/Contents/MacOS/X11
20/05/08 20:06:56 [0x0-0x2ff2ff].org.x.X11[25011] argv[1] = -psn_0_3142399
20/05/08 20:06:56 org.x.startx[25012] font_cache: Scanning user font directories to generate X11 font caches
20/05/08 20:06:56 org.x.privileged_startx[24895] mktemp: mkdtemp failed on /tmp/.ICE-unix: File exists
20/05/08 20:06:56 org.x.privileged_startx[24895] mktemp: mkdtemp failed on /tmp/.X11-unix: File exists
20/05/08 20:06:56 org.x.privileged_startx[24895] mktemp: mkdtemp failed on /tmp/.font-unix: File exists
20/05/08 20:06:56 org.x.privileged_startx[24895] font_cache: Scanning user font directories to generate X11 font caches
20/05/08 20:06:56 org.x.startx[25012] font_cache: Updating FC cache
20/05/08 20:06:56 org.x.privileged_startx[24895] font_cache: Updating FC cache
20/05/08 20:06:56 org.x.startx[25012] xauth: creating new authority file /Users/stephane/.serverauth.25012
20/05/08 20:06:56 org.x.startx[25012] xinit: Detected Xquartz startup, setting CFProcessPath=/Applications/Utilities/X11.app/Contents/MacOS/X11
20/05/08 20:06:56 org.x.startx[25012] Xquartz starting:
20/05/08 20:06:56 org.x.startx[25012] X.org Release 7.2
20/05/08 20:06:56 org.x.startx[25012] X.Org X Server 1.3.0-apple20
20/05/08 20:06:56 org.x.startx[25012] Build Date: 20080429
20/05/08 20:06:56 org.x.startx[25012] Xquartz: run by launchd for fd 0
20/05/08 20:06:56 org.x.startx[25012] AUDIT: Tue May 20 20:06:56 2008: 25106 X: client 1 rejected from local host (uid 501)
20/05/08 20:06:56 [0x0-0x2ff2ff].org.x.X11[25011] Xlib: connection to "/tmp/launch-k1aBUa/:0" refused by server
20/05/08 20:06:56 [0x0-0x2ff2ff].org.x.X11[25011] Xlib: No protocol specified
20/05/08 20:06:56 [0x0-0x2ff2ff].org.x.X11[25011] X11.app: Could not connect to server (DISPLAY="/tmp/launch-k1aBUa/:0", unsetting). Starting X server.
20/05/08 20:06:56 [0x0-0x2ff2ff].org.x.X11[25011] X11.app: Launching /usr/X11/bin/startx:
20/05/08 20:06:56 [0x0-0x2ff2ff].org.x.X11[25011] argv[0] = /usr/bin/login
20/05/08 20:06:56 [0x0-0x2ff2ff].org.x.X11[25011] argv[1] = -fp
20/05/08 20:06:56 [0x0-0x2ff2ff].org.x.X11[25011] argv[2] = stephane
20/05/08 20:06:56 [0x0-0x2ff2ff].org.x.X11[25011] argv[3] = /bin/sh
20/05/08 20:06:56 [0x0-0x2ff2ff].org.x.X11[25011] argv[4] = -c
20/05/08 20:06:56 [0x0-0x2ff2ff].org.x.X11[25011] argv[5] = /usr/X11/bin/startx
20/05/08 20:06:57 [0x0-0x2ff2ff].org.x.X11[25011] font_cache: Scanning user font directories to generate X11 font caches
20/05/08 20:06:57 org.x.privileged_startx[24895] mktemp: mkdtemp failed on /tmp/.ICE-unix: File exists
20/05/08 20:06:57 org.x.privileged_startx[24895] mktemp: mkdtemp failed on /tmp/.X11-unix: File exists
20/05/08 20:06:57 org.x.privileged_startx[24895] mktemp: mkdtemp failed on /tmp/.font-unix: File exists
20/05/08 20:06:57 [0x0-0x2ff2ff].org.x.X11[25011] font_cache: Updating FC cache
20/05/08 20:06:57 org.x.privileged_startx[24895] font_cache: Scanning user font directories to generate X11 font caches
20/05/08 20:06:57 org.x.privileged_startx[24895] font_cache: Updating FC cache
20/05/08 20:06:57 [0x0-0x2ff2ff].org.x.X11[25011] xauth: creating new authority file /Users/stephane/.serverauth.25112
20/05/08 20:06:57 [0x0-0x2ff2ff].org.x.X11[25011] xinit: Detected Xquartz startup, setting CFProcessPath=/Applications/Utilities/X11.app/Contents/MacOS/X11
20/05/08 20:06:57 [0x0-0x2ff2ff].org.x.X11[25011] Xquartz starting:
20/05/08 20:06:57 [0x0-0x2ff2ff].org.x.X11[25011] X.org Release 7.2
20/05/08 20:06:57 [0x0-0x2ff2ff].org.x.X11[25011] X.Org X Server 1.3.0-apple20
20/05/08 20:06:57 [0x0-0x2ff2ff].org.x.X11[25011] Build Date: 20080429
20/05/08 20:06:58 org.x.startx[25012] font_cache: Done
20/05/08 20:06:58 org.x.privileged_startx[24895] font_cache: Done

and in an xterm I get

echo $DISPLAY

:1.0
pstree -s X11
-+= 00001 root /sbin/launchd

\-+= 00276 stephane /sbin/launchd

+= 25011 root /usr/bin/login -fp stephane /bin/sh -c /usr/X11/bin/startx

| \-+- 25112 stephane /bin/sh /usr/X11/bin/startx
| \-+- 25165 stephane xinit /usr/X11/lib/X11/xinit/xinitrc -- /usr/X11/bin

|= 25166 stephane /usr/X11/bin/X :1 -nolisten tcp -auth /Users/steph

| \--= 25169 stephane /usr/bin/quartz-wm
\-+= 25012 stephane /bin/sh /usr/X11/bin/startx

\-+- 25105 stephane xinit /usr/X11/lib/X11/xinit/xinitrc -- /usr/X11/bin/X

= 25106 stephane /usr/X11/bin/X :0 -nolisten tcp -auth /Users/stephan

\--= 25109 stephane /usr/bin/quartz-wm

comment:13 Changed 7 years ago by jeremyhu@…

Please use the wiki formatting to make things more readable here... example:

This is not formatted badly by the wiki

Sorry for the inconvenience =/

Here is the problem in your log:

20/05/08 20:06:56 org.x.startx[25012] Xquartz: run by launchd for fd 0
20/05/08 20:06:56 org.x.startx[25012] AUDIT: Tue May 20 20:06:56 2008:
25106 X: client 1 rejected from local host (uid 501)
20/05/08 20:06:56 [0x0-0x2ff2ff].org.x.X11[25011] Xlib: connection to
"/tmp/launch-k1aBUa/:0" refused by server
20/05/08 20:06:56 [0x0-0x2ff2ff].org.x.X11[25011] Xlib: No protocol
specified
20/05/08 20:06:56 [0x0-0x2ff2ff].org.x.X11[25011] X11.app: Could not
connect to server (DISPLAY="/tmp/launch-k1aBUa/:0", unsetting).  Starting
X server.

What does 'echo $DISPLAY' show in Terminal.app (not xterm. This is important!)
What happens if you run 'xterm' from within Terminal.app with no X11.app running?

comment:14 Changed 7 years ago by slabrosse@…

Sorry about the bad formatting: I am not used to wiki.

In terminal here is what I get for DISPLAY
-bash-3.2$ echo $DISPLAY
/tmp/launch-6QTo62/:0

Then, running xterm gives starts X11 (only one in fact this time) but not xterm is started and I get the following message:
-bash-3.2$ xterm

Xlib: connection to "/tmp/launch-6QTo62/:0" refused by server

Xlib: No protocol specified

xterm Xt error: Can't open display: /tmp/launch-6QTo62/:0

comment:15 Changed 7 years ago by jeremyhu@…

Do you have macports or fink or anything like that installed?

comment:16 Changed 6 years ago by slabrosse@…

Yes, I have both macport and fink.

comment:17 Changed 6 years ago by jeremyhu@…

Well that's why. What happens when you type 'which xterm'? I'm betting its using a pre-leopard libX11 which doesn't understand the launchd socket.

comment:18 Changed 6 years ago by slabrosse@…

In terminal, I get
which xterm
/usr/X11R6/bin/xterm

while in xterm :
which xterm
/usr/X11/bin/xterm

Should I rebuild all the fink tree using the new libraries? How can I do that?

comment:19 Changed 6 years ago by jeremyhu@…

Is /usr/X11R6 a symlink to /usr/X11 or not?

comment:20 Changed 6 years ago by slabrosse@…

Actually, it is :

ls -l /usr/
total 0
drwxr-xr-x 9 root wheel 306 Jun 2 10:51 X11
lrwxr-xr-x 1 root wheel 3 May 16 13:28 X11R6 -> X11

comment:21 Changed 6 years ago by jeremyhu@…

  • Resolution set to duplicate
  • Status changed from new to closed

Ok, I think this may actually be the same as issue #126

Can you please look at that issue and if it's not the same, reopen this with some more information.

Thanks

Note: See TracTickets for help on using tickets.