diff -rup vino-2.16.0/capplet/vino-preferences.c vino-wendell/capplet/vino-preferences.c
--- vino-2.16.0/capplet/vino-preferences.c	2005-05-16 10:14:57.000000000 -0300
+++ vino-wendell/capplet/vino-preferences.c	2006-10-06 16:51:48.000000000 -0300
@@ -40,8 +40,10 @@
 #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 VINO_PREFS_USE_ALTERNATIVE_PORT   VINO_PREFS_DIR "/use_alternative_port"
+#define VINO_PREFS_ALTERNATIVE_PORT       VINO_PREFS_DIR "/alternative_port"
 
-#define N_LISTENERS 6
+#define N_LISTENERS 8
 
 typedef struct {
   GladeXML    *xml;
@@ -52,6 +54,7 @@ typedef struct {
   GtkWidget   *writability_warning;
   GtkWidget   *sharing_icon;
   GtkWidget   *security_icon;
+  GtkWidget   *advanced_icon;
   GtkWidget   *url_labels_box;
   GtkWidget   *url_label;
   GtkWidget   *allowed_toggle;
@@ -60,11 +63,17 @@ typedef struct {
   GtkWidget   *password_toggle;
   GtkWidget   *password_box;
   GtkWidget   *password_entry;
+  GtkWidget   *advanced_box;
+  GtkWidget   *alternative_port_toogle;
+  GtkWidget   *alternative_port_box;
+  GtkWidget   *port_entry;
 
   guint        listeners [N_LISTENERS];
   int          n_listeners;
 
   guint        use_password : 1;
+  gboolean     use_alternative_port;
+  gint         alternative_port;
 } VinoPreferencesDialog;
 
 static char *
@@ -246,6 +255,8 @@ vino_preferences_dialog_update_for_allow
   gtk_widget_set_sensitive (dialog->url_labels_box,        allowed);
   gtk_widget_set_sensitive (dialog->password_toggle,       allowed);
   gtk_widget_set_sensitive (dialog->password_box,          allowed ? dialog->use_password : FALSE);
+  gtk_widget_set_sensitive (dialog->advanced_box,          allowed);
+  gtk_widget_set_sensitive (dialog->alternative_port_box,    allowed ? dialog->use_alternative_port : FALSE);
 }
 
 static void
@@ -288,6 +299,9 @@ vino_preferences_dialog_setup_allowed_to
   dialog->allowed_toggle = glade_xml_get_widget (dialog->xml, "allowed_toggle");
   g_assert (dialog->allowed_toggle != NULL);
 
+  dialog->advanced_box = glade_xml_get_widget (dialog->xml, "advanced_box");
+  g_assert (dialog->advanced_box != NULL);
+
   gtk_label_set_use_markup (GTK_LABEL (GTK_BIN (dialog->allowed_toggle)->child), TRUE);
 
   allowed = gconf_client_get_bool (dialog->client, VINO_PREFS_ENABLED, NULL);
@@ -652,6 +666,9 @@ vino_preferences_dialog_setup_icons (Vin
   dialog->security_icon = glade_xml_get_widget (dialog->xml, "security_icon");
   g_assert (dialog->security_icon != NULL);
 
+  dialog->advanced_icon = glade_xml_get_widget (dialog->xml, "advanced_icon");
+  g_assert (dialog->advanced_icon != NULL);
+
   icon_theme = gnome_icon_theme_new ();
   gnome_icon_theme_set_allow_svg (icon_theme, TRUE);
 
@@ -673,6 +690,10 @@ vino_preferences_dialog_setup_icons (Vin
   if (icon_path)
     {
       gtk_image_set_from_file (GTK_IMAGE (dialog->security_icon), icon_path);
+
+     /*FIXME: Using same icon as security section*/ 
+     gtk_image_set_from_file (GTK_IMAGE (dialog->advanced_icon), icon_path);
+
       g_free (icon_path);
     }
 
@@ -681,6 +702,128 @@ vino_preferences_dialog_setup_icons (Vin
 #undef ICON_SIZE_STANDARD
 }
 
+static void
+vino_preferences_dialog_use_alternative_port_toggled (GtkToggleButton       *toggle,
+					      VinoPreferencesDialog *dialog)
+{
+
+  dialog->use_alternative_port = gtk_toggle_button_get_active (toggle);
+
+  gconf_client_set_bool (dialog->client,
+			 VINO_PREFS_USE_ALTERNATIVE_PORT,
+			 dialog->use_alternative_port,
+			 NULL);
+
+  gtk_widget_set_sensitive (dialog->alternative_port_box, dialog->use_alternative_port);
+}
+
+static void
+vino_preferences_dialog_use_alternative_port_notify (GConfClient           *client,
+					guint                  cnx_id,
+					GConfEntry            *entry,
+					VinoPreferencesDialog *dialog)
+{
+  gboolean allowed;
+
+  if (!entry->value || entry->value->type != GCONF_VALUE_BOOL)
+    return;
+
+  allowed = gconf_value_get_bool (entry->value) != FALSE;
+
+  if (allowed != gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->alternative_port_toogle)))
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->alternative_port_toogle), allowed);
+}
+
+static void
+vino_preferences_dialog_port_changed (GtkSpinButton *entry,
+					  VinoPreferencesDialog *dialog)
+{
+  dialog->alternative_port = gtk_spin_button_get_value_as_int(entry);
+
+  gconf_client_set_int (dialog->client,
+			 VINO_PREFS_ALTERNATIVE_PORT,
+			 dialog->alternative_port,
+			 NULL);
+
+}
+
+static void
+vino_preferences_dialog_setup_port_toggle (VinoPreferencesDialog *dialog)
+{
+  dialog->alternative_port_toogle = glade_xml_get_widget (dialog->xml, "alternative_port_toogle");
+  g_assert (dialog->alternative_port_toogle != NULL);
+
+  dialog->alternative_port_box = glade_xml_get_widget (dialog->xml, "alternative_port_box");
+  g_assert (dialog->alternative_port_box != NULL);
+
+  dialog->use_alternative_port = gconf_client_get_bool (dialog->client, VINO_PREFS_USE_ALTERNATIVE_PORT, NULL);
+
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->alternative_port_toogle), dialog->use_alternative_port);
+
+  g_signal_connect (dialog->alternative_port_toogle, "toggled",
+		    G_CALLBACK (vino_preferences_dialog_use_alternative_port_toggled), dialog);
+
+  if (!gconf_client_key_is_writable (dialog->client, VINO_PREFS_USE_ALTERNATIVE_PORT, NULL))
+    {
+      gtk_widget_set_sensitive (dialog->alternative_port_toogle, FALSE);
+      gtk_widget_show (dialog->writability_warning);
+    }
+
+  dialog->listeners [dialog->n_listeners] = 
+    gconf_client_notify_add (dialog->client,
+			     VINO_PREFS_USE_ALTERNATIVE_PORT,
+			     (GConfClientNotifyFunc) vino_preferences_dialog_use_alternative_port_notify,
+			     dialog, NULL, NULL);
+  dialog->n_listeners++;
+
+}
+
+static void
+vino_preferences_dialog_port_notify (GConfClient           *client,
+					guint                  cnx_id,
+					GConfEntry            *entry,
+					VinoPreferencesDialog *dialog)
+{
+  guint port;
+
+  if (entry->value->type != GCONF_VALUE_INT)
+    return;
+
+  port = gconf_value_get_int(entry->value);
+
+  if (port != gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(dialog->port_entry)))
+    gtk_spin_button_set_value(GTK_SPIN_BUTTON (dialog->port_entry), port);
+}
+
+static void
+vino_preferences_dialog_setup_port_entry (VinoPreferencesDialog *dialog)
+{
+  guint port;
+
+  dialog->port_entry = glade_xml_get_widget (dialog->xml, "port_entry");
+  g_assert (dialog->port_entry != NULL);
+  
+  dialog->alternative_port_box = glade_xml_get_widget (dialog->xml, "alternative_port_box");
+  g_assert (dialog->alternative_port_box != NULL);
+
+  port = gconf_client_get_int (dialog->client, VINO_PREFS_ALTERNATIVE_PORT, NULL);
+  if (port < 5000)
+    port = 5000;
+
+  gtk_spin_button_set_value(GTK_SPIN_BUTTON (dialog->port_entry), port);
+
+  g_signal_connect (dialog->port_entry, "value-changed",
+		    G_CALLBACK (vino_preferences_dialog_port_changed), dialog);
+
+  dialog->listeners [dialog->n_listeners] = 
+    gconf_client_notify_add (dialog->client,
+			     VINO_PREFS_ALTERNATIVE_PORT,
+			     (GConfClientNotifyFunc) vino_preferences_dialog_port_notify,
+			     dialog, NULL, NULL);
+  dialog->n_listeners++;
+}
+
+
 static char *
 vino_preferences_get_local_hostname (void)
 {
@@ -908,6 +1051,8 @@ vino_preferences_dialog_init (VinoPrefer
   vino_preferences_dialog_setup_view_only_toggle      (dialog);
   vino_preferences_dialog_setup_password_toggle       (dialog);
   vino_preferences_dialog_setup_password_entry        (dialog);
+  vino_preferences_dialog_setup_port_toggle           (dialog);
+  vino_preferences_dialog_setup_port_entry           (dialog);
 
   g_assert (dialog->n_listeners == N_LISTENERS);
 
Only in vino-2.16.0/capplet: vino-preferences.desktop.in
diff -rup vino-2.16.0/capplet/vino-preferences.glade vino-wendell/capplet/vino-preferences.glade
--- vino-2.16.0/capplet/vino-preferences.glade	2004-07-20 17:03:20.000000000 -0300
+++ vino-wendell/capplet/vino-preferences.glade	2006-10-09 11:31:12.000000000 -0300
@@ -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,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>
@@ -389,6 +424,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 +443,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>
@@ -441,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>
@@ -456,6 +500,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>
@@ -493,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>
@@ -515,6 +564,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 +585,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>
@@ -569,6 +622,225 @@
 	      <property name="fill">True</property>
 	    </packing>
 	  </child>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox38">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label57">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">&lt;b&gt;Advanced&lt;/b&gt;</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">True</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</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="GtkHBox" id="hbox33">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">12</property>
+
+		  <child>
+		    <widget class="GtkImage" id="advanced_icon">
+		      <property name="visible">True</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="advanced_box">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">6</property>
+
+		      <child>
+			<widget class="GtkCheckButton" id="alternative_port_toogle">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Use an alternativ_e port (default: 5900)</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>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox34">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label59">
+			      <property name="visible">True</property>
+			      <property name="label">    </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="GtkHBox" id="alternative_port_box">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">6</property>
+
+			      <child>
+				<widget class="GtkLabel" id="label62">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Alternative port _to use:</property>
+				  <property name="use_underline">True</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="mnemonic_widget">port_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>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkSpinButton" id="port_entry">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="climb_rate">1</property>
+				  <property name="digits">0</property>
+				  <property name="numeric">True</property>
+				  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+				  <property name="snap_to_ticks">False</property>
+				  <property name="wrap">False</property>
+				  <property name="adjustment">5901 5000 50000 1 10 10</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">True</property>
+				  <property name="fill">True</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label63">
+				  <property name="visible">True</property>
+				  <property name="label">                  </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">True</property>
+				  <property name="fill">True</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+			</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>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 	</widget>
 	<packing>
 	  <property name="padding">0</property>
Only in vino-wendell/capplet: vino-preferences.glade.bak
Only in vino-wendell/capplet: vino-preferences.gladep
diff -rup vino-2.16.0/ChangeLog vino-wendell/ChangeLog
--- vino-2.16.0/ChangeLog	2006-10-05 10:10:51.000000000 -0300
+++ vino-wendell/ChangeLog	2006-10-09 11:33:15.000000000 -0300
@@ -1,3 +1,12 @@
+2006-10-06  Jonh Wendell  <wendell@bani.com.br>
+
+	* server/vino-server.[ch],
+	* server/vino-prefs.c,
+	* server/vino-server.schemas.in,
+	* capplet/vino-preferences.c,
+	* capplet/vino-preferences.glade: Added ability to user choose a different port
+	Closes bug #333752.
+
 2006-10-05  Kjartan Maraas  <kmaraas@gnome.org>
 
 	* NEWS: Updated.
diff -rup vino-2.16.0/server/vino-prefs.c vino-wendell/server/vino-prefs.c
--- vino-2.16.0/server/vino-prefs.c	2006-08-14 05:47:27.000000000 -0300
+++ vino-wendell/server/vino-prefs.c	2006-10-06 17:20:28.000000000 -0300
@@ -35,8 +35,10 @@
 #define VINO_PREFS_REQUIRE_ENCRYPTION     VINO_PREFS_DIR "/require_encryption"
 #define VINO_PREFS_AUTHENTICATION_METHODS VINO_PREFS_DIR "/authentication_methods"
 #define VINO_PREFS_VNC_PASSWORD           VINO_PREFS_DIR "/vnc_password"
+#define VINO_PREFS_USE_ALTERNATIVE_PORT   VINO_PREFS_DIR "/use_alternative_port"
+#define VINO_PREFS_ALTERNATIVE_PORT       VINO_PREFS_DIR "/alternative_port"
 
-#define VINO_N_LISTENERS 6
+#define VINO_N_LISTENERS 8
 
 static GConfClient *vino_client  = NULL;
 static GSList      *vino_servers = NULL;
@@ -48,6 +50,8 @@ static gboolean        vino_view_only   
 static gboolean        vino_require_encryption = FALSE;
 static VinoAuthMethod  vino_auth_methods       = VINO_AUTH_VNC;
 static char           *vino_vnc_password       = NULL;
+static gboolean        vino_use_alternative_port = FALSE;
+static gint            vino_alternative_port   = 5000;
 
 
 static void
@@ -233,19 +237,68 @@ vino_prefs_vnc_password_changed (GConfCl
     vino_server_set_vnc_password (l->data, vnc_password);
 }
 
+static void
+vino_prefs_use_alternative_port_changed (GConfClient *client,
+			    guint        cnxn_id,
+			    GConfEntry  *entry)
+{
+  gboolean  enabled;
+  GSList   *l;
+
+  if (!entry->value || entry->value->type != GCONF_VALUE_BOOL)
+    return;
+  
+  enabled = gconf_value_get_bool (entry->value) != FALSE;
+
+  if (vino_use_alternative_port == enabled)
+    return;
+
+  vino_use_alternative_port = enabled;
+  
+  dprintf (PREFS, "Use alternative port changed: %s\n", vino_use_alternative_port ? "(true)" : "(false)");
+
+  for (l = vino_servers; l; l = l->next)
+    vino_server_set_use_alternative_port (l->data, vino_use_alternative_port);
+}
+
+static void
+vino_prefs_alternative_port_changed (GConfClient *client,
+			    guint        cnxn_id,
+			    GConfEntry  *entry)
+{
+  gint port;
+  GSList   *l;
+
+  if (entry->value->type != GCONF_VALUE_INT)
+    return;
+  
+  port = gconf_value_get_int (entry->value);
+  if (port == vino_alternative_port || port < 5000)
+    return;
+
+  vino_alternative_port = port;
+  
+  dprintf (PREFS, "Alternative port changed: %d\n", vino_alternative_port);
+
+  for (l = vino_servers; l; l = l->next)
+    vino_server_set_alternative_port (l->data, vino_alternative_port);
+}
+
 void
 vino_prefs_create_server (GdkScreen *screen)
 {
   VinoServer *server;
 
   server = g_object_new (VINO_TYPE_SERVER,
-			 "screen",             screen,
-			 "prompt-enabled",     vino_prompt_enabled,
-			 "view-only",          vino_view_only,
-			 "auth-methods",       vino_auth_methods,
-			 "require-encryption", vino_require_encryption,
-			 "vnc-password",       vino_vnc_password,
-			 "on-hold",            !vino_enabled,
+			 "use-alternative-port", vino_use_alternative_port,
+			 "alternative-port",     vino_alternative_port,
+			 "screen",               screen,
+			 "prompt-enabled",       vino_prompt_enabled,
+			 "view-only",            vino_view_only,
+			 "auth-methods",         vino_auth_methods,
+			 "require-encryption",   vino_require_encryption,
+			 "vnc-password",         vino_vnc_password,
+			 "on-hold",              !vino_enabled,
 			 NULL);
 
   vino_servers = g_slist_prepend (vino_servers, server);
@@ -266,7 +319,7 @@ vino_prefs_init (gboolean view_only)
 
   vino_enabled = gconf_client_get_bool (vino_client, VINO_PREFS_ENABLED, NULL);
   dprintf (PREFS, "Access enabled: %s\n", vino_enabled ? "(true)" : "(false)");
-
+  
   vino_prompt_enabled = gconf_client_get_bool (vino_client,
 					       VINO_PREFS_PROMPT_ENABLED,
 					       NULL);
@@ -289,6 +342,12 @@ vino_prefs_init (gboolean view_only)
 						   NULL);
   dprintf (PREFS, "Require encryption: %s\n", vino_require_encryption ? "(true)" : "(false)");
 
+  vino_use_alternative_port = gconf_client_get_bool (vino_client, VINO_PREFS_USE_ALTERNATIVE_PORT, NULL);
+  dprintf (PREFS, "Use alternative port: %s\n", vino_use_alternative_port ? "(true)" : "(false)");
+
+  vino_alternative_port = gconf_client_get_int (vino_client, VINO_PREFS_ALTERNATIVE_PORT, NULL);
+  dprintf (PREFS, "Alternative port: %d\n", vino_alternative_port);
+
   auth_methods_list = gconf_client_get_list (vino_client,
 					     VINO_PREFS_AUTHENTICATION_METHODS,
 					     GCONF_VALUE_STRING,
@@ -353,6 +412,21 @@ vino_prefs_init (gboolean view_only)
 			     NULL, NULL, NULL);
   i++;
 
+  vino_listeners [i] =
+    gconf_client_notify_add (vino_client,
+			     VINO_PREFS_USE_ALTERNATIVE_PORT,
+			     (GConfClientNotifyFunc) vino_prefs_use_alternative_port_changed,
+			     NULL, NULL, NULL);
+  i++;
+
+
+  vino_listeners [i] =
+    gconf_client_notify_add (vino_client,
+			     VINO_PREFS_ALTERNATIVE_PORT,
+			     (GConfClientNotifyFunc) vino_prefs_alternative_port_changed,
+			     NULL, NULL, NULL);
+  i++;
+
   g_assert (i == VINO_N_LISTENERS);
 }
 
diff -rup vino-2.16.0/server/vino-server.c vino-wendell/server/vino-server.c
--- vino-2.16.0/server/vino-server.c	2006-10-05 10:05:20.000000000 -0300
+++ vino-wendell/server/vino-server.c	2006-10-06 16:54:17.000000000 -0300
@@ -68,6 +68,8 @@ struct _VinoServerPrivate
   guint             view_only : 1;
   guint             require_encryption : 1;
   guint             last_auth_failed : 1;
+  guint             use_alternative_port : 1;
+  gint              alternative_port;
 };
 
 typedef struct
