--- gtk-vnc-0.4.2-orig/src/vncdisplay.c	2010-11-05 12:55:10.000000000 +0100
+++ gtk-vnc-0.4.2/src/vncdisplay.c	2010-12-06 16:40:48.000000000 +0100
@@ -1360,6 +1360,9 @@
 	if (vnc_connection_is_open(priv->conn))
 		return FALSE;
 
+	if (!vnc_connection_set_shared(priv->conn, priv->shared_flag))
+		return FALSE;
+
 	if (!vnc_connection_open_fd(priv->conn, fd))
 		return FALSE;
 
@@ -1375,6 +1378,9 @@
 	if (vnc_connection_is_open(priv->conn))
 		return FALSE;
 
+	if (!vnc_connection_set_shared(priv->conn, priv->shared_flag))
+		return FALSE;
+
 	if (!vnc_connection_open_host(priv->conn, host, port))
 		return FALSE;
 
