+static GKeyFile *get_key_file(const char *path)
+{
+ GKeyFile *kfile;
+ int ret;
+
+ kfile = g_key_file_new();
+ ret = g_key_file_load_from_file(kfile,
+ path,
+ G_KEY_FILE_KEEP_COMMENTS
+ | G_KEY_FILE_KEEP_TRANSLATIONS,
+ NULL);
+
+ if (ret) {
+ return kfile;
+ } else {
+ log_err("Failed to parse: %s", path);
+
+ g_key_file_free(kfile);
+ return NULL;
+ }
+}
+
+static int is_user_desktop_autostarted(GKeyFile *f)
+{
+ return (!g_key_file_has_key(f,
+ G_KEY_FILE_DESKTOP_GROUP,
+ KEY_GNOME_AUTOSTART,
+ NULL))
+ || g_key_file_get_boolean(f,
+ G_KEY_FILE_DESKTOP_GROUP,
+ KEY_GNOME_AUTOSTART,
+ NULL);
+}
+
+int pxdg_is_autostarted()