Skip to content

Commit

Permalink
Viewer: Unmention Sess. Mgr. if turbovnc.sessmgr=1
Browse files Browse the repository at this point in the history
  • Loading branch information
dcommander committed Jul 30, 2024
1 parent b6da714 commit 99d4512
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 22 deletions.
31 changes: 19 additions & 12 deletions java/com/turbovnc/rfb/Params.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2012-2018, 2020-2023 D. R. Commander. All Rights Reserved.
/* Copyright (C) 2012-2018, 2020-2024 D. R. Commander. All Rights Reserved.
* Copyright (C) 2011-2012, 2016 Brian P. Hinz
* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
* Copyright 2004-2005 Cendio AB.
Expand Down Expand Up @@ -755,15 +755,19 @@ public static void reset() {
public static BoolParameter extSSH =
new BoolParameter("ExtSSH",
"When using the Via or Tunnel parameters, use an external SSH client " +
"instead of the built-in SSH client. (The built-in SSH client is always " +
"used with the TurboVNC Session Manager.) The external client defaults " +
"to /usr/bin/ssh on Un*x and Mac systems and ssh.exe on Windows systems, " +
"but you can use the VNC_VIA_CMD and VNC_TUNNEL_CMD environment variables " +
"or the turbovnc.via and turbovnc.tunnel system properties to specify the " +
"instead of the built-in SSH client. The external client defaults to " +
"/usr/bin/ssh on Un*x and Mac systems and ssh.exe on Windows systems, but " +
"you can use the VNC_VIA_CMD and VNC_TUNNEL_CMD environment variables or " +
"the turbovnc.via and turbovnc.tunnel system properties to specify the " +
"exact command line to use when creating the tunnel. If one of those " +
"environment variables or system properties is set, then an external SSH " +
"client is automatically used. See the TurboVNC User's Guide for more " +
"details.", false);
"details.\n " +

(Utils.getBooleanProperty("turbovnc.sessmgr", true) ?
"When using the TurboVNC Session Manager, this parameter is effectively " +
"unset. (The built-in SSH client is always used with the TurboVNC " +
"Session Manager.)" : ""), false);

public static BoolParameter localUsernameLC =
new BoolParameter("LocalUsernameLC",
Expand Down Expand Up @@ -820,8 +824,9 @@ public static void reset() {
"only a username. The order of this list does not matter, since the " +
"server's preferred order is always used.\n " +

"When using the TurboVNC Session Manager, this parameter is effectively " +
"set to \"VNC\" unless the SessMgrAuto parameter is disabled.",
(Utils.getBooleanProperty("turbovnc.sessmgr", true) ?
"When using the TurboVNC Session Manager, this parameter is effectively " +
"set to \"VNC\" unless the SessMgrAuto parameter is disabled." : ""),
"X509Plain,X509Ident,X509Vnc,X509None,TLSPlain,TLSIdent,TLSVnc,TLSNone,VNC,Ident,Plain,UnixLogin,None");

public static BoolParameter sendLocalUsername =
Expand All @@ -833,10 +838,11 @@ public static void reset() {

public static BoolParameter sessMgrAuto =
new BoolParameter("SessMgrAuto",
Utils.getBooleanProperty("turbovnc.sessmgr", true) ?
"When using the TurboVNC Session Manager, the default behavior is to " +
"automatically enable OTP authentication and SSH tunneling. Disabling " +
"this parameter overrides that behavior and allows any security " +
"configuration to be used.", true);
"configuration to be used." : null, true);

public static StringParameter sshConfig =
new StringParameter("SSHConfig",
Expand Down Expand Up @@ -896,8 +902,9 @@ public static void reset() {
"indicate that username {user} (default = local username) should be used " +
"when authenticating with the SSH server.\n " +

"When using the TurboVNC Session Manager, this parameter is effectively " +
"set unless the SessMgrAuto parameter is disabled.", false);
(Utils.getBooleanProperty("turbovnc.sessmgr", true) ?
"When using the TurboVNC Session Manager, this parameter is effectively " +
"set unless the SessMgrAuto parameter is disabled." : ""), false);

public static StringParameter user =
new StringParameter("User",
Expand Down
21 changes: 11 additions & 10 deletions java/com/turbovnc/vncviewer/VncViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -504,16 +504,17 @@ public static void usage() {
"USAGE\n" +
"-----\n" +
"\n" +
"vncviewer [options/parameters] [host] [options/parameters]\n" +
"\n" +
"Connect to the specified TurboVNC host using the TurboVNC Session Manager,\n" +
"which uses the TurboVNC Viewer's built-in SSH client to remotely start a new\n" +
"TurboVNC session or to list all sessions running under your user account on the\n" +
"host, allowing you to choose a session to which to connect. The TurboVNC\n" +
"Session Manager requires the TurboVNC Server (v3.0 or later), and by default,\n" +
"it expects the TurboVNC Server to be installed under /opt/TurboVNC on the host.\n" +
"Refer to the TurboVNC User's Guide for more details.\n" +
"\n" +
(Utils.getBooleanProperty("turbovnc.sessmgr", true) ?
"vncviewer [options/parameters] [host] [options/parameters]\n" +
"\n" +
"Connect to the specified TurboVNC host using the TurboVNC Session Manager,\n" +
"which uses the TurboVNC Viewer's built-in SSH client to remotely start a new\n" +
"TurboVNC session or to list all sessions running under your user account on the\n" +
"host, allowing you to choose a session to which to connect. The TurboVNC\n" +
"Session Manager requires the TurboVNC Server (v3.0 or later), and by default,\n" +
"it expects the TurboVNC Server to be installed under /opt/TurboVNC on the host.\n" +
"Refer to the TurboVNC User's Guide for more details.\n" +
"\n" : "") +
"vncviewer [options/parameters] [host:displayNum] [options/parameters]\n" +
"vncviewer [options/parameters] [host::port] [options/parameters]\n" +
"\n" +
Expand Down

0 comments on commit 99d4512

Please sign in to comment.