| WindX & Javx |
|
| Overview | The
NtHost/NTSlave Client-Server environment consists of two
distinct elements:
On the host computer, the program *nthost is run to monitor incoming requests from client PCs and to initiate new processes to service these requests. Whenever a new request comes it will launch a new instance of ProvideX or PxPlus which the workstation will ultimately connect to. On the client computer system the program *ntslave begins the initial connection to the host by requesting a new session to be started. Once the session is started, *nthost will send back the TCP/IP port number to the new process. This port number is used by *ntslave which connects to this process then passes control to WindX to handle all of the terminal and GUI interactions. In order for the initial connection between *nthost and *ntslave to be established, *ntslave must know the port number that *nthost is monitoring. By default, this is port number 10000 but it can be changed in the command line used to start both programs. As *nthost initiates new processes, it assigns new port numbers in increments starting with the port number one higher than the *nthost port assignment. By default, up to a maximum of 1000 sequential port numbers can be assigned. |
||||||||||
| * Note * | JavX has a built-in NTSlave interface thus can be used to connect to NTHOST directly. | ||||||||||
| *NTHost setup | Microsoft
Windows: To run *nthost on a Windows PC, set up a shortcut with the following command line:
There are three optional arguments that can be supplied: the port number that *nthost is to monitor (and the clients to connect to), the maximum port number to use for connections, and the ability to request using the TCP/IP KEEPALIVE functionality. These can be specified in the command line as program arguments. Example:
These arguments direct *nthost to monitor socket 10000 and assign spawned sessions to port numbers 10001 through 11999. If no arguments are specified, then *nthost monitors port 10000 and assigns port numbers 10001 through 10999. Each session employs the TCP/IP KEEPALIVE functionality to periodically send commands to a connection to ensure that it is still active. To run *nthost, simply launch this shortcut or place it in the PC's windows 'Startup' folder to have it run each time the machine is restarted. During the software installation process, the Windows installer will create a short cut for NTHOST automatically. Running as a Windows Service: If you want to run *nthost as an NT service, then you can use the program srvany.exe that comes with the NT Resource kit from Microsoft. Once srvany.exe is installed, use instsrv.exe to define your service to NT. (See the Microsoft NT Resource kit for additional details on this process). Unix/Linux setup: Setting up *nthost on UNIX is a little more complicated and involves changing the system process 'inittab'. This should only be done by someone who is knowledgeable in UNIX. To run *nthost as a UNIX service, add a line similar to the following to the system 'inittab' file (usually in the directory /etc/):
Where:
There are three optional parameters that may be specified after the umask value. They are:
|
||||||||||
| * Note * | On Unix, it is important to include the input/output redirection to /dev/null on your command line. If omitted the Nthost process itself will occupy a user slot on your system thus reducing the number of potential active users your system can run. | ||||||||||
| Userid
field on Unix/Linux When the *nthost launches new sessions, it does so via an 'su' command. This ensures that applications do not run as root (which maintains system security). Since the host program will be spawned from the 'inittab', it will be running with full 'root' privileges. This means that the host is capable of running any application, and can utilize 'su' to launch an application under another user ID. Special care must be taken when using 'su'. The user ID chosen must be valid and the password must not have expired. If applications refuse to launch, then it is likely that the password for the user ID has expired, or there is an administrative lock on the account. The user account should not launch anything automatically via its profile since the new session picks up the characteristics of the user id being used. |
|||||||||||
| * Note * | When running under an OS such as IBM AIX, characteristics such as umask in the user's account setup may need to be modified as they will override the command line arguments. Another potential problem is the number of processes a single user may run. Since all applications are spawned as this user, the kernel may need to be re-tuned to increase the number of processes per user. | ||||||||||
| *NTSlave setup | Microsoft
Windows Workstation setup: Assuming c:\pxplus is where PxPlus is installed, the *ntslave client command line would appear as follows:
Where:
The *ntslave program will connect to any server running *nthost, whether it is Windows or UNIX. This makes it possible to have many shortcuts connecting to different servers, all running at the same time. |
||||||||||