diff -uNr python-xlib-0.20/Xlib/support/unix_connect.py python-xlib-0.20.mod/Xlib/support/unix_connect.py
--- python-xlib-0.20/Xlib/support/unix_connect.py	2017-09-07 15:22:58.000000000 +0300
+++ python-xlib-0.20.mod/Xlib/support/unix_connect.py	2017-12-11 22:06:18.231860274 +0200
@@ -96,7 +96,7 @@
 
         # Else use Unix socket
         else:
-            address = '/tmp/.X11-unix/X%d' % dno
+            address = '@TERMUX_PREFIX@/tmp/.X11-unix/X%d' % dno
             if not os.path.exists(address):
                 # Use abstract address.
                 address = '\0' + address
