diff --git a/server/vino-mdns.c b/server/vino-mdns.c
index 4f7e693..eba13e7 100644
--- a/server/vino-mdns.c
+++ b/server/vino-mdns.c
@@ -89,9 +89,12 @@ vino_mdns_make_alternative_service_name (void)
 
   g_assert (mdns_service_name != NULL);
 
-  alternative_name = avahi_alternative_service_name (mdns_service_name);
-  g_free (mdns_service_name);
-  mdns_service_name = alternative_name;
+  if (mdns_service_name == NULL)
+    {
+      alternative_name = avahi_alternative_service_name (mdns_service_name);
+      g_free (mdns_service_name);
+      mdns_service_name = alternative_name;
+    }
 }
 
 static void 
@@ -140,9 +143,9 @@ vino_mdns_add_service_foreach (char            *type,
   if (iface_name && iface_name[0])
     {
       if (if_nametoindex (iface_name) == 0)
-	iface = AVAHI_IF_UNSPEC;
+	      iface = AVAHI_IF_UNSPEC;
       else
-	iface = if_nametoindex (iface_name);
+        iface = if_nametoindex (iface_name);
     }
   else
     iface = AVAHI_IF_UNSPEC;
@@ -182,10 +185,10 @@ vino_mdns_add_services (AvahiClient *client)
                                client);
       if (mdns_entry_group == NULL)
         {
-	  dprintf (MDNS, "Avahi: avahi_entry_group_new () failed: %s\n",
+          dprintf (MDNS, "Avahi: avahi_entry_group_new () failed: %s\n",
                    avahi_strerror (avahi_client_errno (client)));
-	  return;
-	}
+          return;
+        }
     }
 
   dprintf (MDNS, "Avahi: Adding service '%s'\n",
@@ -233,22 +236,22 @@ vino_mdns_client_state_changed (AvahiClient      *client,
 
     case AVAHI_CLIENT_S_COLLISION:
       if (mdns_entry_group != NULL)
-	avahi_entry_group_reset (mdns_entry_group);
+        avahi_entry_group_reset (mdns_entry_group);
       break;
 
     case AVAHI_CLIENT_FAILURE:
       if (avahi_client_errno(client) == AVAHI_ERR_DISCONNECTED)
-	{
-	  dprintf (MDNS, "Connection with Avahi daemon terminated, trying to reconnect.\n");
-	  vino_mdns_restart ();
-	}
+        {
+          dprintf (MDNS, "Connection with Avahi daemon terminated, trying to reconnect.\n");
+          vino_mdns_restart ();
+        }
       else
-	{
-	  dprintf (MDNS, "Client failure, exiting: %s\n",
+        {
+          dprintf (MDNS, "Client failure, exiting: %s\n",
 	                  avahi_strerror (
 	                      avahi_client_errno (client)));
-	  vino_mdns_stop ();
-	}
+          vino_mdns_stop ();
+        }
       break;
 
     case AVAHI_CLIENT_CONNECTING:
diff --git a/server/vino-prefs.c b/server/vino-prefs.c
index fb9645b..8156c0b 100644
--- a/server/vino-prefs.c
+++ b/server/vino-prefs.c
@@ -50,8 +50,10 @@
 #define VINO_PREFS_DISABLE_BACKGROUND     VINO_PREFS_DIR "/disable_background"
 #define VINO_PREFS_USE_UPNP               VINO_PREFS_DIR "/use_upnp"
 #define VINO_PREFS_DISABLE_XDAMAGE        VINO_PREFS_DIR "/disable_xdamage"
+#define VINO_PREFS_ZEROCONF_ENABLED       VINO_PREFS_DIR "/zeroconf_enabled"
+#define VINO_PREFS_ZEROCONF_NAME          VINO_PREFS_DIR "/zeroconf_name"
 
-#define VINO_N_LISTENERS                  14
+#define VINO_N_LISTENERS                  16
 
 #define VINO_PREFS_LOCKFILE               "vino-server.lock"
 
@@ -72,8 +74,38 @@ static gboolean        vino_lock_screen          = FALSE;
 static gboolean        vino_disable_background   = FALSE;
 static gboolean        vino_use_upnp             = TRUE;
 static gboolean        vino_disable_xdamage      = FALSE;
+static gboolean        vino_zeroconf_enabled     = TRUE;
+static char           *vino_zeroconf_name        = NULL;
 static VinoStatusIconVisibility vino_icon_visibility = VINO_STATUS_ICON_VISIBILITY_CLIENT;
 
+// Set zeroconf name directly into vino-mdsn.c
+
+extern char *mdns_service_name;
+
+static void
+vino_prefs_start_mdns (VinoServer *server)
+{
+  if (vino_enabled && vino_zeroconf_enabled)
+    {
+      if (vino_zeroconf_name)
+	{
+	  if (mdns_service_name)
+	    g_free (mdns_service_name);
+	  mdns_service_name = g_strdup (vino_zeroconf_name);
+	}
+
+      vino_mdns_add_service ("_rfb._tcp", vino_server_get_port (server));
+      vino_mdns_start (vino_network_interface);
+    }
+}
+
+static void
+vino_prefs_restart_mdns (VinoServer *server, gpointer data)
+{
+  vino_mdns_stop ();
+  vino_prefs_start_mdns(server);
+}
+
 static void
 vino_prefs_enabled_changed (GConfClient *client,
 			    guint        cnxn_id,
@@ -94,13 +126,13 @@ vino_prefs_enabled_changed (GConfClient *client,
   
   dprintf (PREFS, "Access enabled changed: %s\n", vino_enabled ? "(true)" : "(false)");
 
-  if (vino_enabled)
-    vino_mdns_start (vino_network_interface);
-  else
-    vino_mdns_stop ();
+  vino_mdns_stop ();
 
   for (l = vino_servers; l; l = l->next)
+  {
+    vino_prefs_start_mdns(l->data);
     vino_server_set_on_hold (l->data, !enabled);
+  }
 }
 
 static void
@@ -295,14 +327,6 @@ vino_prefs_vnc_password_changed (GConfClient *client,
 }
 
 static void
-vino_prefs_restart_mdns (VinoServer *server, gpointer data)
-{
-  vino_mdns_stop ();
-  vino_mdns_add_service ("_rfb._tcp", vino_server_get_port (server));
-  vino_mdns_start (vino_network_interface);
-}
-
-static void
 vino_prefs_use_alternative_port_changed (GConfClient *client,
                                          guint        cnxn_id,
                                          GConfEntry  *entry)
@@ -493,6 +517,61 @@ vino_prefs_disable_xdamage_changed (GConfClient *client,
     vino_server_set_disable_xdamage (l->data, disable_xdamage);
 }
 
+static void
+vino_prefs_zeroconf_enabled_changed (GConfClient *client,
+				     guint        cnxn_id,
+				     GConfEntry  *entry)
+{
+  gboolean  zeroconf_enabled;
+  GSList   *l;
+
+  if (!entry->value || entry->value->type != GCONF_VALUE_BOOL)
+    return;
+  
+  zeroconf_enabled = gconf_value_get_bool (entry->value) != FALSE;
+
+  if (vino_zeroconf_enabled == zeroconf_enabled)
+    return;
+
+  vino_zeroconf_enabled = zeroconf_enabled;
+
+  dprintf (PREFS, "Zeroconf enabled changed: %s\n", zeroconf_enabled ? "(true)" : "(false)");
+  
+  for (l = vino_servers; l; l = l->next)
+    vino_server_set_zeroconf_enabled (l->data, zeroconf_enabled);
+}
+
+static void
+vino_prefs_zeroconf_name_changed (GConfClient *client,
+				  guint        cnxn_id,
+				  GConfEntry  *entry)
+{
+  const char *zeroconf_name;
+  GSList     *l;
+
+  if (!entry->value || entry->value->type != GCONF_VALUE_STRING)
+    return;
+  
+  zeroconf_name = gconf_value_get_string (entry->value);
+
+  if (!zeroconf_name && !vino_zeroconf_name)
+    return;
+
+  if (zeroconf_name && vino_zeroconf_name &&
+      !strcmp (zeroconf_name, vino_zeroconf_name))
+    return;
+
+  if (vino_zeroconf_name)
+    g_free (vino_zeroconf_name);
+  vino_zeroconf_name = g_strdup (zeroconf_name);
+
+  dprintf (PREFS, "Zeroconf name changed: %s\n",
+	   vino_zeroconf_name ? vino_zeroconf_name : "(null)");
+
+  for (l = vino_servers; l; l = l->next)
+    vino_server_set_zeroconf_name (l->data, zeroconf_name);
+}
+
 void
 vino_prefs_create_server (GdkScreen *screen)
 {
@@ -515,15 +594,18 @@ vino_prefs_create_server (GdkScreen *screen)
 			 "disable-background",   vino_disable_background,
 			 "use-upnp",             vino_use_upnp,
 			 "disable-xdamage",      vino_disable_xdamage,
+			 "zeroconf-enabled",     vino_zeroconf_enabled,
+			 "zeroconf-name",        vino_zeroconf_name,
 			 NULL);
 
   vino_servers = g_slist_prepend (vino_servers, server);
-  if (vino_enabled)
-    vino_mdns_start (vino_network_interface);
+  vino_prefs_start_mdns (server);
 
   g_signal_connect (server, "notify::alternative-port", G_CALLBACK (vino_prefs_restart_mdns), NULL);
   g_signal_connect (server, "notify::use-alternative-port", G_CALLBACK(vino_prefs_restart_mdns), NULL);
   g_signal_connect (server, "notify::network-interface", G_CALLBACK (vino_prefs_restart_mdns), NULL);
+  g_signal_connect (server, "notify::zeroconf-enabled", G_CALLBACK (vino_prefs_restart_mdns), NULL);
+  g_signal_connect (server, "notify::zeroconf-name", G_CALLBACK (vino_prefs_restart_mdns), NULL);
 
   icon = vino_server_get_status_icon (server);
   vino_status_icon_set_visibility (icon, vino_icon_visibility);
@@ -723,6 +805,16 @@ vino_prefs_init (gboolean view_only)
                                                 NULL);
   dprintf (PREFS, "Disable XDamage: %s\n", vino_disable_xdamage ? "(true)" : "(false)");
 
+  vino_zeroconf_enabled = gconf_client_get_bool (vino_client,
+						 VINO_PREFS_ZEROCONF_ENABLED,
+						 NULL);
+  dprintf (PREFS, "Zeroconf enabled: %s\n", vino_zeroconf_enabled ? "(true)" : "(false)");
+
+  vino_zeroconf_name = gconf_client_get_string (vino_client,
+					        VINO_PREFS_ZEROCONF_NAME,
+					        NULL);
+  dprintf (PREFS, "Zerconf name: %s\n", vino_zeroconf_name ? vino_zeroconf_name : "(null)");
+
   key_str = gconf_client_get_string (vino_client,
                                      VINO_PREFS_ICON_VISIBILITY,
                                      NULL);
@@ -834,7 +926,20 @@ vino_prefs_init (gboolean view_only)
 			     VINO_PREFS_DISABLE_XDAMAGE,
 			     (GConfClientNotifyFunc) vino_prefs_disable_xdamage_changed,
 			     NULL, NULL, NULL);
+  i++;
+
+  vino_listeners [i] =
+    gconf_client_notify_add (vino_client,
+			     VINO_PREFS_ZEROCONF_ENABLED,
+			     (GConfClientNotifyFunc) vino_prefs_zeroconf_enabled_changed,
+			     NULL, NULL, NULL);
+  i++;
 
+  vino_listeners [i] =
+    gconf_client_notify_add (vino_client,
+			     VINO_PREFS_ZEROCONF_NAME,
+			     (GConfClientNotifyFunc) vino_prefs_zeroconf_name_changed,
+			     NULL, NULL, NULL);
   i++;
 
   g_assert (i == VINO_N_LISTENERS);
diff --git a/server/vino-server.c b/server/vino-server.c
index 04ebb05..915f0ba 100644
--- a/server/vino-server.c
+++ b/server/vino-server.c
@@ -92,6 +92,8 @@ struct _VinoServerPrivate
   guint             disable_background : 1;
   guint             use_upnp : 1;
   guint             disable_xdamage : 1;
+  guint             zeroconf_enabled : 1;
+  char             *zeroconf_name;
 };
 
 struct _VinoClient
@@ -126,7 +128,9 @@ enum
   PROP_LOCK_SCREEN,
   PROP_DISABLE_BACKGROUND,
   PROP_USE_UPNP,
-  PROP_DISABLE_XDAMAGE
+  PROP_DISABLE_XDAMAGE,
+  PROP_ZEROCONF_ENABLED,
+  PROP_ZEROCONF_NAME
 };
 
 static enum rfbNewClientAction vino_server_auth_client (VinoServer *server,
@@ -1195,6 +1199,12 @@ vino_server_set_property (GObject      *object,
     case PROP_DISABLE_XDAMAGE:
       vino_server_set_disable_xdamage (server, g_value_get_boolean (value));
       break;
+    case PROP_ZEROCONF_ENABLED:
+      vino_server_set_zeroconf_enabled (server, g_value_get_boolean (value));
+      break;
+    case PROP_ZEROCONF_NAME:
+      vino_server_set_zeroconf_name (server, g_value_get_string (value));
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -1262,6 +1272,12 @@ vino_server_get_property (GObject    *object,
     case PROP_DISABLE_XDAMAGE:
       g_value_set_boolean (value, server->priv->disable_xdamage);
       break;
+    case PROP_ZEROCONF_ENABLED:
+      g_value_set_boolean (value, server->priv->zeroconf_enabled);
+      break;
+    case PROP_ZEROCONF_NAME:
+      g_value_set_string (value, server->priv->zeroconf_name);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -1509,6 +1525,29 @@ vino_server_class_init (VinoServerClass *klass)
                                                          G_PARAM_STATIC_NICK |
                                                          G_PARAM_STATIC_BLURB));
 
+   g_object_class_install_property (gobject_class,
+				   PROP_ZEROCONF_ENABLED,
+				   g_param_spec_boolean ("zeroconf-enabled",
+							 "Enable zeroconf",
+							 "Enable use of zeroconf for service discovery",
+							 TRUE,
+                                                         G_PARAM_READWRITE   |
+                                                         G_PARAM_CONSTRUCT   |
+                                                         G_PARAM_STATIC_NAME |
+                                                         G_PARAM_STATIC_NICK |
+                                                         G_PARAM_STATIC_BLURB));
+
+  g_object_class_install_property (gobject_class,
+				   PROP_ZEROCONF_NAME,
+				   g_param_spec_string ("zeroconf-name",
+							"Name for Zeroconf service discovery",
+							"The name of the remote desktop for Zeroconf service discovery",
+							NULL,
+                                                        G_PARAM_READWRITE   |
+                                                        G_PARAM_CONSTRUCT   |
+                                                        G_PARAM_STATIC_NAME |
+                                                        G_PARAM_STATIC_NICK |
+                                                        G_PARAM_STATIC_BLURB));
 }
 
 VinoServer *
