Index: accountsservice-0.6.35/data/org.freedesktop.Accounts.User.xml
===================================================================
--- accountsservice-0.6.35.orig/data/org.freedesktop.Accounts.User.xml	2013-11-13 15:16:55.696125419 +0100
+++ accountsservice-0.6.35/data/org.freedesktop.Accounts.User.xml	2013-11-13 15:16:55.684125418 +0100
@@ -331,6 +331,41 @@
     </doc:doc>
   </method>
 
+  <method name="SetBackgroundFile">
+    <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+    <arg name="filename" direction="in" type="s">
+      <doc:doc>
+        <doc:summary>
+          The absolute filename of a png file to use as the users background.
+        </doc:summary>
+      </doc:doc>
+    </arg>
+    <doc:doc>
+      <doc:description>
+        <doc:para>
+          Sets the users background.
+        </doc:para>
+      </doc:description>
+      <doc:permission>
+        The caller needs one of the following PolicyKit authorizations:
+        <doc:list>
+          <doc:item>
+            <doc:term>org.freedesktop.accounts.change-own-user-data</doc:term>
+            <doc:definition>To change his own background</doc:definition>
+          </doc:item>
+          <doc:item>
+            <doc:term>org.freedesktop.accounts.user-administration</doc:term>
+            <doc:definition>To change the background of another user</doc:definition>
+          </doc:item>
+        </doc:list>
+      </doc:permission>
+      <doc:errors>
+        <doc:error name="org.freedesktop.Accounts.Error.PermissionDenied">if the caller lacks the appropriate PolicyKit authorization</doc:error>
+        <doc:error name="org.freedesktop.Accounts.Error.Failed">if the operation failed</doc:error>
+      </doc:errors>
+    </doc:doc>
+  </method>
+
   <method name="SetIconFile">
     <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
     <arg name="filename" direction="in" type="s">
@@ -723,6 +758,16 @@
         </doc:para>
       </doc:description>
     </doc:doc>
+  </property>
+
+  <property name="BackgroundFile" type="s" access="read">
+    <doc:doc>
+      <doc:description>
+        <doc:para>
+           The filename of a png file containing the users background.
+        </doc:para>
+      </doc:description>
+    </doc:doc>
   </property>
 
   <property name="IconFile" type="s" access="read">
Index: accountsservice-0.6.35/src/libaccountsservice/act-user.c
===================================================================
--- accountsservice-0.6.35.orig/src/libaccountsservice/act-user.c	2013-11-13 15:16:55.696125419 +0100
+++ accountsservice-0.6.35/src/libaccountsservice/act-user.c	2013-11-13 15:16:55.688125418 +0100
@@ -91,6 +91,7 @@
         PROP_LOGIN_FREQUENCY,
         PROP_LOGIN_TIME,
         PROP_LOGIN_HISTORY,
+        PROP_BACKGROUND_FILE,
         PROP_ICON_FILE,
         PROP_LANGUAGE,
         PROP_FORMATS_LOCALE,
@@ -121,6 +122,7 @@
         char           *shell;
         char           *email;
         char           *location;
+        char           *background_file;
         char           *icon_file;
         char           *language;
         char           *formats_locale;
@@ -304,6 +306,9 @@
         case PROP_LOCATION:
                 g_value_set_string (value, user->location);
                 break;
+        case PROP_BACKGROUND_FILE:
+                g_value_set_string (value, user->background_file);
+                break;
         case PROP_ICON_FILE:
                 g_value_set_string (value, user->icon_file);
                 break;
