diff -up openssh-5.5p1/channels.c.x11 openssh-5.5p1/channels.c --- openssh-5.5p1/channels.c.x11 2010-06-25 13:35:44.000000000 +0200 +++ openssh-5.5p1/channels.c 2010-06-25 13:40:40.000000000 +0200 @@ -3354,7 +3354,17 @@ static int connect_local_xsocket(u_int dnr) { char buf[1024]; +#ifdef linux + int ret; +#endif snprintf(buf, sizeof buf, _PATH_UNIX_X, dnr); +#ifdef linux + /* try abstract socket first */ + buf[0] = '\0'; + if ((ret = connect_local_xsocket_path(buf)) >= 0) + return ret; + buf[0] = '/'; +#endif return connect_local_xsocket_path(buf); }