diff -rNu vino-2.13.5/capplet/vino-preferences.c vino-2.13.5.good/capplet/vino-preferences.c
--- vino-2.13.5/capplet/vino-preferences.c	2005-05-16 09:13:13.000000000 -0400
+++ vino-2.13.5.good/capplet/vino-preferences.c	2006-09-10 12:35:39.000000000 -0400
@@ -35,13 +35,14 @@
 
 #define VINO_PREFS_DIR                    "/desktop/gnome/remote_access"
 #define VINO_PREFS_ENABLED                VINO_PREFS_DIR "/enabled"
+#define VINO_PREFS_LOCALHOST              VINO_PREFS_DIR "/localhost"
 #define VINO_PREFS_PROMPT_ENABLED         VINO_PREFS_DIR "/prompt_enabled"
 #define VINO_PREFS_VIEW_ONLY              VINO_PREFS_DIR "/view_only"
 #define VINO_PREFS_AUTHENTICATION_METHODS VINO_PREFS_DIR "/authentication_methods"
 #define VINO_PREFS_VNC_PASSWORD           VINO_PREFS_DIR "/vnc_password"
 #define VINO_PREFS_MAILTO                 VINO_PREFS_DIR "/mailto"
 
-#define N_LISTENERS 6
+#define N_LISTENERS 7
 
 typedef struct {
   GladeXML    *xml;
@@ -55,6 +56,7 @@
   GtkWidget   *url_labels_box;
   GtkWidget   *url_label;
   GtkWidget   *allowed_toggle;
+  GtkWidget   *localhost_toggle;
   GtkWidget   *prompt_enabled_toggle;
   GtkWidget   *view_only_toggle;
   GtkWidget   *password_toggle;
@@ -241,6 +243,7 @@
 vino_preferences_dialog_update_for_allowed (VinoPreferencesDialog *dialog,
 					    gboolean               allowed)
 {
+  gtk_widget_set_sensitive (dialog->localhost_toggle, allowed);
   gtk_widget_set_sensitive (dialog->prompt_enabled_toggle, allowed);
   gtk_widget_set_sensitive (dialog->view_only_toggle,      allowed);
   gtk_widget_set_sensitive (dialog->url_labels_box,        allowed);
@@ -314,6 +317,64 @@
 }
 
 static void
+vino_preferences_dialog_localhost_toggled (GtkToggleButton       *toggle,
+						VinoPreferencesDialog *dialog)
+{
+  gconf_client_set_bool (dialog->client,
+			 VINO_PREFS_LOCALHOST,
+			 gtk_toggle_button_get_active (toggle),
+			 NULL);
+}
+
+static void
+vino_preferences_dialog_localhost_notify (GConfClient           *client,
+					       guint                  cnx_id,
+					       GConfEntry            *entry,
+					       VinoPreferencesDialog *dialog)
+{
+  gboolean localhost;
+
+  if (!entry->value || entry->value->type != GCONF_VALUE_BOOL)
+    return;
+
+  localhost = gconf_value_get_bool (entry->value) != FALSE;
+
+  if (localhost != gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->localhost_toggle)))
+    {
+      gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->localhost_toggle), localhost);
+    }
+}
+
+static void
+vino_preferences_dialog_setup_localhost_toggle (VinoPreferencesDialog *dialog)
+{
+  gboolean localhost;
+
+  dialog->localhost_toggle = glade_xml_get_widget (dialog->xml, "localhost_toggle");
+  g_assert (dialog->localhost_toggle != NULL);
+
+  localhost = gconf_client_get_bool (dialog->client, VINO_PREFS_LOCALHOST, NULL);
+
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->localhost_toggle), localhost);
+
+  g_signal_connect (dialog->localhost_toggle, "toggled",
+		    G_CALLBACK (vino_preferences_dialog_localhost_toggled), dialog);
+
+  if (!gconf_client_key_is_writable (dialog->client, VINO_PREFS_LOCALHOST, NULL))
+    {
+      gtk_widget_set_sensitive (dialog->localhost_toggle, FALSE);
+      gtk_widget_show (dialog->writability_warning);
+    }
+
+  dialog->listeners [dialog->n_listeners] = 
+    gconf_client_notify_add (dialog->client,
+			     VINO_PREFS_LOCALHOST,
+			     (GConfClientNotifyFunc) vino_preferences_dialog_localhost_notify,
+			     dialog, NULL, NULL);
+  dialog->n_listeners++;
+}
+
+static void
 vino_preferences_dialog_prompt_enabled_toggled (GtkToggleButton       *toggle,
 						VinoPreferencesDialog *dialog)
 {
@@ -904,6 +965,7 @@
 
   allowed = vino_preferences_dialog_setup_allowed_toggle (dialog);
 
+  vino_preferences_dialog_setup_localhost_toggle (dialog);
   vino_preferences_dialog_setup_prompt_enabled_toggle (dialog);
   vino_preferences_dialog_setup_view_only_toggle      (dialog);
   vino_preferences_dialog_setup_password_toggle       (dialog);
diff -rNu vino-2.13.5/capplet/vino-preferences.desktop.in vino-2.13.5.good/capplet/vino-preferences.desktop.in
--- vino-2.13.5/capplet/vino-preferences.desktop.in	2006-01-15 14:43:59.000000000 -0500
+++ vino-2.13.5.good/capplet/vino-preferences.desktop.in	1969-12-31 19:00:00.000000000 -0500
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=Remote Desktop
-_Comment=Set your remote desktop access preferences
-Exec=vino-preferences
-Icon=gnome-remote-desktop.png
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=GNOME;Application;Settings;
-OnlyShowIn=GNOME;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=vino
-X-GNOME-Bugzilla-Component=Preferences Dialog
-X-GNOME-Bugzilla-Version=2.13.5
diff -rNu vino-2.13.5/capplet/vino-preferences.glade vino-2.13.5.good/capplet/vino-preferences.glade
--- vino-2.13.5/capplet/vino-preferences.glade	2004-07-20 16:03:20.000000000 -0400
+++ vino-2.13.5.good/capplet/vino-preferences.glade	2006-09-10 12:36:05.000000000 -0400
@@ -11,6 +11,13 @@
   <property name="modal">False</property>
   <property name="resizable">False</property>
   <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
   <property name="has_separator">False</property>
 
   <child internal-child="vbox">
@@ -32,6 +39,7 @@
 	      <property name="label">gtk-help</property>
 	      <property name="use_stock">True</property>
 	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
 	      <property name="response_id">-11</property>
 	    </widget>
 	  </child>
@@ -46,6 +54,7 @@
 	      <property name="label">gtk-close</property>
 	      <property name="use_stock">True</property>
 	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
 	      <property name="response_id">-7</property>
 	    </widget>
 	  </child>
@@ -84,6 +93,10 @@
 		  <property name="yalign">0.5</property>
 		  <property name="xpad">0</property>
 		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
 		</widget>
 		<packing>
 		  <property name="padding">0</property>
@@ -155,6 +168,10 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
+			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			      <property name="width_chars">-1</property>
+			      <property name="single_line_mode">False</property>
+			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="padding">0</property>
@@ -177,6 +194,7 @@
 			  <property name="label" translatable="yes">Allow other users to _view your desktop</property>
 			  <property name="use_underline">True</property>
 			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
 			  <property name="active">False</property>
 			  <property name="inconsistent">False</property>
 			  <property name="draw_indicator">True</property>
@@ -207,6 +225,10 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
+			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			      <property name="width_chars">-1</property>
+			      <property name="single_line_mode">False</property>
+			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="padding">0</property>
@@ -222,6 +244,7 @@
 			      <property name="label" translatable="yes">_Allow other users to control your desktop</property>
 			      <property name="use_underline">True</property>
 			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
 			      <property name="active">False</property>
 			      <property name="inconsistent">False</property>
 			      <property name="draw_indicator">True</property>
@@ -259,6 +282,10 @@
 			      <property name="yalign">0</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
+			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			      <property name="width_chars">-1</property>
+			      <property name="single_line_mode">False</property>
+			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="padding">0</property>
@@ -314,6 +341,10 @@
 		  <property name="yalign">0.5</property>
 		  <property name="xpad">0</property>
 		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
 		</widget>
 		<packing>
 		  <property name="padding">0</property>
@@ -362,6 +393,67 @@
 			  <property name="yalign">0.5</property>
 			  <property name="xpad">0</property>
 			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox40">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label66">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">    </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			      <property name="width_chars">-1</property>
+			      <property name="single_line_mode">False</property>
+			      <property name="angle">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="localhost_toggle">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">_Bind to LOCALHOST only</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
@@ -389,6 +481,10 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
+			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			      <property name="width_chars">-1</property>
+			      <property name="single_line_mode">False</property>
+			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="padding">0</property>
@@ -404,6 +500,7 @@
 			      <property name="label" translatable="yes">A_sk you for confirmation</property>
 			      <property name="use_underline">True</property>
 			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
 			      <property name="active">False</property>
 			      <property name="inconsistent">False</property>
 			      <property name="draw_indicator">True</property>
@@ -417,8 +514,8 @@
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
 			</packing>
 		      </child>
 
@@ -441,6 +538,10 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
+			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			      <property name="width_chars">-1</property>
+			      <property name="single_line_mode">False</property>
+			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="padding">0</property>
@@ -456,6 +557,7 @@
 			      <property name="label" translatable="yes">_Require the user to enter this password:</property>
 			      <property name="use_underline">True</property>
 			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
 			      <property name="active">False</property>
 			      <property name="inconsistent">False</property>
 			      <property name="draw_indicator">True</property>
@@ -469,8 +571,8 @@
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
 			</packing>
 		      </child>
 
@@ -493,6 +595,10 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
+			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			      <property name="width_chars">-1</property>
+			      <property name="single_line_mode">False</property>
+			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="padding">0</property>
@@ -515,6 +621,10 @@
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
 			      <property name="mnemonic_widget">password_entry</property>
+			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			      <property name="width_chars">-1</property>
+			      <property name="single_line_mode">False</property>
+			      <property name="angle">0</property>
 			    </widget>
 			    <packing>
 			      <property name="padding">0</property>
@@ -532,7 +642,7 @@
 			      <property name="max_length">8</property>
 			      <property name="text" translatable="yes"></property>
 			      <property name="has_frame">True</property>
-			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="invisible_char">*</property>
 			      <property name="activates_default">False</property>
 			    </widget>
 			    <packing>
diff -rNu vino-2.13.5/server/libvncserver/sockets.c vino-2.13.5.good/server/libvncserver/sockets.c
--- vino-2.13.5/server/libvncserver/sockets.c	2004-07-12 08:17:52.000000000 -0400
+++ vino-2.13.5.good/server/libvncserver/sockets.c	2006-09-10 12:51:17.000000000 -0400
@@ -536,6 +536,8 @@
     return 1;
 }
 
