diff --git a/Tomboy/GnomeApplication.cs b/Tomboy/GnomeApplication.cs
index 70efc6d..d84719f 100644
--- a/Tomboy/GnomeApplication.cs
+++ b/Tomboy/GnomeApplication.cs
@@ -22,6 +22,7 @@ namespace Tomboy
 		private static string confDir;
 		private static string dataDir;
 		private static string cacheDir;
+		private static string autostart_dir;
 		private static ObjectPath session_client_id;
 		private const string tomboyDirName = "tomboy";
 
@@ -41,6 +42,8 @@ namespace Tomboy
 			//       (non-existence is an indicator that migration is needed)
 			if (!Directory.Exists (cacheDir))
 				Directory.CreateDirectory (cacheDir);
+			
+			autostart_dir = Path.Combine (XdgBaseDirectorySpec.GetUserDirectory ("XDG_CONFIG_HOME", ".config"), "autostart");
 		}
 
 		public void Initialize (string locale_dir,
@@ -80,12 +83,65 @@ namespace Tomboy
 #endif
 		}
 
-		public void RegisterSessionManagerRestart (string executable_path,
-		                string[] args,
-		                string[] environment)
+		/*
+		 * This function places the tomboy desktop item in the
+		 * autostart directory. It is only needed when not runnning as
+		 * a panel object.
+		 */
+		private void RegisterAutostartDesktopItem ()
 		{
-			// Nothing to do, we dropped the .desktop file in the autostart
-			// folder which should be enough to handle this in Gnome
+			string autostart_file = Path.Combine (autostart_dir, "tomboy.desktop");
+			
+			if (File.Exists (autostart_file))
+				return;
+			
+			FileInfo desktop_item = null;
+			string share_paths = XdgBaseDirectorySpec.GetUserDirectory ("XDG_DATA_DIRS",
+			                                                            String.Concat (Path.Combine ("/usr",Path.Combine ("local", "share")),
+			                                                                           Path.PathSeparator,
+			                                                                           Path.Combine ("/usr","share")));
+
+			string[] share_dirs = share_paths.Split (Path.PathSeparator);
+			foreach (string share_dir in share_dirs) {
+				string desktop_file = Path.Combine (share_dir, Path.Combine ("applications", "tomboy.desktop"));
+				if (File.Exists (desktop_file)) {
+					desktop_item = new FileInfo (desktop_file);
+					break;
+				}
+			}
+			
+			if (desktop_item == null) {
+				Logger.Warn ("Could not find desktop entry file in share path");
+				return;
+			}
+			
+			if (!Directory.Exists (autostart_dir))
+				Directory.CreateDirectory (autostart_dir);
+			
+			StreamReader reader = desktop_item.OpenText ();
+			StreamWriter writer = File.CreateText (autostart_file);
+			try {
+				while (!reader.EndOfStream) {
+					string line = reader.ReadLine ();
+					if (!line.StartsWith ("Exec"))
+						writer.WriteLine (line);
+				}
+				writer.WriteLine ("Exec=tomboy");
+			} catch (IOException e) {
+				Logger.Warn ("Could not write desktop autostart file: {0}", e.Message);
+				if (File.Exists (autostart_file))
+					File.Delete (autostart_file);
+			} finally {
+				reader.Dispose ();
+				writer.Dispose ();
+			}
+		}
+		
+		private void RemoveAutostartDesktopItem ()
+		{
+			string autostart_file = Path.Combine (autostart_dir, "tomboy.desktop");
+			if (File.Exists (autostart_file))
+				File.Delete (autostart_file);
 		}
 
 		public void RegisterSignalHandlers ()
@@ -106,6 +162,7 @@ namespace Tomboy
 
 		public void StartMainLoop ()
 		{
+			RegisterAutostartDesktopItem ();
 #if PANEL_APPLET
 			program.Run ();
 #else
@@ -135,6 +192,8 @@ namespace Tomboy
 
 		private void OnExitSignal (int signal)
 		{
+			RemoveAutostartDesktopItem ();
+			
 			if (ExitingEvent != null)
 				ExitingEvent (null, new EventArgs ());
 
diff --git a/Tomboy/MacApplication.cs b/Tomboy/MacApplication.cs
index e33e611..4b20605 100644
--- a/Tomboy/MacApplication.cs
+++ b/Tomboy/MacApplication.cs
@@ -186,11 +186,6 @@ namespace Tomboy
 			Gtk.Application.Init ();
 		}
 
-		public virtual void RegisterSessionManagerRestart (string executable_path, string[] args, string[] environment)
-		{
-			// Do nothing
-		}
-
 		public virtual void RegisterSignalHandlers ()
 		{
 			// Nothing yet, but need to register for native exit signals?
diff --git a/Tomboy/NativeApplication.cs b/Tomboy/NativeApplication.cs
index acfc5d5..3537715 100644
--- a/Tomboy/NativeApplication.cs
+++ b/Tomboy/NativeApplication.cs
@@ -9,9 +9,6 @@ namespace Tomboy
 		                 string process_name,
 		                 string [] args);
 
-		void RegisterSessionManagerRestart (string executable_path,
-		                                    string[] args,
-		                                    string[] environment);
 		void RegisterSignalHandlers ();
 		event EventHandler ExitingEvent;
 
diff --git a/Tomboy/Tomboy.cs b/Tomboy/Tomboy.cs
index 500c091..864363c 100644
--- a/Tomboy/Tomboy.cs
+++ b/Tomboy/Tomboy.cs
@@ -147,10 +147,6 @@ namespace Tomboy
 				Exit (0);
 			}
 #endif
-			RegisterSessionManagerRestart (
-			        Environment.GetEnvironmentVariable ("TOMBOY_WRAPPER_PATH"),
-			        args,
-			        new string [] { "TOMBOY_PATH=" + note_path  }); // TODO: Pass along XDG_*?
 			StartTrayIcon ();
 
 			Logger.Log ("All done.  Ciao!");
diff --git a/Tomboy/Utils.cs b/Tomboy/Utils.cs
index 52a9c6d..86b1054 100644
--- a/Tomboy/Utils.cs
+++ b/Tomboy/Utils.cs
@@ -950,13 +950,6 @@ namespace Tomboy
 			native_app.RegisterSignalHandlers ();
 		}
 
-		public static void RegisterSessionManagerRestart (string executable_path,
-		                string[] args,
-		                string[] environment)
-		{
-			native_app.RegisterSessionManagerRestart (executable_path, args, environment);
-		}
-
 		public static event EventHandler ExitingEvent
 		{
 		        add { native_app.ExitingEvent += value; }
diff --git a/Tomboy/WindowsApplication.cs b/Tomboy/WindowsApplication.cs
index 620a143..096b268 100644
--- a/Tomboy/WindowsApplication.cs
+++ b/Tomboy/WindowsApplication.cs
@@ -64,11 +64,6 @@ namespace Tomboy
 			Gtk.Application.Init ();
 		}
 		
-		public virtual void RegisterSessionManagerRestart (string executable_path, string[] args, string[] environment)
-		{
-			// Do nothing
-		}
-		
 		public virtual void RegisterSignalHandlers ()
 		{
 			// Nothing yet, but need to register for native exit signals?
