Using X11 forwarding to run programs remotely via NSH
X11 (also known as X Windows) is a graphical windowing system used over network connections rather than on an attached display device. You can use X11 forwarding to run programs remotely through BMC BladeLogic Network Shell (NSH) or the nexec utility.
The nexec utility automatically configures the RSCD agent to capture X11 traffic by resetting the DISPLAY variable and tunneling traffic through the RSCD Agent to the server that initiated the nexec call. This allows you to securely tunnel X11 traffic using the same security features as other NSH utilities.
This page discusses the following aspects of X11 forwarding:
- Prerequisites for end-to-end X11 forwarding
- Examples of nexec commands for X11 forwarding
- Closing an exported X application window
Prerequisites for end-to-end X11 forwarding
For X11 forwarding to work end-to-end using the RSCD Agent and NSH or the nexec utility, ensure that the following prerequisites are met:
- The client machine must have either NSH or nexec installed.
- The target machine must have an RSCD Agent running, along with X11 runnable applications (such as xterm, xclock, or xeyes).
- The machine on which you want to export the user interface of an X application must have an X display server (such as Hummingbird Exceed®) installed.
X11 forwarding must be enabled for the RSCD Agent on the target machine.
By default, X11 forwarding is turned on. You can use the x11_fwd option in the rscd entry in the RSCD Agent's secure file to turn off X11 forwarding or to turn it back on. For more information, see Configuring-the-secure-file.
Examples of nexec commands for X11 forwarding
The following examples illustrate common scenarios in the use of X11 forwarding:
Closing an exported X application window
To close the exported X application window, use the close button of the window or send a control-C to the nexec application running on the client machine. This will ensure that the X11 tunnel created through RSCD is closed.