2

I occasionally run into the following first-world nightmare, usually when trying to run open source software (in this case Inkscape on a Mac Pro running Lion, though I've seen this error before as well, I think with Wine and OpenOffice if I remember right):


  • First, it fails to open with this error:

The application X11 could not be opened.

An error occurred while starting the X11 server: "Cannot establish any listening sockets - Make sure an X server isn't already running"

Click Quit to quit X11. Click Report to see more details or send a report to Apple.

[Report...] [Quit]

  • Clicking 'Quit' just causes the exact same error to endlessly pop up again. Force Quitting the application that caused the error (Inkscape) or X11 itself has the same result. As does quitting from the dock.
  • If I try to just ignore it, it refreshes itself after a few minutes or so, and the icon keeps bouncing in the dock.
  • Attempting to restart to break the cycle fails with this sadistic error:

The application X11 canceled restart.

To try again, quit X11 and choose Restart from the Apple menu.

But the reason I want to restart is to make X11 quit and stop it from reopening itself!

Report... causes X11 to crash with an "X11 quit unexpectedly" error - but it still automatically re-opens itself and it still cancels shutdown / restart in exactly the same way. Shut down has the same error as restart: "The application X11 canceled shut down".


Any ideas how to:

  • Get X11 to go away so I can restart and continue what I was doing? (without just pulling the plug)
  • (for bonus points) Stop things like this from happening? There's no clues an average user like me can make sense of in any of the above for how to debug and fix the underlying problem.

4 Answers 4

2

You can force X11 to quit, which will allow for a normal reboot but won't fix whatever problems are causing X11 to fail to launch / hang / otherwise misbehave.

Open terminal and type:

 killall X11

You might use sudo to kill any X1 processes that you don't own, but use care with root and killing processes.

2

For the reboot:

Save your work then open a terminal and type:

sudo reboot

Bam! No questions asked; no "cancelled" message, goes down hard!

No ideas on the second question other than reboot and retry repeatedly, seems to fail about 9/10 times for me.

1

Remove all the .plist files with X11 in them in the Preferences folder (2 in my case) and then quit the X11 app.

From: https://discussions.apple.com/message/24658060#24658060

tomahawk.chop on Mar 9, 2013 2:16 PM in response to chltjdtn

Re: My x11 is malfunctioning.

Had this same problem. XQuartz would not start working after a complete reinstall of X11, or reboot, repair permissions etc. Ended up realizing it was a User specific problem, so I removed the X11 .plist files from ~/Users/yourusername/Library/Preferences. I don't remember the exact names of the two .plist files I removed, but they were org.x11.pllist or something along those lines. Once I removed these two files and rebooted XQuartz the skies parted and X11 worked. Hope this helps!

0

Following the advice here: Type in terminal:

sudo /opt/X11/lib/X11/xinit/privileged_startx.d/10-tmpdirs

To test if X11 is working fine you can type:

xclock

If you see the clock X11 is working fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .