--- vnc-3.3.7.orig/vncviewer/argsresources.c	2003-02-28 19:47:10.000000000 +0100
+++ vnc-3.3.7/vncviewer/argsresources.c	2003-07-18 16:09:25.000000000 +0200
@@ -1,5 +1,6 @@
 /*
  *  Copyright (C) 2002-2003 RealVNC Ltd.
+ *  Copyright (C) 2000 Const Kaplinsky.  All Rights Reserved.
  *  Copyright (C) 1999 AT&T Laboratories Cambridge.  All Rights Reserved.
  *
  *  This is free software; you can redistribute it and/or modify
@@ -261,6 +262,22 @@
 
 
 /*
+ * removeArgs() is used to remove some of command line arguments.
+ */
+
+void
+removeArgs(int *argc, char** argv, int idx, int nargs)
+{
+  int i;
+  if ((idx+nargs) > *argc) return;
+  for (i = idx+nargs; i < *argc; i++) {
+    argv[i-nargs] = argv[i];
+  }
+  *argc -= nargs;
+}
+
+
+/*
  * usage() prints out the usage message.
  */
 
@@ -272,6 +289,7 @@
 	  "       %s [<options>] -listen [<display#>]\n"
 	  "\n"
 	  "<options> are standard Xt options, or:\n"
+	  "              -via <GATEWAY>\n"
 	  "              -shared\n"
 	  "              -viewonly\n"
 	  "              -fullscreen\n"
@@ -340,6 +358,8 @@
   } else {
     vncServerName = argv[1];
 
+    if (!isatty(0))
+      appData.passwordDialog = True;
     if (vncServerName[0] == '-')
       usage();
   }