+int vino_get_localhost();
+
 int
 ListenOnTCPPort(port)
     int port;
@@ -548,7 +550,11 @@
     addr.sin_family = AF_INET;
     addr.sin_port = htons(port);
     /* addr.sin_addr.s_addr = interface.s_addr; */
-    addr.sin_addr.s_addr = INADDR_ANY;
+    if (vino_get_localhost()) {
+	addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+    } else {
+        addr.sin_addr.s_addr = htonl(INADDR_ANY);
+    }
 
     if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
 	return -1;
diff -rNu vino-2.13.5/server/vino-prefs.c vino-2.13.5.good/server/vino-prefs.c
--- vino-2.13.5/server/vino-prefs.c	2004-02-05 03:54:59.000000000 -0500
+++ vino-2.13.5.good/server/vino-prefs.c	2006-09-10 12:38:05.000000000 -0400
@@ -30,6 +30,7 @@
 
 #define VINO_PREFS_DIR                    "/desktop/gnome/remote_access"
 #define VINO_PREFS_ENABLED                VINO_PREFS_DIR "/enabled"
+#define VINO_PREFS_LOCALHOST	          VINO_PREFS_DIR "/localhost"
 #define VINO_PREFS_PROMPT_ENABLED         VINO_PREFS_DIR "/prompt_enabled"
 #define VINO_PREFS_VIEW_ONLY              VINO_PREFS_DIR "/view_only"
 #define VINO_PREFS_REQUIRE_ENCRYPTION     VINO_PREFS_DIR "/require_encryption"
