diff -Nur gnome-panel-2.17.92/gnome-panel/panel-gdm.c gnome-panel-2.17.92.new/gnome-panel/panel-gdm.c
--- gnome-panel-2.17.92/gnome-panel/panel-gdm.c	2007-02-26 21:40:23.000000000 +0100
+++ gnome-panel-2.17.92.new/gnome-panel/panel-gdm.c	2007-03-05 19:15:52.000000000 +0100
@@ -43,7 +43,7 @@
 
 #define GDM_PROTOCOL_UPDATE_INTERVAL 1 /* seconds */
 
-#define GDM_PROTOCOL_SOCKET_PATH "/tmp/.gdm_socket"
+#define GDM_PROTOCOL_SOCKET_PATH "/var/run/gdm_socket"
 
 #define GDM_PROTOCOL_MSG_CLOSE         "CLOSE"
 #define GDM_PROTOCOL_MSG_VERSION       "VERSION"
@@ -241,9 +241,13 @@
 		gdm_shutdown_protocol_connection (data);
                 return FALSE;
         }
-
-        strcpy (addr.sun_path, GDM_PROTOCOL_SOCKET_PATH);
-        addr.sun_family = AF_UNIX;
+	
+	if (g_file_test(GDM_PROTOCOL_SOCKET_PATH, G_FILE_TEST_EXISTS))
+	  strcpy (addr.sun_path, GDM_PROTOCOL_SOCKET_PATH);
+	else
+	  strcpy (addr.sun_path, "/tmp/.gdm_socket");
+        
+	addr.sun_family = AF_UNIX;
 
         if (connect (data->fd, (struct sockaddr *) &addr, sizeof (addr)) < 0) {
                 g_warning ("Failed to establish a connection with GDM: %s",
