diff --git a/libgnome-desktop/gnome-bg.c b/libgnome-desktop/gnome-bg.c
index 35212a9..41787da 100644
--- a/libgnome-desktop/gnome-bg.c
+++ b/libgnome-desktop/gnome-bg.c
@@ -43,13 +43,14 @@ Author: Soren Sandmann <sandmann@redhat.com>
 #define GNOME_DESKTOP_USE_UNSTABLE_API
 #include <libgnomeui/gnome-bg.h>
 
-#define BG_KEY_DRAW_BACKGROUND    GNOME_BG_KEY_DIR "/draw_background"
-#define BG_KEY_PRIMARY_COLOR      GNOME_BG_KEY_DIR "/primary_color"
-#define BG_KEY_SECONDARY_COLOR    GNOME_BG_KEY_DIR "/secondary_color"
-#define BG_KEY_COLOR_TYPE         GNOME_BG_KEY_DIR "/color_shading_type"
-#define BG_KEY_PICTURE_PLACEMENT  GNOME_BG_KEY_DIR "/picture_options"
-#define BG_KEY_PICTURE_OPACITY    GNOME_BG_KEY_DIR "/picture_opacity"
-#define BG_KEY_PICTURE_FILENAME   GNOME_BG_KEY_DIR "/picture_filename"
+#define GNOME_BG_KEY_DIR "/desktop/gnome/background"
+
+#define BG_KEY_PRIMARY_COLOR      "/primary_color"
+#define BG_KEY_SECONDARY_COLOR    "/secondary_color"
+#define BG_KEY_COLOR_TYPE         "/color_shading_type"
+#define BG_KEY_PICTURE_PLACEMENT  "/picture_options"
+#define BG_KEY_PICTURE_OPACITY    "/picture_opacity"
+#define BG_KEY_PICTURE_FILENAME   "/picture_filename"
 
 typedef struct _SlideShow SlideShow;
 typedef struct _Slide Slide;
@@ -274,10 +275,48 @@ queue_changed (GnomeBG *bg)
 					  NULL);
 }
 
