diff -Nurd -x'*~' gnome-session-2.28.0.orig/capplet/Makefile.in gnome-session-2.28.0/capplet/Makefile.in
--- gnome-session-2.28.0.orig/capplet/Makefile.in	2009-09-21 12:20:10.000000000 -0400
+++ gnome-session-2.28.0/capplet/Makefile.in	2010-03-04 02:14:02.000000000 -0500
@@ -297,12 +297,12 @@
 top_srcdir = @top_srcdir@
 NULL = 
 INCLUDES = \
+	-I$(top_srcdir)/egg				\
+	-I$(top_srcdir)/gnome-session			\
 	$(WARN_CFLAGS)					\
 	$(DISABLE_DEPRECATED_CFLAGS)			\
 	$(SESSION_PROPERTIES_CFLAGS)			\
 	$(GCONF_CFLAGS)					\
-	-I$(top_srcdir)/egg				\
-	-I$(top_srcdir)/gnome-session			\
 	-DLOCALE_DIR=\""$(datadir)/locale"\"		\
 	-DGTKBUILDER_DIR=\""$(pkgdatadir)"\"		\
 	$(NULL)
diff -Nurd -x'*~' gnome-session-2.28.0.orig/compat/Makefile.in gnome-session-2.28.0/compat/Makefile.in
--- gnome-session-2.28.0.orig/compat/Makefile.in	2009-09-21 12:20:10.000000000 -0400
+++ gnome-session-2.28.0/compat/Makefile.in	2010-03-04 02:21:04.000000000 -0500
@@ -317,16 +317,16 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 INCLUDES = \
+	-I$(top_srcdir)/egg			\
 	$(WARN_CFLAGS)				\
 	$(DISABLE_DEPRECATED_CFLAGS)		\
 	$(COMPAT_CFLAGS)			\
 	$(GCONF_CFLAGS)				\
-	-I$(top_srcdir)/egg			\
 	-DDEFAULT_SESSION_DIR=\""$(default_sessiondir)"\" \
 	-DSYSCONFDIR=\""$(sysconfdir)"\"
 
 LDADD = \
-	$(COMPAT_LIBS)
+	$(COMPAT_LIBS) $(INTLLIBS) $(X_LIBS)
 
 helperdir = $(pkglibdir)/helpers
 default_sessiondir = $(sysconfdir)/xdg/autostart
diff -Nurd -x'*~' gnome-session-2.28.0.orig/configure gnome-session-2.28.0/configure
--- gnome-session-2.28.0.orig/configure	2009-09-21 12:20:09.000000000 -0400
+++ gnome-session-2.28.0/configure	2010-03-04 03:05:22.000000000 -0500
@@ -17899,6 +17899,7 @@
    sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 	< $srcdir/po/POTFILES.in > po/POTFILES
 
+EGG_SMCLIENT_LIBS="$EGG_SMCLIENT_LIBS $INTLLIBS"
 
 { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
 $as_echo_n "checking for ANSI C header files... " >&6; }
@@ -21439,6 +21440,7 @@
         cflags:	                  ${CFLAGS}
         Maintainer mode:          ${USE_MAINTAINER_MODE}
 
+        DeviceKit-Power support:  no
         Default WM:               ${with_default_wm}
         PolicyKit support:        ${have_polkit}
         XRender support:          ${have_xrender}
diff -Nurd -x'*~' gnome-session-2.28.0.orig/gnome-session/Makefile.in gnome-session-2.28.0/gnome-session/Makefile.in
--- gnome-session-2.28.0.orig/gnome-session/Makefile.in	2009-09-21 12:20:12.000000000 -0400
+++ gnome-session-2.28.0/gnome-session/Makefile.in	2010-03-04 02:22:22.000000000 -0500
@@ -325,17 +325,18 @@
 NULL = 
 noinst_LTLIBRARIES = libgsmutil.la
 INCLUDES = \
+	-I$(top_srcdir)/egg			\
 	$(WARN_CFLAGS)				\
 	$(DISABLE_DEPRECATED_CFLAGS)		\
 	$(SM_CFLAGS)				\
 	$(ICE_CFLAGS)				\
 	$(GNOME_SESSION_CFLAGS)			\
 	$(GCONF_CFLAGS)				\
