try {
uint32 res;
+ // Start service first
this.dbus_obj.StartServiceByName (RYGEL_SERVICE,
(uint32) 0,
out res);
+ // Then copy the desktop file to user's autostart dir
+ var source_path = Path.build_filename (
+ BuildConfig.DESKTOP_DIR,
+ "rygel.desktop");
+ var dest_path = Path.build_filename (
+ Environment.get_user_config_dir (),
+ "autostart",
+ "rygel.desktop");
+ var source = File.new_for_path (source_path);
+ var dest = File.new_for_path (dest_path);
+
+ source.copy (dest, FileCopyFlags.OVERWRITE, null, null);
+
this.set_bool ("general", ENABLED_KEY, value);
} catch (DBus.Error err) {
warning ("Failed to start Rygel service: %s\n",