This page is a part of XLitePro online Help Manual.
|9. Using XServer||< previous | content | next >|
Low Bandwidth X (LBX) is a network-transparent protocol for running X Window System applications over transport channels whose bandwidth and latency are significantly worse than that used in local area net works.
The design centre for LBX is to use a proxy as an intermediary between the client and server, so that the low bandwidth/high latency communication occurs between the proxy and server. The proxy re-encodes and compresses requests, events, replies and errors, as well as the resulting data stream to reduce the volume of data that must be sent over the wire. Additionally, the proxy can cache information from the server to provide low-latency replies to clients. This reply generation by the proxy is known as short-circuiting. A proxy can handle multiple clients for a given server, but does not prevent clients from connecting directly to the server. The design allows the proxy to multiplex multiple clients into a single data stream to the server.
LBX employs several different compression and short-circuiting methods. Use of these methods is negotiable, and in some cases, the algorithm used by a given method is negotiable as well. LBX also provides for negotiation of extensions to LBX.
Applications that would like to take advantage of the Low Bandwidth extension to X (LBX) must make their connections to an lbxproxy. These applications need to know nothing about LBX, they simply connect to the lbxproxy as if it were a regular server. The lbxproxy accepts client connections, multiplexes them over a single connection to the X server, and performs various optimizations on the X protocol to make it faster over low bandwidth and/or high latency connections.
With regard to authentication/authorization, lbxproxy simply passes along to the server the credentials presented by the client. Since X clients will connect to lbxproxy, it is important that the user's .Xauthority file contain entries with valid keys associated with the network ID of the proxy. lbxproxy does not get involved with how these entries are added to the .Xauthority file. The user is responsible for setting it up.
Synopsis of lbxproxy:
lbxproxy [:<display>] [option]
:<display> is specified, the proxy will use the given display port when listening for connections. The display port is an offset from port 6000, identical to the way in which regular X display connections are specified. If no port is specified on the command line option, lbxproxy will default to port 63. If the port that the proxy tries to listen on is in use, the proxy will exit with an error message.
The lbxproxy program has various options, all of which are optional. It is recommended to use them with their defaults.
-display dpy option specifies the address of the X server supporting the LBX extension. If this option is not specified, the display is obtained by the DISPLAY environment variable.
See lbxproxy manual for more details.
Suppose that your PC has the network name xtp. Run XServer, then run Telnet and connect to remote machine supporting LBX. After logging in, you can launch lbxproxy and then xterm in the main Telnet window by using the following commands (
$ is a prompt sign):
$ lbxproxy :62 -display xtp:0 & $ xterm -display :62 &
or (with setting the DISPLAY environment variable and using it by default):
$ DISPLAY= xtp:0; export DISPLAY $ lbxproxy :62 & $ xterm -display :62 &
After that xterm will work with display :62.0 (corresponding to port 6062) and will use LBX protocol. In the xterm window, you can run the
echo $DISPLAY command resulting in :62.0 (for our example).
If the port that the proxy tries to listen on (6062) is in use, the proxy will exit with an error message. To locate available proxy services, you can use the xfindproxy program communicating with a proxy manager (see About xfindproxy below).
Terminating XSession terminates lbxproxy.
You can launch more than one lbxproxy-xterm pairs, each with different displays available (e.g., :61.0 in addition to above).
Note: to run lbxproxy under Solaris, you must have rights as root.
The Startup utility automatically runs XSession and then prompts you to specify data for connection and commands for execution. You can connect to remote machine supporting LBX and start up lbxproxy-xterm pair by entering in the Command field and sequentially executing the following commands (e.g., from xtp:0 and for port 6061):
/usr/X11R6/bin/lbxproxy :61 -display xtp:0 /usr/X11R6/bin/xterm -display :61
Note that you should enter the full file specification to execute such commands. (You can use
locate lbxproxy or
which lbxproxy commands to determine the path on the remote machine.)
–zlevel 6 is the most optimal option you can set for the Zlib compression level used by lbxproxy for stream compression.
xfindproxy is a program used to locate available proxy services. It utilizes the Proxy Management Protocol to communicate with a proxy manager. The proxy manager keeps track of all available proxy services, starts new proxies when necessary, and makes sure that proxies are shared whenever possible (see About proxymngr below).
Synopsis of the xfindproxy:
xfindproxy -manager managerAddr -name serviceName -server serverAddr [-auth] [-host hostAddr] [-options opts]
-manager argument is required, and it specifies the network address of the proxy manager. The format of the address is a standard ICE network id (e.g. "tcp/a.b.c:6500").
-name argument is required, and it specifies the name for the desired proxy service (e.g. "LBX"). The name is case insensitive.
-server argument is also required, and it specifies the address of the target server. The format of the address is specific to the proxy service specified with the
-name argument. For example, for a proxy service of "LBX", the address would be an X display address (e.g. "xtp:0").
-auth argument is optional. If specified, xfindproxy will read 2 lines from standard input. The first line is an authorization/authentication name. The second line is the authorization/authentication data in hex format (the same format used by xauth). xfindproxy will pass this auth data to the proxy, and in most cases, will be used by the proxy to authorize/authenticate itself to the target server.
-host argument is optional. If xfindproxy starts a new proxy service, it will pass the host specified. The proxy may choose to restrict all connections to this host. In the event that xfindproxy locates an already existing proxy, the host will be passed, but the semantics of how the proxy uses this host are undefined.
-options argument is optional. If xfindproxy starts a new proxy service, it will pass any options specified. The semantics of the options are specific to each proxy server. In the event that xfindproxy locates an already existing proxy, the options will be passed, but the semantics of how the proxy uses these options are undefined.
If xfindproxy is successful in obtaining a proxy address, it will print it to stdout. The format of the proxy address is specific to the proxy service being used. For example, for a proxy service of "LBX", the proxy address would be the X display address of the proxy (e.g. "a.b.c:62").
If xfindproxy is unsuccessful in obtaining a proxy address, it will print an error to stderr.
See xfindproxy manual for more details.
Suppose that your PC has the network name xtp (with XServer running), and the network address of the proxy is "a.b.c:6500". Execute the following command (in Telnet or Startup as described above):
xfindproxy -manager a.b.c:6500 -name lbx -server xtp:0
For a proxy service of "LBX", the proxy address would be the X display address of the proxy (e.g., "a.b.c:62") printed to stdout. (See also Proxy manager details below.)
After that you can execute the following command (see Running xterm from Telnet above):
xterm -display :62 &
Note that XSession must be running in your PC when you execute proxymngr and xfindproxy (xtp:0 in commands above is the address of the target X server).
Note: terminating XSession terminates lbxproxy.
The proxy manager (proxymngr) is responsible for resolving requests from xfindproxy (and other similar clients), starting new proxies when appropriate, and keeping track of all of the available proxy services. The proxy manager strives to reuse existing proxies whenever possible.
There are two types of proxies that the proxy manager deals with, "managed" and "unmanaged" proxies. A managed proxy is a proxy that is started "on demand'' by the proxy manager. An unmanaged proxy, on the other hand, is started either at system boot time, or manually by a system administrator. The proxy manager is made aware of its existence, but no attempt is made by the proxy manager to start unmanaged proxies.
Synopsis of proxymngr:
proxymngr [-config filename] [-timeout seconds] [-retries #] [-verbose]
The command line options that can be specified to proxymngr are:
Used to override the default proxymngr config-file. See Proxy Manager Config-File below for more details about the config-file.
Sets the number of seconds between attempts made by the proxy manager to find an unmanaged proxy. The default is 10.
Sets the maximum number of retries made by the proxy manager to find an unmanaged proxy. The default is 3.
Causes various debugging and tracing records to be displayed as requests are received and proxies are started.
The proxy manager maintains a local configuration file describing the proxy services available. This configuration file is installed in /usr/X11R6/lib/X11/proxymngr/pmconfig during the installation of proxymngr. The location of the configuration file can be overwritten using the
-config command line option.
Aside from lines starting with an exclamation point for comments, each line of the configuration file describes either an unmanaged or managed proxy service.
For unmanaged proxies, the format is:
<service-name> unmanaged <proxy-address>
Is the name of the unmanaged proxy service, and must not contain any spaces, for example "XFWP''.
service-name is case insensitive.
Is the network address of the unmanaged proxy. The format of the address is specific to the service-name. For example, for the "XFWP'' service, the proxy-address might be "firewall.x.org:100''.
If there is more than one entry in the config-file with the same unmanaged service-name, the proxy manager will try to use the proxies in the order presented in the config-file.
xfwp unmanaged firewall:4444
For managed proxies, the format is:
<service-name> managed <command-to-start-proxy>
Is the name of the managed proxy service, and must not contain any spaces, for example "LBX''.
service-name is case insensitive.
Is the command executed by the proxy manager to start a new instance of the proxy. If
command-to-start-proxy contains spaces, the complete command should be surrounded by single quotes. If desired,
command-to-start-proxy can be used to start a proxy on a remote machine.
lbx managed /usr/X11R6/bin/lbxproxy
When the proxy manager gets a request from xfindproxy (or another similar client), its course of action will depend on the service-name in question.
For a managed proxy service, the proxy manager will find out if any of the already running proxies for this service can handle a new request. If not, the proxy manager will attempt to start up a new instance of the proxy (using the
command-to-start-proxy found in the config-file). If that fails, an error will be returned to the caller.
For an unmanaged proxy service, the proxy manager will look in the config-file to find all unmanaged proxies for this service. If there is more than one entry in the config-file with the same unmanaged service-name, the proxy manager will try to use the proxies in the order presented in the config-file. If none of the unmanaged proxies can satisfy the request, the proxy manager will timeout for a configurable amount of time (specified by
-timeout or default of 10) and reattempt to find an unmanaged proxy willing to satisfy the request. The number of retries can be specified by the
-retries argument, or a default of 3 will be used. If the retries fail, the proxy manager has no choice but to return an error to the caller (since the proxy manager cannot start unmanaged proxy services).
See proxymngr manual for more details.
To run proxymngr, check its config-file and execute the following command with options you need:
Note: to run proxymngr, you must have rights as root.
|9. Using XServer||< previous | content | next >|
|Copyright © 1999 - 2009 LabtamTM Inc.|