-	-I$(top_srcdir)/egg			\
 	-DLOCALE_DIR=\""$(datadir)/locale"\"	\
 	-DDATA_DIR=\""$(datadir)/gnome-session"\" \
 	-DDBUS_LAUNCH=\"dbus-launch\"		\
 	-DLIBEXECDIR=\"$(libexecdir)\"		\
+	-DPREFIX=\"$(prefix)\"	\
 	-DGTKBUILDER_DIR=\""$(pkgdatadir)"\"		\
 	-DGCONF_SANITY_CHECK=\""$(GCONF_SANITY_CHECK)"\" \
 	-DGCONFTOOL_CMD=\"$(GCONFTOOL)\"	\
@@ -365,7 +366,7 @@
 	$(GNOME_SESSION_LIBS)			\
 	$(GCONF_LIBS)				\
 	$(XRENDER_LIBS)				\
-	$(XTEST_LIBS)				\
+	$(XTEST_LIBS) $(X_LIBS) $(INTLLIBS)	\
 	$(EXECINFO_LIBS)			\
 	$(NULL)
 
@@ -414,7 +415,7 @@
 	$(NULL)
 
 libgsmutil_la_LIBADD = \
-	$(GNOME_SESSION_LIBS)
+	$(GNOME_SESSION_LIBS) -lXext -L/usr/X11/lib -L/usr/X11R6/lib
 
 libgsmutil_la_SOURCES = \
 	gsm-util.c				\
diff -Nurd -x'*~' gnome-session-2.28.0.orig/gnome-session/gdm-signal-handler.c gnome-session-2.28.0/gnome-session/gdm-signal-handler.c
--- gnome-session-2.28.0.orig/gnome-session/gdm-signal-handler.c	2009-06-29 18:36:53.000000000 -0400
+++ gnome-session-2.28.0/gnome-session/gdm-signal-handler.c	2010-03-04 02:23:17.000000000 -0500
@@ -203,8 +203,8 @@
                 }
         } else if (pid == 0) {
                 /* Child process */
-                execl (LIBEXECDIR "/gdm-crash-logger",
-                       LIBEXECDIR "/gdm-crash-logger", NULL);
+                execl (PREFIX "/lib/gdm/gdm-crash-logger",
+                       PREFIX "/lib/gdm/gdm-crash-logger", NULL);
         }
 
         return success;
@@ -221,7 +221,7 @@
          * we get much better information out of it.  Otherwise
          * fall back to execinfo.
          */