@@ -455,6 +460,13 @@
                                                                NULL,
                                                                G_PARAM_READABLE));
         g_object_class_install_property (gobject_class,
+                                         PROP_BACKGROUND_FILE,
+                                         g_param_spec_string ("background-file",
+                                                              "Background File",
+                                                              "The path to a background for this user.",
+                                                              NULL,
+                                                              G_PARAM_READABLE));
+        g_object_class_install_property (gobject_class,
                                          PROP_ICON_FILE,
                                          g_param_spec_string ("icon-file",
                                                               "Icon File",
@@ -585,6 +597,7 @@
 
         g_free (user->user_name);
         g_free (user->real_name);
+        g_free (user->background_file);
         g_free (user->icon_file);
         g_free (user->language);
         g_free (user->object_path);
@@ -1033,6 +1046,22 @@
 }
 
 /**
+ * act_user_get_background_file:
+ * @user: a #ActUser
+ *
+ * Returns the path to the account background belonging to @user.
+ *
+ * Returns: (transfer none): a path to a background
+ */
+const char *
+act_user_get_background_file (ActUser *user)
+{
+        g_return_val_if_fail (ACT_IS_USER (user), NULL);
+
+        return user->background_file;
+}
+
+/**
  * act_user_get_icon_file:
  * @user: a #ActUser
  *
@@ -1290,6 +1319,15 @@
                         user->login_history = g_variant_ref (new_login_history);
                         g_object_notify (G_OBJECT (user), "login-history");
                 }
+        } else if (strcmp (key, "BackgroundFile") == 0) {
+                const char *new_background_file;
+
+                new_background_file = g_variant_get_string (value, NULL);
+                if (g_strcmp0 (user->background_file, new_background_file) != 0) {
+                        g_free (user->background_file);
+                        user->background_file = g_strdup (new_background_file);
+                        g_object_notify (G_OBJECT (user), "background-file");
+                }
         } else if (strcmp (key, "IconFile") == 0) {
                 const char *new_icon_file;
 
@@ -1760,6 +1798,35 @@
                 g_error_free (error);
                 return;
         }
+}
+
+/**
+ * act_user_set_background_file:
+ * @user: the user object to alter.
+ * @background_file: path to an background
+ *
+ * Assigns a new background for @user.
+ *
+ * Note this function is synchronous and ignores errors.
+ **/
+void
+act_user_set_background_file (ActUser    *user,
+                              const char *background_file)
+{
+        GError *error = NULL;
+
+        g_return_if_fail (ACT_IS_USER (user));
+        g_return_if_fail (background_file != NULL);
+        g_return_if_fail (ACCOUNTS_IS_USER (user->accounts_proxy));
+
+        if (!accounts_user_call_set_background_file_sync (user->accounts_proxy,
+                                                          background_file,
+                                                          NULL,
+                                                          &error)) {
+                g_warning ("SetBackgroundFile call failed: %s", error->message);
+                g_error_free (error);
+                return;
+        }
 }
 
 /**
Index: accountsservice-0.6.35/src/user.c
===================================================================
--- accountsservice-0.6.35.orig/src/user.c	2013-11-13 15:16:55.696125419 +0100
+++ accountsservice-0.6.35/src/user.c	2013-11-13 15:16:55.692125419 +0100
@@ -64,6 +64,7 @@
         PROP_LOGIN_FREQUENCY,
         PROP_LOGIN_TIME,
         PROP_LOGIN_HISTORY,
+        PROP_BACKGROUND_FILE,
         PROP_ICON_FILE,
         PROP_LOCKED,
         PROP_PASSWORD_MODE,
@@ -98,6 +99,7 @@
         gchar        *x_session;
         gchar        *location;
         guint64       login_frequency;
+        gchar        *background_file;
         gint64        login_time;
         GVariant     *login_history;
         gchar        *icon_file;
@@ -369,6 +371,13 @@
                 g_object_notify (G_OBJECT (user), "password-hint");
         }
 
+        s = g_key_file_get_string (keyfile, "User", "Background", NULL);
+        if (s != NULL) {
+                g_free (user->background_file);
+                user->background_file = s;
+                g_object_notify (G_OBJECT (user), "background-file");
+        }
+
         s = g_key_file_get_string (keyfile, "User", "Icon", NULL);
         if (s != NULL) {
                 g_free (user->icon_file);
@@ -436,6 +445,9 @@
         if (user->password_hint)
                 g_key_file_set_string (keyfile, "User", "PasswordHint", user->password_hint);
 
+        if (user->background_file)
+                g_key_file_set_string (keyfile, "User", "Background", user->background_file);
+
         if (user->icon_file)
                 g_key_file_set_string (keyfile, "User", "Icon", user->icon_file);
 
@@ -1788,6 +1800,86 @@
 }
 
 static void
+user_change_background_file_authorized_cb (Daemon                *daemon,
+                                           User                  *user,
+                                           GDBusMethodInvocation *context,
+                                           gpointer               data)
+{
+        gchar *filename;
+        GFile *file;
+        GFileInfo *info;
+        GFileType type;
+
+        filename = g_strdup (data);
+
+        if (filename == NULL ||
+            *filename == '\0') {
+                g_free (filename);
+                filename = NULL;
+
+                goto background_saved;
+        }
+
+        file = g_file_new_for_path (filename);
+        info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_TYPE,
+                                  0, NULL, NULL);
+        type = g_file_info_get_file_type (info);
+
+        g_object_unref (info);
+        g_object_unref (file);
+
+        if (type != G_FILE_TYPE_REGULAR) {
+                g_debug ("not a regular file\n");
+                throw_error (context, ERROR_FAILED, "file '%s' is not a regular file", filename);
+                g_free (filename);
+                return;
+        }
+
+background_saved:
+        g_free (user->background_file);
+        user->background_file = filename;
+
+        save_extra_data (user);
+
+        accounts_user_emit_changed (ACCOUNTS_USER (user));
+
+        g_object_notify (G_OBJECT (user), "background-file");
+
+        accounts_user_complete_set_background_file (ACCOUNTS_USER (user), context);
+}
+
+gboolean
+user_set_background_file (AccountsUser          *auser,
+                          GDBusMethodInvocation *context,
+                          const gchar           *filename)
+{
+        User *user = (User*)auser;
+        int uid;
+        const gchar *action_id;
+
+        if (!get_caller_uid (context, &uid)) {
+                throw_error (context, ERROR_FAILED, "identifying caller failed");
+                return FALSE;
+        }
+
+        if (user->uid == (uid_t) uid)
+                action_id = "org.freedesktop.accounts.change-own-user-data";
+        else
+                action_id = "org.freedesktop.accounts.user-administration";
+
+        daemon_local_check_auth (user->daemon,
+                                 user,
+                                 action_id,
+                                 TRUE,
+                                 user_change_background_file_authorized_cb,
+                                 context,
+                                 g_strdup (filename),
+                                 (GDestroyNotify)g_free);
+
+        return TRUE;
+}
+
+static void
 user_change_icon_file_authorized_cb (Daemon                *daemon,
                                      User                  *user,
                                      GDBusMethodInvocation *context,
@@ -2590,6 +2682,7 @@
         g_free (user->shell);
         g_free (user->icon_file);
         g_free (user->default_icon_file);
+        g_free (user->background_file);
         g_free (user->email);
         g_free (user->language);
         g_free (user->formats_locale);
@@ -2705,6 +2798,9 @@
         case PROP_LOCATION:
                 g_value_set_string (value, user->location);
                 break;
+        case PROP_BACKGROUND_FILE:
+                g_value_set_string (value, user->background_file);
+                break;
         case PROP_ICON_FILE:
                 if (user->icon_file)
                         g_value_set_string (value, user->icon_file);
@@ -2761,6 +2857,7 @@
 {
         iface->handle_set_account_type = user_set_account_type;
         iface->handle_set_automatic_login = user_set_automatic_login;
+        iface->handle_set_background_file = user_set_background_file;
         iface->handle_set_email = user_set_email;
         iface->handle_set_formats_locale = user_set_formats_locale;
         iface->handle_set_home_directory = user_set_home_directory;
@@ -2805,6 +2902,7 @@
         user->account_type = ACCOUNT_TYPE_STANDARD;
         user->home_dir = NULL;
         user->shell = NULL;
+        user->background_file = NULL;
         user->icon_file = NULL;
         user->default_icon_file = NULL;
         user->email = NULL;
