Skip to content

X does not work on OS X EI Capitan #1

@ghost

Description

I tried a project which used python-xlib on OS X EI Capitan. And the bottom is backtraces.
And I have found some issue on stackexchange. It's seems not a
bug related to python-xlib, but the X11 on Mac os has changed the socket path from /tmp to /private/tmp. I tried to change host.startswith('/tmp/'): to host.startswith('/private/tmp/'):, and then
the backtraces go away.
I also saw a similar ticket http://sourceforge.net/p/python-xlib/bugs/27/ which claimed fixed. I am not sure its the same issue.
I am just adding an issue here in case others come across the same problem. Hope not to bother you.

File "/Users/declanqian/Dev/site-lisp/webkit/xutils.py", line 31, in get_xlib_display
    xlib_display =  display.Display()
  File "/usr/local/lib/python2.7/site-packages/Xlib/display.py", line 83, in __init__
    self.display = _BaseDisplay(display)
  File "/usr/local/lib/python2.7/site-packages/Xlib/display.py", line 65, in __init__
    apply(protocol.display.Display.__init__, (self, ) + args, keys)
  File "/usr/local/lib/python2.7/site-packages/Xlib/protocol/display.py", line 49, in __init__
    self.socket = connect.get_socket(name, host, displayno)
  File "/usr/local/lib/python2.7/site-packages/Xlib/support/connect.py", line 79, in get_socket
    return mod.get_socket(dname, host, dno)
  File "/usr/local/lib/python2.7/site-packages/Xlib/support/unix_connect.py", line 90, in get_socket
    raise error.DisplayConnectionError(dname, str(val))
Xlib.error.DisplayConnectionError: Can't connect to display 
"/private/tmp/com.apple.launchd.userNDyhts/org.macosforge.xquartz:0": 
[Errno 8] nodename nor servname provided, or not known

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions