Starting Multiple X Clients from a Single Reflection X 14.x Command Line

  • 7021773
  • 21-Mar-2002
  • 25-Mar-2018

Environment

Reflection X version 14.x
Reflection Suite for X version 14.x

Situation

This technical note describes several methods for starting multiple X clients from a single Reflection X 14.x connection template command line.

Resolution

Starting X Clients

Several methods can be used to start X clients from a single Reflection X command line:

Select the method that works best in your environment and for the X clients you will be accessing.

Starting Multiple X Clients Using the -Display Startup Parameter

Most of the default Reflection X connection templates use the -display (-d) startup parameter to notify the X client of the PC's IP address and display number. The syntax provided in these templates can be customized to start multiple X clients, as long as each of the X clients support the -display startup parameter.

(If any of the X clients you wish to start do not support the -display parameter, see Starting Multiple X Clients by First Setting the DISPLAY Environment Variable.)

To start multiple X clients using this method, follow the steps below.

Note: When using this method, you can terminate individual X client connections without affecting the other X clients.

  1. Start Reflection X.
  2. In the Reflection X Manager, expand the Client Templates and Client Startup trees, and select the Reflection X template that matches your host type.
  3. Enter the host name and user name.
  4. In the Command field, enclose the command string used to start each X client in parentheses. Separate the command strings by semicolons.

Syntax: (<path/X client1> <parameters> &) ; (<path/X client2> <parameters> &)

The following sample command line connects to a UNIX host and starts xterm, xclock, and calculator.

(/usr/bin/X11/xterm -fn 6x13 -sb -ls -display %IP#% -name %T% &) ;
(/usr/bin/X11/xclock -display %IP#% &) ; (/usr/bin/X11/calctool -display
%IP#% &)
  1. Click Connect.

Starting Multiple X Clients by First Setting the DISPLAY Environment Variable

This method sets the DISPLAY environment variable first, making the variable available to all X clients, and then starts each indicated X client.

Note: When using this method, you can terminate any of the X client connections without affecting the other connections.

Follow the appropriate steps for your shell environment.

For Bourne (sh), Korn (ksh), and Bash Shell

If you are using the Bourne (sh), Korn (ksh), or Bash shell, follow these steps.

  1. Start Reflection X.
  2. In the Reflection X Manager, expand the Client Templates and Client Startup trees, and select the Reflection X template that matches your host type.
  3. Enter the host name and user name.
  4. In the Command field, use the following syntax:

Syntax: DISPLAY=%IP#%;export DISPLAY;(<X client1> & <X client2> &)

The following sample command line connects to a UNIX host, starts the Motif windows manager, xterm, xclock, and Netscape.

DISPLAY=%IP#%;export DISPLAY;(mwm & xterm & xclock & netscape &)
  1. Click Connect.

For C Shell (csh)

If you are using the C (csh) shell, follow these steps.

  1. Start Reflection X.
  2. In the Reflection X Manager, expand the Client Templates and Client Startup trees, and select the Reflection X template that matches your host type.
  3. Enter the host name and user name.
  4. In the Command field, use the following syntax:

Syntax: setenv DISPLAY %IP#%;(<X client1> & <X client2> &)

The following sample command line connects to a UNIX host, starts the Motif windows manager, Xterm, Xclock, and Netscape.

setenv DISPLAY %IP#%;(mwm & xterm & xclock & netscape &)
  1. Click Connect.

Starting Multiple X Clients from an Xterm Using the -e Startup Parameter

Follow the steps below to create a Reflection X connection template that starts both an xterm and an X client on connection using the -e startup parameter. This method will work with any X client that supports the -e startup parameter.

Note the following:

  • The default connection method in Reflection 11.x or higher is rexec. Since rexec does not support the -e switch, if you want to use the -e startup parameter, select another connection method, such as telnet.
  • When using this method, terminating the xterm connections will also close the X client connection.
  1. Start Reflection X.
  2. In the Reflection X Manager, expand the Client Templates and Client Startup trees, and select the Reflection X template that matches your host type.
  3. Enter the host name and user name.
  4. In the Command field, at the end of the command, before the "&)" insert -e and the X client startup command.

Syntax: (<path/xterm> <parameters> -e <X client> &)

The following sample command line connects to a Sun host and starts an xterm, then opens xclock from the xterm.

(/usr/bin/X11/xterm -fn 6x13 -sb -ls -display %IP#% -name %T% -e xclock &)
  1. Click Connect.

Additional Information

Legacy KB ID

This document was originally published as Attachmate Technical Note 1639.