diff --git a/Tomboy.mdp b/Tomboy.mdp
index c753659..b30d2d0 100644
--- a/Tomboy.mdp
+++ b/Tomboy.mdp
@@ -221,5 +221,6 @@
     <ProjectReference type="Gac" localcopy="True" refto="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
     <ProjectReference type="Gac" localcopy="True" refto="NDesk.DBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f6716e4f9b2ed099" />
     <ProjectReference type="Gac" localcopy="True" refto="NDesk.DBus.GLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f6716e4f9b2ed099" />
+    <ProjectReference type="Gac" localcopy="True" refto="gnomedesktop-sharp, Version=2.20.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
   </References>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/Tomboy/GnomeApplication.cs b/Tomboy/GnomeApplication.cs
index 70efc6d..763c753 100644
--- a/Tomboy/GnomeApplication.cs
+++ b/Tomboy/GnomeApplication.cs
@@ -80,12 +80,62 @@ 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
+			Gnome.DesktopItem desktop_item = null;
+			string autostart_dir = Path.Combine (XdgBaseDirectorySpec.GetUserDirectory ("XDG_CONFIG_HOME", ".config"), "autostart");
+			string share_paths = XdgBaseDirectorySpec.GetUserDirectory ("XDG_DATA_DIRS", Path.Combine ("usr",Path.Combine ("local", "share")) + Path.PathSeparator + Path.Combine ("usr","share"));
+
+			// I feel like GnomeDesktopItem should search the paths for
+			// us using NewFromBasename, but it doesn't or
+			// gnome-desktop-sharp doesn't support NewFromBasename
+			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)) {
+					try {
+						desktop_item = Gnome.DesktopItem.NewFromFile (desktop_file, 0);
+					}
+					catch (GLib.GException e) {
+						Logger.Warn ("Could load desktop entry file {0}: {1}", desktop_file, e.Message);
+						return;
+					}
+					break;
+				}
+			}
+			
+			if (desktop_item == null) {
+				Logger.Warn ("Could not find desktop entry file in share path");
+				return;
+			}
+			
+			desktop_item.SetString ("Exec", "tomboy");
+			
+			if (!Directory.Exists (autostart_dir))
+				Directory.CreateDirectory (autostart_dir);
+			
+			// Drop the .desktop file in the autostart directory
+			try {
+				desktop_item.LocationFile = Path.Combine (autostart_dir, "tomboy.desktop");
+				if (!desktop_item.Save (null, false))
+					Logger.Warn ("Failed to save .desktop file to the autostart directory, it might already exist: {0}", autostart_dir);
+			}
+			catch (GLib.GException e) {
+				Logger.Warn ("Failed to save .desktop file in autostart directory: {0}", e.Message);
+			}
+		}
+		
+		private void RemoveAutostartDesktopItem ()
+		{
+			string autostart_file = Path.Combine (Path.Combine (XdgBaseDirectorySpec.GetUserDirectory ("XDG_CONFIG_HOME", ".config"), "autostart"), "tomboy.desktop");
+			Console.WriteLine (autostart_file);
+			if (File.Exists (autostart_file))
+				File.Delete (autostart_file);
 		}
 
 		public void RegisterSignalHandlers ()
@@ -106,6 +156,7 @@ namespace Tomboy
 
 		public void StartMainLoop ()
 		{
+			RegisterAutostartDesktopItem ();
 #if PANEL_APPLET
 			program.Run ();
 #else
@@ -135,6 +186,7 @@ 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?
diff --git a/configure.in b/configure.in
index 34961fe..e903e43 100644
--- a/configure.in
+++ b/configure.in
@@ -183,7 +183,7 @@ PKG_CHECK_MODULES(MONO_ADDINS, mono-addins >= 0.3 \
 	mono-addins-setup >= 0.3)
 
 #
-# Tomboy.exe needs Gtk# Gnome# GConf#
+# Tomboy.exe needs Gtk# Gnome# GConf# gnome-desktop#
 #
 GTKSHARP2_MINIMUM_VERSION=2.10.1
 GNOMESHARP_MINIMUM_VERSION=2.24
@@ -193,11 +193,13 @@ if test "x$ENABLE_GNOME" != "xno"; then
 				  gnome-sharp-2.0 >= $GNOMESHARP_MINIMUM_VERSION
 				  gconf-sharp-2.0
 				  gconf-sharp-peditors-2.0
-				  gnome-panel-sharp-2.24)
+				  gnome-panel-sharp-2.24
+				  gnome-desktop-sharp-2.0)
 	else
 		PKG_CHECK_MODULES(GNOME,
 				  gconf-sharp-2.0
-				  gconf-sharp-peditors-2.0)
+				  gconf-sharp-peditors-2.0
+				  gnome-desktop-sharp-2.0)
 	fi
 fi
 AC_SUBST(GNOME_LIBS)