@@ -251,6 +252,13 @@
   vino_servers = g_slist_prepend (vino_servers, server);
 }
 
+int vino_get_localhost()
+{
+	return gconf_client_get_bool (vino_client,
+                                      VINO_PREFS_LOCALHOST,
+                                      NULL);	
+}
+
 void
 vino_prefs_init (gboolean view_only)
 {
diff -rNu vino-2.13.5/server/vino-server.c vino-2.13.5.good/server/vino-server.c
--- vino-2.13.5/server/vino-server.c	2006-01-15 14:32:29.000000000 -0500
+++ vino-2.13.5.good/server/vino-server.c	2006-09-10 12:53:20.000000000 -0400
@@ -64,6 +64,7 @@
 #endif
 
   guint             on_hold : 1;
+  guint             localhost : 1;
   guint             prompt_enabled : 1;
   guint             view_only : 1;
   guint             require_encryption : 1;
@@ -88,6 +89,7 @@
   PROP_0,
   PROP_SCREEN,
   PROP_ON_HOLD,
+  PROP_LOCALHOST,
   PROP_PROMPT_ENABLED,
   PROP_VIEW_ONLY,
   PROP_REQUIRE_ENCRYPTION,
@@ -772,6 +774,9 @@
     case PROP_ON_HOLD:
       vino_server_set_on_hold (server, g_value_get_boolean (value));
       break;
+    case PROP_LOCALHOST:
+      vino_server_set_localhost (server, g_value_get_boolean (value));
+      break;
     case PROP_PROMPT_ENABLED:
       vino_server_set_prompt_enabled (server, g_value_get_boolean (value));
       break;
@@ -809,6 +814,9 @@
     case PROP_ON_HOLD:
       g_value_set_boolean (value, server->priv->on_hold);
       break;
+    case PROP_LOCALHOST:
+      g_value_set_boolean (value, server->priv->localhost);
+      break;
     case PROP_PROMPT_ENABLED:
       g_value_set_boolean (value, server->priv->prompt_enabled);
       break;
@@ -864,6 +872,14 @@
 							 G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
 
   g_object_class_install_property (gobject_class,
+				   PROP_LOCALHOST,
+				   g_param_spec_boolean ("localhost",
+							 _("Localhost Only"),
+							 _("Only allow localhost connections to vino"),
+							 TRUE,
+							 G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
+  g_object_class_install_property (gobject_class,
 				   PROP_PROMPT_ENABLED,
 				   g_param_spec_boolean ("prompt-enabled",
 							 _("Prompt enabled"),
@@ -1021,6 +1037,30 @@
 }
 
 gboolean
+vino_server_get_localhost (VinoServer *server)
+{
+  g_return_val_if_fail (VINO_IS_SERVER (server), FALSE);
+
+  return server->priv->localhost;
+}
+
+void
+vino_server_set_localhost (VinoServer *server,
+				gboolean    localhost)
+{
+  g_return_if_fail (VINO_IS_SERVER (server));
+
+  localhost = localhost != FALSE;
+
+  if (server->priv->localhost != localhost)
+    {
+      server->priv->localhost = localhost;
+
+      g_object_notify (G_OBJECT (server), "localhost");
+    }
+}
+
+gboolean
 vino_server_get_prompt_enabled (VinoServer *server)
 {
   g_return_val_if_fail (VINO_IS_SERVER (server), FALSE);
diff -rNu vino-2.13.5/server/vino-server.schemas.in vino-2.13.5.good/server/vino-server.schemas.in
--- vino-2.13.5/server/vino-server.schemas.in	2005-05-19 10:47:32.000000000 -0400
+++ vino-2.13.5.good/server/vino-server.schemas.in	2006-09-10 12:36:39.000000000 -0400
@@ -18,6 +18,23 @@
     </schema>
 
     <schema>
+      <key>/schemas/desktop/gnome/remote_access/localhost</key>
+      <applyto>/desktop/gnome/remote_access/localhost</applyto>
+      <owner>gnome</owner>
+      <type>bool</type>
+      <default>true</default>
+      <locale name="C">
+         <short>Only listen on the localhost port</short>
+         <long>
+           If true, remote users will only be able to access the
+           remote server from the local machine.  They will need
+  	   to provide some tunneling mechanism to enable them to
+           access the server from remote machines, such as ssh.	
+         </long>
+      </locale>
+    </schema>
+
+    <schema>
       <key>/schemas/desktop/gnome/remote_access/prompt_enabled</key>
       <applyto>/desktop/gnome/remote_access/prompt_enabled</applyto>
       <owner>gnome</owner>
