Knowledge Base
Searching in : Article
ID: AR07E00479
Applies to: NX Software
Added on: 2007-07-19
Last Update: 2013-10-14
Print this article

How to use a different graphical client to issue NX dialog boxes and messages with NX 3.5.0

The nxcomp library since 1.5.0 is able to check a number of environment variables to determine the location of the relevant NX directories.

In particular, nxcomp uses the $NX_CLIENT environment variable to retrieve the full path to the nxclient executable. If the variable is not set, the nxclient executable will be run assuming that the program is in the system path. This can be useful on platforms like Windows and the Mac where nxclient is located in a different directory compared to the other programs, to make easier for the user to execute the program from the shell.

As stated in the Changelog of nxcomp-2.0.0-4:

The path to the client executable is now assumed to be in the
NX_CLIENT environment. If the variable is not set, the proxy
will guess the location based on the target platform.

You may set the NX_CLIENT environment variable to run either a nxclient binary placed in a different location from the default one or  any another program, until this program is able to accept all the parameters passed to NX Client.

If you want to use an existing program, as for example xmessage or Xdialog, you need to create a wrapper script and set the NX_CLIENT environment variable to point at this script.

For a complete list of parameters  accepted by NX Client you may refer at the usage, by running the nxclient --help command.

Since nxagent uses the nxcomp library to display dialog boxes, as for example the disconnect/terminate message, these dialog boxes will be issued by the program specified in the NX_CLIENT environment variable, when set.

Furthermore, the NX Server administrator can specify the command that has to be run whenever there is the need to launch the client by enabling the CommandClient key in the node configuration file, namely /usr/NX/etc/node.cfg.

When this key is enabled, NX Node sets the NX_CLIENT variable when running the nxagent process. Also in this case the application specified by the CommandClient key has to accept all parameters passed to NX Client, otherwise a wrapper script is needed.

Furthermore, NX Node will run the command specified in this key every time it needs to launch the client.

Note also that, in case of session shadowing and desktop sharing, the node tries to run nxclient with the --monitor option to start the NX Shadow Monitor once the user is connected to the master session or to the local display. If the program specified in the CommandClient key doesn't support the --monitor option, the Shadow Monitor will be not available.