enable support for passing the ICEAUTHORITY shell variable to define where to create the ice auth file diff -r -u xfce4-session-4.4.3.orig/xfce4-session/main.c xfce4-session-4.4.3/xfce4-session/main.c --- xfce4-session-4.4.3.orig/xfce4-session/main.c 2009-01-25 16:01:17 -0600 +++ xfce4-session-4.4.3/xfce4-session/main.c 2009-01-25 16:03:14 -0600 @@ -67,7 +67,8 @@ { const gchar *lang; const gchar *sm; - gchar *authfile; + gchar *authfile = NULL; + int staticauthfile = TRUE; int fd; /* check that no other session manager is running */ @@ -94,7 +95,13 @@ } /* check access to $HOME/.ICEauthority */ - authfile = xfce_get_homefile (".ICEauthority", NULL); + authfile = g_getenv ("ICEAUTHORITY"); + + if (authfile == NULL){ + authfile = xfce_get_homefile (".ICEauthority", NULL); + staticauthfile = FALSE; + } + fd = open (authfile, O_RDWR | O_CREAT, 0600); if (fd < 0) { @@ -102,7 +109,7 @@ authfile, g_strerror (errno)); exit (EXIT_FAILURE); } - g_free (authfile); + if (staticauthfile && authfile) g_free (authfile); close (fd); }