Index: trunk/Xlib/support/unix_connect.py
===================================================================
--- trunk.orig/Xlib/support/unix_connect.py 2009-11-05 06:06:09.000000000 -0500
+++ trunk/Xlib/support/unix_connect.py 2009-11-05 06:06:23.000000000 -0500
@@ -161,6 +161,14 @@
except os.error:
pass
+ if not auth_data and host=='localhost':
+ # 127.0.0.1 counts as FamilyLocal, not FamilyInternet
+ # See Xtransutil.c:ConvertAddress.
+ # There might be more ways to spell 127.0.0.1 but
+ # 'localhost', yet this code fixes a the case of
+ # OpenSSH tunneling X.
+ return get_auth('unix:%d' % dno, 'unix', dno)
+
return auth_name, auth_data
get_auth = new_get_auth