@@ -1769,6 +1808,7 @@ vino_server_update_security_types (VinoServer *server)
 	rfbAddSecurityType (server->priv->rfb_screen, rfbNoAuth);
     }
 }
+
 void
 vino_server_set_require_encryption (VinoServer *server,
 				    gboolean    require_encryption)
@@ -1905,3 +1945,51 @@ vino_server_get_status_icon (VinoServer *server)
   return server->priv->icon;
 }
 
+void
+vino_server_set_zeroconf_enabled (VinoServer *server,
+				  gboolean    zeroconf_enabled)
+{
+  g_return_if_fail (VINO_IS_SERVER (server));
+  
+  zeroconf_enabled = zeroconf_enabled != FALSE;
+
+  if (server->priv->zeroconf_enabled != zeroconf_enabled)
+    {
+      server->priv->zeroconf_enabled = zeroconf_enabled;
+
+      vino_server_update_security_types (server);
+
+      g_object_notify (G_OBJECT (server), "zeroconf-enabled");
+    }
+}
+
+gboolean
+vino_server_get_zeroconf_enabled (VinoServer *server)
+{
+  g_return_val_if_fail (VINO_IS_SERVER (server), FALSE);
+
+  return server->priv->zeroconf_enabled;
+}
+
+void
+vino_server_set_zeroconf_name (VinoServer *server,
+			      const char *zeroconf_name)
+{
+  g_return_if_fail (VINO_IS_SERVER (server));
+
+  if (server->priv->zeroconf_name)
+    g_free (server->priv->zeroconf_name);
+
+  server->priv->zeroconf_name = g_strdup (zeroconf_name);
+
+  g_object_notify (G_OBJECT (server), "zeroconf-name");
+}
+
+G_CONST_RETURN char *
+vino_server_get_zeroconf_name (VinoServer *server)
+{
+  g_return_val_if_fail (VINO_IS_SERVER (server), NULL);
+
+  return server->priv->zeroconf_name;
+}
+
diff --git a/server/vino-server.h b/server/vino-server.h
index 27b5cd6..3452de0 100644
--- a/server/vino-server.h
+++ b/server/vino-server.h
@@ -120,6 +120,14 @@ void                 vino_server_set_disable_xdamage      (VinoServer     *serve
                                                            gboolean        disable_xdamage);
 gboolean             vino_server_get_disable_xdamage      (VinoServer     *server);
 
