HP 3000 Manuals

Executing the X Client [ HP Motif/iX Programmer's Supplement ] MPE/iX 5.0 Documentation


HP Motif/iX Programmer's Supplement

Executing the X Client 
[REV BEG]

Once your X client has been successfully compiled and linked, it can be
executed for testing and debugging purposes.  To execute load and execute
your X client, you can either:

   1.  type the name of the application from the POSIX.2 shell.

   2.  use the RUN command to run the program from the MPE/iX command
       interpreter.

You must also specify the X display to which your X client will be
connected.  The display specification can be accomplished by using
command line arguments or by setting the DISPLAY environment or command
interpreter variable.[REV END]
[REV BEG]

Specifying the display when running the program 

You can either run the application from the POSIX.2 shell or from the
MPE/iX command interpreter.


NOTE Substitute the name of your display for mydisp in any of the commands below.
Below is an example running the application in the POSIX.2 shell and specifying the display as an argument to the application: $PIZZA -display mydisp:0.0 The POSIX.2 shell passes the display parameter to the application. Because the X client uses X toolkit intrinsics, the standard -display option is extracted and used during the connection to the display server. Following is an example of specifying the display using the INFO= option of the RUN command: :RUN PIZZA; INFO="-display mydisp:0.0" The mydisp:0.0 specifies that the X client is to connect to an X display server on a machine whose node name is mydisp. C/iX passes the INFO= string to the program. Because the X client uses X toolkit intrinsics, the standard - display option is extracted and used during the connection to the display server.
NOTE If your X client does not use X toolkit intrinsics or OSF/Motif widgets (only Xlib routines), the previous example may not work. An X client that uses only Xlib calls can access display information from either the CI variable DISPLAY (described below) or from its own command line display specification.
[REV END] Using a CI variable or shell environment variable You can also specify the display to be used by setting a CI variable or shell environment variable prior to executing your X client. Once the DISPLAY variable has been defined, X clients that are executed without specifying the [REV BEG]-display parameter[REV END] use the value of DISPLAY to determine which display to use. [REV BEG] The DISPLAY variable can be set from either the POSIX.2 shell or from the MPE/iX command interpreter.[REV END] To set it from the POSIX.2 shell: $export DISPLAY=mydisp:0.0 $PIZZA To set the MPE/iX command interpreter variable: :SETVAR DISPLAY "mydisp:0.0" :RUN PIZZA These examples causes the PIZZA X client to display on mydisp.
NOTE If you set the environment variable from the POSIX.2 shell, you can exit the shell and this environment variable will be inherited by the MPE/iX command interpreter. Thus, your application will then be able to run from the command interpreter.


MPE/iX 5.0 Documentation