-        if (g_stat (LIBEXECDIR "/gdm-crash-logger", &s) == 0) {
+        if (g_stat (PREFIX "/lib/gdm/gdm-crash-logger", &s) == 0) {
                 fallback = crashlogger_get_backtrace () ? FALSE : TRUE;
         }
 
diff -Nurd -x'*~' gnome-session-2.28.0.orig/gnome-session/gdm.c gnome-session-2.28.0/gnome-session/gdm.c
--- gnome-session-2.28.0.orig/gnome-session/gdm.c	2009-04-19 14:26:52.000000000 -0400
+++ gnome-session-2.28.0/gnome-session/gdm.c	2010-03-04 02:17:30.000000000 -0500
@@ -254,10 +254,12 @@
 
         g_assert (data->fd <= 0);
 
-        if (g_file_test (GDM_PROTOCOL_SOCKET_PATH, G_FILE_TEST_EXISTS)) {
-                strcpy (addr.sun_path, GDM_PROTOCOL_SOCKET_PATH);
+        if (g_file_test (PREFIX GDM_PROTOCOL_SOCKET_PATH, G_FILE_TEST_EXISTS)) {
+                strcpy (addr.sun_path, PREFIX GDM_PROTOCOL_SOCKET_PATH);
         } else if (g_file_test ("/tmp/.gdm_socket", G_FILE_TEST_EXISTS)) {
                 strcpy (addr.sun_path, "/tmp/.gdm_socket");
+        } else if (g_file_test (GDM_PROTOCOL_SOCKET_PATH, G_FILE_TEST_EXISTS)) {
+                strcpy (addr.sun_path, GDM_PROTOCOL_SOCKET_PATH);
         } else {
                 return FALSE;
         }
diff -Nurd -x'*~' gnome-session-2.28.0.orig/gnome-session/gsm-logout-dialog.c gnome-session-2.28.0/gnome-session/gsm-logout-dialog.c
--- gnome-session-2.28.0.orig/gnome-session/gsm-logout-dialog.c	2009-08-25 04:03:42.000000000 -0400
+++ gnome-session-2.28.0/gnome-session/gsm-logout-dialog.c	2010-03-04 02:49:16.000000000 -0500
@@ -27,7 +27,9 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
+#ifdef HAVE_DEVKIT_POWER
 #include <devkit-power-gobject/devicekit-power.h>
+#endif /* HAVE_DEVKIT_POWER */
 
 #include "gsm-logout-dialog.h"
 #include "gsm-consolekit.h"
@@ -50,7 +52,9 @@
 {
         GsmDialogLogoutType  type;
 
+#ifdef HAVE_DEVKIT_POWER
         DkpClient           *dkp_client;
+#endif /* HAVE_DEVKIT_POWER */
         GsmConsolekit       *consolekit;
 
         int                  timeout;
@@ -142,7 +146,9 @@
         gtk_window_set_keep_above (GTK_WINDOW (logout_dialog), TRUE);
         gtk_window_stick (GTK_WINDOW (logout_dialog));
 
+#ifdef HAVE_DEVKIT_POWER
         logout_dialog->priv->dkp_client = dkp_client_new ();
+#endif /* HAVE_DEVKIT_POWER */
 
         logout_dialog->priv->consolekit = gsm_get_consolekit ();
 
@@ -166,10 +172,12 @@
                 logout_dialog->priv->timeout_id = 0;
         }
 
+#ifdef HAVE_DEVKIT_POWER
         if (logout_dialog->priv->dkp_client) {
                 g_object_unref (logout_dialog->priv->dkp_client);
                 logout_dialog->priv->dkp_client = NULL;
         }
+#endif /* HAVE_DEVKIT_POWER */
 
         if (logout_dialog->priv->consolekit) {
                 g_object_unref (logout_dialog->priv->consolekit);
@@ -182,21 +190,29 @@
 static gboolean
 gsm_logout_supports_system_suspend (GsmLogoutDialog *logout_dialog)
 {
+#ifdef HAVE_DEVKIT_POWER
         gboolean ret;
         g_object_get (logout_dialog->priv->dkp_client,
                       "can-suspend", &ret,
                       NULL);
         return ret;
+#else /* HAVE_DEVKIT_POWER */
+	return FALSE;
+#endif /* HAVE_DEVKIT_POWER */
 }
 
 static gboolean
 gsm_logout_supports_system_hibernate (GsmLogoutDialog *logout_dialog)
 {
+#ifdef HAVE_DEVKIT_POWER
         gboolean ret;
         g_object_get (logout_dialog->priv->dkp_client,
                       "can-hibernate", &ret,
                       NULL);
         return ret;
+#else /* HAVE_DEVKIT_POWER */
+	return FALSE;
+#endif /* HAVE_DEVKIT_POWER */
 }
 
 static gboolean
diff -Nurd -x'*~' gnome-session-2.28.0.orig/gnome-session/gsm-manager.c gnome-session-2.28.0/gnome-session/gsm-manager.c
--- gnome-session-2.28.0.orig/gnome-session/gsm-manager.c	2009-09-18 12:36:04.000000000 -0400
+++ gnome-session-2.28.0/gnome-session/gsm-manager.c	2010-03-04 02:49:16.000000000 -0500
@@ -38,7 +38,9 @@
 #include <dbus/dbus-glib.h>
 #include <dbus/dbus-glib-lowlevel.h>
 
+#ifdef HAVE_DEVKIT_POWER
 #include <devkit-power-gobject/devicekit-power.h>
+#endif /* HAVE_DEVKIT_POWER */
 
 #include <gtk/gtk.h> /* for logout dialog */
 #include <gconf/gconf-client.h>
@@ -135,7 +137,9 @@
         DBusGConnection        *connection;
 
         /* Interface with other parts of the system */
+#ifdef HAVE_DEVKIT_POWER
         DkpClient              *dkp_client;
+#endif /* HAVE_DEVKIT_POWER */
 };
 
 enum {
@@ -971,6 +975,7 @@
 static void
 manager_attempt_hibernate (GsmManager *manager)
 {
+#ifdef HAVE_DEVKIT_POWER
         gboolean  can_hibernate;
         GError   *error;
         gboolean  ret;
@@ -992,11 +997,15 @@
                         g_error_free (error);
                 }
         }
+#else /* HAVE_DEVKIT_POWER */
+        return;
+#endif /* HAVE_DEVKIT_POWER */
 }
 
 static void
 manager_attempt_suspend (GsmManager *manager)
 {
+#ifdef HAVE_DEVKIT_POWER
         gboolean  can_suspend;
         GError   *error;
         gboolean  ret;
@@ -1018,6 +1027,9 @@
                         g_error_free (error);
                 }
         }
