Index: gnome-settings-daemon/ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/ChangeLog,v
retrieving revision 1.181
diff -p -u -r1.181 ChangeLog
--- gnome-settings-daemon/ChangeLog	12 Jun 2005 13:09:44 -0000	1.181
+++ gnome-settings-daemon/ChangeLog	13 Jun 2005 16:23:47 -0000
@@ -1,3 +1,8 @@
+2005-05-04  William Jon McCann  <mccann@jhu.edu>
+
+	* gnome-settings-multimedia-keys.c (do_screensaver_action) 
+	(do_action): 
+
 2005-06-12  Sebastien Bacher  <seb128@debian.org>
 
 	* gnome-settings-daemon.c: (clipboard_manager_watch_cb):
Index: gnome-settings-daemon/gnome-settings-multimedia-keys.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-multimedia-keys.c,v
retrieving revision 1.13
diff -p -u -r1.13 gnome-settings-multimedia-keys.c
--- gnome-settings-daemon/gnome-settings-multimedia-keys.c	22 May 2005 15:46:43 -0000	1.13
+++ gnome-settings-daemon/gnome-settings-multimedia-keys.c	13 Jun 2005 16:23:47 -0000
@@ -802,6 +802,25 @@ do_sound_action (Acme *acme, int type)
 }
 
 static void
+do_screensaver_action (Acme *acme)
+{
+	char *command;
+	char *path;
+
+	path = g_find_program_in_path ("gnome-screensaver-command");
+	if (path) {
+		command = g_strdup_printf ("%s --lock", path);
+		g_free (path);
+	} else {
+		command = g_strdup ("xscreensaver-command -lock");
+	}
+
+	execute (command, FALSE);
+
+	g_free (command);
+}
+
+static void
 do_action (Acme *acme, int type)
 {
 	switch (type) {
@@ -829,7 +848,7 @@ do_action (Acme *acme, int type)
 		do_sleep_action ("apm", "xset dpms force off");
 		break;
 	case SCREENSAVER_KEY:
-		execute ("xscreensaver-command -lock", FALSE);
+		do_screensaver_action (acme);
 		break;
 	case HELP_KEY:
 		do_help_action (acme);
Index: gnome-settings-daemon/gnome-settings-screensaver.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-screensaver.c,v
retrieving revision 1.3
diff -p -u -r1.3 gnome-settings-screensaver.c
--- gnome-settings-daemon/gnome-settings-screensaver.c	22 May 2005 15:46:43 -0000	1.3
+++ gnome-settings-daemon/gnome-settings-screensaver.c	13 Jun 2005 16:23:47 -0000
@@ -35,6 +35,7 @@
 #define START_SCREENSAVER_KEY   "/apps/gnome_settings_daemon/screensaver/start_screensaver"
 #define SHOW_STARTUP_ERRORS_KEY "/apps/gnome_settings_daemon/screensaver/show_startup_errors"
 #define XSCREENSAVER_COMMAND    "xscreensaver -nosplash"
+#define GNOME_SCREENSAVER_COMMAND "gnome-screensaver"
 
 void
 gnome_settings_screensaver_init (GConfClient *client)
@@ -42,8 +43,12 @@ gnome_settings_screensaver_init (GConfCl
 	/*
 	 * do nothing.
 	 *
-	 * our settings only apply to startup, and the screensaver
-	 * settings are all in xscreensaver and not gconf.
+	 * with gnome-screensaver, all settings are loaded internally
+	 * from gconf at startup
+	 *
+	 * with xscreensaver, our settings only apply to startup, and
+	 * the screensaver settings are all in xscreensaver and not
+	 * gconf.
 	 *
 	 * we could have xscreensaver-demo run gconftool-2 directly,
 	 * and start / stop xscreensaver here
@@ -72,13 +77,24 @@ gnome_settings_screensaver_load (GConfCl
 	gboolean start_screensaver;
 	gboolean show_error;
 	GtkWidget *dialog, *toggle;
- 
+	char *command;
+	int res;
+
 	start_screensaver = gconf_client_get_bool (client, START_SCREENSAVER_KEY, NULL);
 
 	if (!start_screensaver)
 		return;
 
-	if (g_spawn_command_line_async (XSCREENSAVER_COMMAND, &gerr))
+	command = g_find_program_in_path (GNOME_SCREENSAVER_COMMAND);
+	if (!command) {
+		command = g_strdup (XSCREENSAVER_COMMAND);
+	}
+
+	res = g_spawn_command_line_async (command, &gerr);
+
+	g_free (command);
+
+	if (res)
 		return;
 	
 	show_error = gconf_client_get_bool (client, SHOW_STARTUP_ERRORS_KEY, NULL);
