I'm having trouble with XQuartz on Mavericks. After I went to apple genius support to change my battery (in which the genius guy forced power off when I had an X11 connection opened), I am having the following crash when I try to open XQuartz:
*** 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.
I've tried to make a clean install of the XQuartz by doing:
launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist
sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz
sudo pkgutil —forget org.macosforge.xquartz.pkg
And then installed XQuartz latest version (in actual date it is this one). Log-out, log-in, no success.
I also tried deleting /private/tmp/.X*
files, /private/tmp/launch-*
folders which contained xquartz displays and also the .Xauthority
file in the $HOME
directory.
Since this didn't work, I've struggled to use the port xorg-server
X11, using sudo port install xorg-server
after uninstalling XQuartz. I also had to make it active using launchctl load -w /Library/LaunchAgents/org.macports.startx.plist
(found here) and also used sudo port -f deactivate xinit && sudo port activate xinit
(found here).
Unfortunately it didn't work also (I got an error on the server saying it had not permissions to open the $DISPLAY on my local machine).
Other treads in superuser talking about the similar issue:
- Issue on mavericks, no answer on this topic.
- Issue on snowleopard: I need to redo this
launchctl load -w
again paying attention to thesudo
tip which I didn't know about.
I have tried every combination possible and exhausted searching the internet for possibilities. I am dead in the water here guys , any ideas?