+static char *
+background_workspace_key (guint workspace_num, const char *property)
+{
+	return g_strdup_printf(GNOME_BG_KEY_DIR"/%i%s", workspace_num, property);
+}
+
+gboolean
+gnome_bg_can_set_filename (guint workspace_num, GConfClient *client)
+{
+	return gconf_client_key_is_writable (client, background_workspace_key (workspace_num, BG_KEY_PICTURE_FILENAME), NULL);
+}
+
+gboolean
+gnome_bg_can_set_placement (guint workspace_num, GConfClient *client)
+{
+	return gconf_client_key_is_writable (client, background_workspace_key (workspace_num, BG_KEY_PICTURE_PLACEMENT), NULL);
+}
+
+gboolean
+gnome_bg_can_set_shade_type (guint workspace_num, GConfClient *client)
+{
+	return gconf_client_key_is_writable (client, background_workspace_key (workspace_num, BG_KEY_COLOR_TYPE), NULL);
+}
+
+gboolean
+gnome_bg_can_set_color_p (guint workspace_num, GConfClient *client)
+{
+	return gconf_client_key_is_writable (client, background_workspace_key (workspace_num, BG_KEY_PRIMARY_COLOR), NULL);
+}
+
+gboolean
+gnome_bg_can_set_color_s (guint workspace_num, GConfClient *client)
+{
+	return gconf_client_key_is_writable (client, background_workspace_key (workspace_num, BG_KEY_SECONDARY_COLOR), NULL);
+}
+
 void
 gnome_bg_load_from_preferences (GnomeBG     *bg,
+				guint workspace_num,
 				GConfClient *client)
 {
+	char    *key;
 	char    *tmp;
 	char    *filename;
 	GnomeBGColorType ctype;
@@ -287,9 +326,15 @@ gnome_bg_load_from_preferences (GnomeBG     *bg,
 	g_return_if_fail (GNOME_IS_BG (bg));
 	g_return_if_fail (client != NULL);
 
+	key = background_workspace_key(workspace_num, "");
+	gconf_client_add_dir (client, key,
+			      GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
+	g_free (key);
+
 	/* Filename */
 	filename = NULL;
-	tmp = gconf_client_get_string (client, BG_KEY_PICTURE_FILENAME, NULL);
+	key = background_workspace_key (workspace_num, BG_KEY_PICTURE_FILENAME);
+	tmp = gconf_client_get_string (client, key, NULL);
 	if (tmp != NULL) {
 		if (g_utf8_validate (tmp, -1, NULL) &&
 		    g_file_test (tmp, G_FILE_TEST_EXISTS)) {
@@ -308,7 +353,7 @@ gnome_bg_load_from_preferences (GnomeBG     *bg,
 
 			default_value =
 				gconf_client_get_default_from_schema (client,
-								      BG_KEY_PICTURE_FILENAME,
+								      key,
 								      NULL);
 			if (default_value != NULL) {
 				filename = g_strdup (gconf_value_get_string (default_value));
@@ -317,25 +362,34 @@ gnome_bg_load_from_preferences (GnomeBG     *bg,
 		}
 	}
 	g_free (tmp);
+	g_free (key);
 
 	/* Colors */
-	tmp = gconf_client_get_string (client, BG_KEY_PRIMARY_COLOR, NULL);
+	key = background_workspace_key(workspace_num, BG_KEY_PRIMARY_COLOR);
+	tmp = gconf_client_get_string (client, key, NULL);
 	color_from_string (tmp, &c1);
 	g_free (tmp);
+	g_free (key);
 
-	tmp = gconf_client_get_string (client, BG_KEY_SECONDARY_COLOR, NULL);
+	key = background_workspace_key(workspace_num, BG_KEY_SECONDARY_COLOR);
+	tmp = gconf_client_get_string (client, key, NULL);
 	color_from_string (tmp, &c2);
 	g_free (tmp);
+	g_free (key);
 
 	/* Color type */
-	tmp = gconf_client_get_string (client, BG_KEY_COLOR_TYPE, NULL);
+	key = background_workspace_key(workspace_num, BG_KEY_COLOR_TYPE);
+	tmp = gconf_client_get_string (client, key, NULL);
 	color_type_from_string (tmp, &ctype);
 	g_free (tmp);
+	g_free (key);
 
 	/* Placement */
-	tmp = gconf_client_get_string (client, BG_KEY_PICTURE_PLACEMENT, NULL);
+	key = background_workspace_key(workspace_num, BG_KEY_PICTURE_PLACEMENT);
+	tmp = gconf_client_get_string (client, key, NULL);
 	placement_from_string (tmp, &placement);
 	g_free (tmp);
+	g_free (key);
 
 	gnome_bg_set_color (bg, ctype, &c1, &c2);
 	gnome_bg_set_placement (bg, placement);
@@ -344,21 +398,31 @@ gnome_bg_load_from_preferences (GnomeBG     *bg,
 
 void
 gnome_bg_save_to_preferences (GnomeBG     *bg,
+			      guint workspace_num,
 			      GConfClient *client)
 {
 	const char *color_type;
 	const char *placement;
-        const gchar *filename;
-        gchar *primary;
-        gchar *secondary;
-        
-	primary = color_to_string (&bg->primary);
-	secondary = color_to_string (&bg->secondary);
+	char *key;
+	const gchar *filename;
+	gchar *primary;
+	gchar *secondary;
+	GConfChangeSet *cs;
 
-	color_type = color_type_to_string (bg->color_type);
+	cs = gconf_change_set_new ();
 
         if (bg->filename) {
 		filename = bg->filename;
+
+		if (g_utf8_validate (bg->filename, -1, NULL))
+			filename = g_strdup (bg->filename);
+		else
+			filename = g_filename_to_utf8 (bg->filename, -1, NULL, NULL, NULL);
+
+		if (filename == NULL) {
+			g_warning ("Failed to convert filename to UTF-8: %s", bg->filename);
+		}
+
 		placement = placement_to_string (bg->placement);
         }
         else {
@@ -366,14 +430,45 @@ gnome_bg_save_to_preferences (GnomeBG     *bg,
                 placement = "none";
         }
 
-	gconf_client_set_string (client, BG_KEY_PICTURE_FILENAME, filename, NULL);
-        gconf_client_set_string (client, BG_KEY_PRIMARY_COLOR, primary, NULL);
-        gconf_client_set_string (client, BG_KEY_SECONDARY_COLOR, secondary, NULL);
-        gconf_client_set_string (client, BG_KEY_COLOR_TYPE, color_type, NULL);
-	gconf_client_set_string (client, BG_KEY_PICTURE_PLACEMENT, placement, NULL);
-
-	g_free (primary);
-	g_free (secondary);
+	if (gnome_bg_can_set_filename (workspace_num, client)) {
+		key = background_workspace_key (workspace_num,
+						BG_KEY_PICTURE_FILENAME);
+		gconf_change_set_set_string (cs, key, filename);
+		g_free (key);
+	}
+	if (gnome_bg_can_set_color_p (workspace_num, client)) {
+		primary = color_to_string (&bg->primary);
+		key = background_workspace_key (workspace_num,
+						BG_KEY_PRIMARY_COLOR);
+		gconf_change_set_set_string (cs, key, primary);
+		g_free (key);
+		g_free (primary);
+	}
+	if (gnome_bg_can_set_color_s (workspace_num, client)) {
+		secondary = color_to_string (&bg->secondary);
+		key = background_workspace_key (workspace_num,
+						BG_KEY_SECONDARY_COLOR);
+		gconf_change_set_set_string (cs, key, secondary);
+		g_free (key);
+		g_free (secondary);
+	}
+	if (gnome_bg_can_set_shade_type (workspace_num, client)) {
+		color_type = color_type_to_string (bg->color_type);
+		key = background_workspace_key (workspace_num,
+						BG_KEY_COLOR_TYPE);
+		gconf_change_set_set_string (cs, key, color_type);
+		g_free (key);
+	}
+	if (gnome_bg_can_set_placement (workspace_num, client)) {
+		key = background_workspace_key (workspace_num,
+						BG_KEY_PICTURE_PLACEMENT);
+		gconf_change_set_set_string (cs, key, placement);
+		g_free (key);
+	}
+
+	gconf_client_commit_change_set (client, cs, TRUE, NULL);
+
+	gconf_change_set_unref (cs);
 }
 
 
diff --git a/libgnome-desktop/libgnomeui/gnome-bg.h b/libgnome-desktop/libgnomeui/gnome-bg.h
index 2c28012..810443c 100644
--- a/libgnome-desktop/libgnomeui/gnome-bg.h
+++ b/libgnome-desktop/libgnomeui/gnome-bg.h
@@ -42,8 +42,6 @@ G_BEGIN_DECLS
 #define GNOME_IS_BG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  GNOME_TYPE_BG))
 #define GNOME_BG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  GNOME_TYPE_BG, GnomeBGClass))
 
-#define GNOME_BG_KEY_DIR "/desktop/gnome/background"
-
 typedef struct _GnomeBG GnomeBG;
 typedef struct _GnomeBGClass GnomeBGClass;
 
@@ -64,9 +62,24 @@ typedef enum {
 GType            gnome_bg_get_type              (void);
 GnomeBG *        gnome_bg_new                   (void);
 void             gnome_bg_load_from_preferences (GnomeBG               *bg,
+						 guint                 workspace_num,
 						 GConfClient           *client);
 void             gnome_bg_save_to_preferences   (GnomeBG               *bg,
+						 guint                 workspace_num,
+						 GConfClient           *client);
+
+/* Can set gconf? */
+gboolean         gnome_bg_can_set_filename      (guint                 workspace,
+						 GConfClient           *client);
+gboolean         gnome_bg_can_set_placement     (guint                 workspace,
 						 GConfClient           *client);
+gboolean         gnome_bg_can_set_shade_type    (guint                 workspace,
+						 GConfClient           *client);
+gboolean         gnome_bg_can_set_color_p       (guint                 workspace,
+						 GConfClient           *client);
+gboolean         gnome_bg_can_set_color_s       (guint                 workspace,
+						 GConfClient *client);
+
 /* Setters */
 void             gnome_bg_set_filename          (GnomeBG               *bg,
 						 const char            *filename);