@@ -92,7 +94,9 @@ enum
   PROP_VIEW_ONLY,
   PROP_REQUIRE_ENCRYPTION,
   PROP_AUTH_METHODS,
-  PROP_VNC_PASSWORD
+  PROP_VNC_PASSWORD,
+  PROP_USE_ALTERNATIVE_PORT,
+  PROP_ALTERNATIVE_PORT
 };
 
 static enum rfbNewClientAction vino_server_auth_client (VinoServer           *server,
@@ -668,7 +672,8 @@ vino_server_init_from_screen (VinoServer
    *   5900-6000
    */
   rfb_screen->rfbDeferUpdateTime = 0;
-  rfb_screen->autoPort           = TRUE;
+  rfb_screen->autoPort           = !server->priv->use_alternative_port;
+  rfb_screen->rfbPort            = server->priv->use_alternative_port ? server->priv->alternative_port : 5900;
   rfb_screen->rfbAlwaysShared    = TRUE;
 
   rfbInitServer (rfb_screen);
@@ -794,6 +799,12 @@ vino_server_set_property (GObject      *
     case PROP_VNC_PASSWORD:
       vino_server_set_vnc_password (server, g_value_get_string (value));
       break;
+    case PROP_USE_ALTERNATIVE_PORT:
+      vino_server_set_use_alternative_port (server, g_value_get_boolean (value));
+      break;
+    case PROP_ALTERNATIVE_PORT:
+      vino_server_set_alternative_port (server, g_value_get_int (value));
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -831,6 +842,12 @@ vino_server_get_property (GObject    *ob
     case PROP_VNC_PASSWORD:
       g_value_set_string (value, server->priv->vnc_password);
       break;
+    case PROP_USE_ALTERNATIVE_PORT:
+      g_value_set_boolean (value, server->priv->use_alternative_port);
+      break;
+    case PROP_ALTERNATIVE_PORT:
+      g_value_set_int (value, server->priv->alternative_port);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -910,6 +927,25 @@ vino_server_class_init (VinoServerClass 
 							_("The password (base64 encoded) used to authenticate types using the VncAuth method"),
 							NULL,
 							G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+							
+  g_object_class_install_property (gobject_class,
+				   PROP_USE_ALTERNATIVE_PORT,
+				   g_param_spec_boolean ("use-alternative-port",
+							 _("Use an alternative port"),
+							 _("Tell server to listen a non standard port"),
+							 FALSE,
+							 G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
+  g_object_class_install_property (gobject_class,
+				   PROP_ALTERNATIVE_PORT,
+				   g_param_spec_int ("alternative-port",
+							 _("Alternative port number"),
+							 _("Tell server to listen that port instead of default"),
+							 5000,
+							 50000,
+							 5000,
+							 G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+							
 }
 
 GType
@@ -1051,6 +1087,50 @@ vino_server_set_prompt_enabled (VinoServ
     }
 }
 
+gboolean
+vino_server_get_use_alternative_port (VinoServer *server)
+{
+  g_return_val_if_fail (VINO_IS_SERVER (server), FALSE);
+
+  return server->priv->use_alternative_port;
+}
+
+void
+vino_server_set_use_alternative_port (VinoServer *server,
+			   gboolean    use_alternative_port)
+{
+  g_return_if_fail (VINO_IS_SERVER (server));
+
+  if (server->priv->use_alternative_port != use_alternative_port)
+    {
+      server->priv->use_alternative_port = use_alternative_port;
+
+      g_object_notify (G_OBJECT (server), "use-alternative-port");
+    }
+}
+
+gint
+vino_server_get_alternative_port (VinoServer *server)
+{
+  g_return_val_if_fail (VINO_IS_SERVER (server), FALSE);
+
+  return server->priv->alternative_port;
+}
+
+void
+vino_server_set_alternative_port (VinoServer *server,
+			   gint    alternative_port)
+{
+  g_return_if_fail (VINO_IS_SERVER (server));
+
+  if (server->priv->alternative_port != alternative_port)
+    {
+      server->priv->alternative_port = alternative_port;
+
+      g_object_notify (G_OBJECT (server), "alternative-port");
+    }
+}
+
 static void
 vino_server_update_security_types (VinoServer *server)
 {
diff -rup vino-2.16.0/server/vino-server.h vino-wendell/server/vino-server.h
--- vino-2.16.0/server/vino-server.h	2004-02-05 05:55:02.000000000 -0300
+++ vino-wendell/server/vino-server.h	2006-10-06 16:53:51.000000000 -0300
@@ -71,6 +71,12 @@ void                 vino_server_set_pro
 gboolean             vino_server_get_prompt_enabled     (VinoServer     *server);
 void                 vino_server_set_view_only          (VinoServer     *server,
 							 gboolean        view_only);
+gboolean             vino_server_get_use_alternative_port (VinoServer     *server);
+void                 vino_server_set_use_alternative_port (VinoServer     *server,
+							 gboolean        use_alternative_port);
+gint                 vino_server_get_alternative_port (VinoServer     *server);
+void                 vino_server_set_alternative_port (VinoServer     *server,
+							 gint        alternative_port);
 gboolean             vino_server_get_view_only          (VinoServer     *server);
 void                 vino_server_set_require_encryption (VinoServer     *server,
 							 gboolean        require_encryption);
diff -rup vino-2.16.0/server/vino-server.schemas.in vino-wendell/server/vino-server.schemas.in
--- vino-2.16.0/server/vino-server.schemas.in	2005-05-19 12:01:32.000000000 -0300
+++ vino-wendell/server/vino-server.schemas.in	2006-10-06 17:35:46.000000000 -0300
@@ -119,5 +119,36 @@
       </locale>
     </schema>
 
+    <schema>
+      <key>/schemas/desktop/gnome/remote_access/use_alternative_port</key>
+      <applyto>/desktop/gnome/remote_access/use_alternative_port</applyto>
+      <owner>gnome</owner>
+      <type>bool</type>
+      <default>false</default>
+      <locale name="C">
+         <short>Listen an alternative port</short>
+         <long>
+           If true, allows vino to listen another port, instead of default (5900).
+           The port must be specified in 'alternative_port' key.
+         </long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/desktop/gnome/remote_access/alternative_port</key>
+      <applyto>/desktop/gnome/remote_access/alternative_port</applyto>
+      <owner>gnome</owner>
+      <type>int</type>
+      <default>false</default>
+      <locale name="C">
+         <short>Alternative port number</short>
+         <long>
+           The port which vino must listen. Vino will listen this port if
+           'use_alternative_port' key is true. Valid values are in the range
+           from 5000 to 50000.
+         </long>
+      </locale>
+    </schema>
+
   </schemalist>  
 </gconfschemafile>
