aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/nxauth/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/nxauth/process.c')
-rw-r--r--nx-X11/programs/nxauth/process.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/nx-X11/programs/nxauth/process.c b/nx-X11/programs/nxauth/process.c
index bbf59eb7a..d65638697 100644
--- a/nx-X11/programs/nxauth/process.c
+++ b/nx-X11/programs/nxauth/process.c
@@ -503,6 +503,20 @@ get_displayname_auth(char *displayname, Xauth *auth)
if (cp && strncmp (cp, "/unix:", 6) == 0)
prelen = (cp - displayname);
+ #ifdef __APPLE__
+
+ /*
+ * FIXME: This is an attempt to get the right
+ * cookie, because no one can grant that the
+ * X server is running on the display number
+ * reported in the launchd display name.
+ */
+
+ if (strncmp (displayname, "/tmp/launch", 11) == 0)
+ displayname = strrchr(displayname, '/') + 1;
+
+ #endif
+
if (!parse_displayname (displayname + ((prelen > 0) ? prelen + 1 : 0),
&family, &host, &dpynum, &scrnum, &rest)) {
return False;