Package: gvncviewer
Version: 0.3.8-3
Severity: minor
Tags: patch

Attaching patch that allows connecting to local servers by the display
number only like the original vnc viewer does.



-- System Information:
Debian Release: 5.0.2
  APT prefers stable
  APT policy: (900, 'stable'), (500, 'testing'), (300, 'unstable'), (290, 
'stable-i386'), (280, 'testing-i386'), (270, 'unstable-i386'), (1, 
'experimental-i386'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-1-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gvncviewer depends on:
ii  libc6                  2.9-23            GNU C Library: Shared libraries
ii  libfontconfig1         2.6.0-4           generic font configuration library
ii  libglib2.0-0           2.20.4-1          The GLib library of C routines
ii  libgtk-vnc-1.0-0       0.3.8-2           A VNC viewer widget for GTK+ (runt
ii  libgtk2.0-0            2.16.1-2          The GTK+ graphical user interface 
ii  zlib1g                 1:1.2.3.3.dfsg-15 compression library - runtime

gvncviewer recommends no packages.

gvncviewer suggests no packages.

-- no debconf information
diff -ur gtk-vnc-0.3.8/examples/gvncviewer.c gtk-vnc-0.3.8.mod/examples/gvncviewer.c
--- gtk-vnc-0.3.8/examples/gvncviewer.c	2008-12-07 20:35:14.000000000 +0100
+++ gtk-vnc-0.3.8.mod/examples/gvncviewer.c	2009-08-08 01:24:54.000000000 +0200
@@ -36,7 +36,7 @@
 {
   { 
     G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_STRING_ARRAY, &args,
-    NULL, "hostname[:display]" },
+    NULL, "[hostname][:display]" },
   { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, 0 }
 };
 
@@ -320,7 +320,7 @@
 		return 1;
 	}
 	if (!args || (g_strv_length(args) != 1)) {
-		fprintf(stderr, "Usage: gvncviewer hostname[:display]\n%s\n", help_msg);
+		fprintf(stderr, "Usage: gvncviewer [hostname][:display]\n%s\n", help_msg);
 		return 1;
 	}
 
@@ -386,6 +386,8 @@
 	} else
 		snprintf(port, sizeof(port), "%d", 5900);
 
+        if(! *hostname) 
+          snprintf(hostname, sizeof(hostname), "%s", "127.0.0.1");
 	vnc_display_open_host(VNC_DISPLAY(vnc), hostname, port);
 	vnc_display_set_keyboard_grab(VNC_DISPLAY(vnc), TRUE);
 	vnc_display_set_pointer_grab(VNC_DISPLAY(vnc), TRUE);

Reply via email to