+#else /* HAVE_DEVKIT_POWER */
+        return;
+#endif /* HAVE_DEVKIT_POWER */
 }
 
 static void
@@ -2190,10 +2202,12 @@
                 manager->priv->gconf_client = NULL;
         }
 
+#ifdef HAVE_DEVKIT_POWER
         if (manager->priv->dkp_client != NULL) {
                 g_object_unref (manager->priv->dkp_client);
                 manager->priv->dkp_client = NULL;
         }
+#endif /* HAVE_DEVKIT_POWER */
 
         G_OBJECT_CLASS (gsm_manager_parent_class)->dispose (object);
 }
@@ -2423,7 +2437,9 @@
                           G_CALLBACK (on_presence_status_changed),
                           manager);
 
+#ifdef HAVE_DEVKIT_POWER
         manager->priv->dkp_client = dkp_client_new ();
+#endif /* HAVE_DEVKIT_POWER */
 
         /* GConf setup */
         gconf_client_add_dir (manager->priv->gconf_client,
@@ -2947,10 +2963,15 @@
         gboolean can_suspend;
         gboolean can_hibernate;
 
+#ifdef HAVE_DEVKIT_POWER
         g_object_get (manager->priv->dkp_client,
                       "can-suspend", &can_suspend,
                       "can-hibernate", &can_hibernate,
                       NULL);
+#else /* HAVE_DEVKIT_POWER */
+        can_suspend = FALSE;
+        can_hibernate = FALSE;
+#endif /* HAVE_DEVKIT_POWER */
 
         g_debug ("GsmManager: CanShutdown called");
 
diff -Nurd -x'*~' gnome-session-2.28.0.orig/gnome-session/main.c gnome-session-2.28.0/gnome-session/main.c
--- gnome-session-2.28.0.orig/gnome-session/main.c	2009-07-01 08:45:30.000000000 -0400
+++ gnome-session-2.28.0/gnome-session/main.c	2010-03-04 02:25:38.000000000 -0500
@@ -382,6 +382,7 @@
                       char   **argv,
                       GError **error)
 {
+#ifndef __APPLE__
         char **new_argv;
         int    i;
 
@@ -412,6 +413,7 @@
                              g_strerror (errno));
                 return FALSE;
         }
+#endif
 
         /* Should not be reached */
         return TRUE;
diff -Nurd -x'*~' gnome-session-2.28.0.orig/tools/Makefile.in gnome-session-2.28.0/tools/Makefile.in
--- gnome-session-2.28.0.orig/tools/Makefile.in	2009-09-21 12:20:12.000000000 -0400
+++ gnome-session-2.28.0/tools/Makefile.in	2010-03-04 02:15:48.000000000 -0500
@@ -302,7 +302,7 @@
 	$(ICE_LIBS)				\
 	$(GNOME_SESSION_LIBS)			\
 	$(DBUS_GLIB_LIBS)			\
-	$(GCONF_LIBS)
+	$(GCONF_LIBS) $(INTLLIBS)
 
 gnome_session_save_SOURCES = \
 	gnome-session-save.c