+void                 vino_server_set_zeroconf_enabled     (VinoServer     *server,
+							   gboolean        zeroconf_enabled);
+gboolean             vino_server_get_zeroconf_enabled     (VinoServer     *server);
+
+void                 vino_server_set_zeroconf_name        (VinoServer     *server,
+							   const char     *zeroconf_name);
+G_CONST_RETURN char *vino_server_get_zeroconf_name        (VinoServer     *server);
+
 #include "vino-status-icon.h"
 VinoStatusIcon      *vino_server_get_status_icon          (VinoServer      *server);
 
diff --git a/server/vino-server.schemas.in b/server/vino-server.schemas.in
index 4b22232..e59b977 100644
--- a/server/vino-server.schemas.in
+++ b/server/vino-server.schemas.in
@@ -246,5 +246,35 @@
       </locale>
     </schema>
 
+    <schema>
+      <key>/schemas/desktop/gnome/remote_access/zeroconf_enabled</key>
+      <applyto>/desktop/gnome/remote_access/zeroconf_enabled</applyto>
+      <owner>gnome</owner>
+      <type>bool</type>
+      <default>true</default>
+      <locale name="C">
+         <short>Enable Zeroconf for service discovery</short>
+         <long>
+           If true, will advertise remote desktop service availability
+	   using Avahi.
+         </long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/desktop/gnome/remote_access/zeroconf_name</key>
+      <applyto>/desktop/gnome/remote_access/zeroconf_name</applyto>
+      <owner>gnome</owner>
+      <type>string</type>
+      <default></default>
+      <locale name="C">
+         <short>Use name for Zeroconf for service discovery</short>
+         <long>
+           Specify the name used for remote desktop service via Avahi.
+         </long>
+      </locale>
+    </schema>
+
+
   </schemalist>  
 </gconfschemafile>
