home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BURKS 2
/
BURKS_AUG97.ISO
/
BURKS
/
LINUX
/
HOWTO
/
mini
/
lbx.txt
< prev
next >
Wrap
Text File
|
1997-07-07
|
14KB
|
357 lines
The LBX Mini-HOWTO
Paul D. Smith <psmith@BayNetworks.com>
v1.01, 23 Oct 1995
This document describes how to use Low-Bandwidth X (LBX): an
extension to the X distribution which provides better service for
running X applications over serial lines, wide-area networks, and
other low-bandwidth, high-latency transports.
1. Introduction
Low-Bandwidth X (LBX) attempts to recognize that in this day and age,
not everyone will be a fast LAN hop or two away from the system that
they are running their applications on.
The X protocol can generate an extraordinary amount of traffic,
especially for simple-seeming things such as creating new windows. As
anyone who has tried to use X over a dial-in modem at 14.4 or even
28.8 can attest, creating new X windows can involve an excruciating
wait.
LBX is fundamentally a compression and caching scheme designed to
minimize the amount of X traffic generated between two systems.
2. What's The Status Of LBX?
Currently the X Consortium is distributing an LBX snapshot with the
X11R6 distribution as a "Work In Progress". That means that it
probably has bugs, may not be extremely stable, and won't be
compatible with the final version of LBX.
Fortunately, there are *no* code changes needed to X clients to use
LBX, so, unless you are trying to write applications which somehow
explicitly interact with the LBX library, you don't have to worry
about the fact that the interface will change.
The instability of LBX is another matter; it is indeed not extremely
solid. You will have to judge for yourself whether the speed-up you
gain by using it is worth the instability it introduces.
Patches to LBX are being distributed with patches to X11R6, and
nowhere else (that I'm aware of). If you want to use LBX you should
be sure to get the latest version of X11R6 (for Linux users that's
currently XFree86 3.1.2).
3. Who Can Benefit From LBX?
If you use a modem to dial into a service provider, then run X
applications on remote machines with their DISPLAYs set to your local
machine (or vice versa), LBX will speed up that connection. Also if
you set DISPLAYs from systems across WANs (other countries, for
example) or other slow links, LBX can help.
4. Who Doesn't Need LBX?
LBX is useless, of course, if you're only running applications
locally, or if you're not running X at all :).
Also, if you're running on a fast LAN LBX won't be much help. Some
people say "if LBX cuts down on network traffic, wouldn't it be good
to use even on fast LANs?" It might be, if your goal is to reduce
network traffic. But if your goal is to get better response time LBX
probably isn't what you want. Although it does introduce caching and
compression, that comes at a cost on both ends (extra memory for
caching, and extra CPU for decompression). If your link is fairly
speedy LBX will probably result in an overall slowdown.
5. How Does LBX Work?
LBX works by introducing a "proxy server" at the client side, which
performs caching and compression. The X server knows that the client
is using a proxy server, and decompresses accordingly.
Here's a "normal" setup for remote X clients. In our discussion,
LOCAL is always the workstation sitting in front of you, whose monitor
you're looking at, and REMOTE is the remote workstation, where the
actual application is running.
REMOTE LOCAL
+-----+ +-----+
| APP |-\ Network +----------+ | |\
+-----+ \--------------------------->| X SERVER |=>| ||
+-----+ / (X Protocol) +----------+ +-----+\
| APP |-/ /_____//
+-----+
When using LBX, a proxy server (lbxproxy) is introduced on the remote
side, and the applications talk to that process instead of directly to
the LOCAL server. That process then performs the caching and
compression of X requests and forwards them. It looks like this:
REMOTE LOCAL
+-----+
+-----+ +-------+ Network +----------+ | |\
| APP |->| PROXY |----------------------------->| X SERVER |=>| ||
+-----+ +-------+ (LBX/X Protocol) +----------+ +-----+\
+-----+ / /_____//
| APP |--/
+-----+
Details on exactly what caching and compression LBX does is beyond the
scope of this document (and probably would be quickly out-of-date
anyway :).
6. What Do I Need To Use LBX?
You need an X server on your LOCAL system which has the LBX extension
compiled in. For Linux systems, XFree86 3.1.2 servers do not come
with LBX linked in. You will need to get the XFree86 Link Kit from
your friendly neighborhood XFree86 or Linux FTP site and relink your
server (this is quick and easy and doesn't take up too much room,
unlike rebuilding X from scratch).
You can use the xdpyinfo command to see if your server has the LBX
extension: run xdpyinfo and look at the list just under "number of
extensions"; you should see LBX listed there.
Next, you need to get an lbxproxy program compiled for the REMOTE
system. This is the tricky part. There is unfortunately no "broken
out" distribution of lbxproxy, so you will have to either (a) get and
build most of the standard X11R6 and workInProgress hierarchies, or
(b) find someplace to get a pre-compiled lbxproxy binary for your
system. The latter is much preferred of course :)
The lbxproxy is a single executable. There are no configuration
files, resource files, etc. associated with it.
7. What Don't I Need To Use LBX?
The REMOTE system *does not* need a new X server (as always, the
REMOTE system doesn't even need *any* X server running). Also, the
application you want to run *does not* need to be linked with any
special version of X11, or any special libraries; I regularly use
commercial X11R5 apps over LBX with no trouble.
You *do not* need root or other privileged access on the REMOTE
system; the lbxproxy process runs under your normal access
permissions. Further, you can run it right from your home directory:
it does not have to be installed anywhere.
8. How Do I Start LBX?
OK, here it is... after all that it's actually quite simple. Replace
LOCAL and REMOTE below with the hostnames of your local workstation
and remote system, respectively (don't get them mixed up! :)
On LOCAL:
1. Start your X server.
2. Use "xhost +REMOTE" to give the remote system access to your X
display, if necessary.
On REMOTE:
1. Start lbxproxy and tell it to forward to the LOCAL X server, like
this:
$ lbxproxy -display LOCAL:0 :1 &
(this tells lbxproxy to use display :1; if you have >1 display
already you can use :2 or whatever instead). You also probably
want to redirect stdout and stderr; depending on how your lbxproxy
was compiled it might generate some debugging output.
2. Set your DISPLAY environment variable to point to lbxproxy:
$ DISPLAY=:1
$ export DISPLAY
Or, if you use csh or clones:
% setenv DISPLAY :1
3. Start your X applications!
That's it; all X apps that are started up pointing to :1 will use LBX.
Note in theory there's no reason you couldn't also start X apps
pointing to LOCAL:0 and have both running at the same time, but in
practice I've found LBX to be unstable in that configuration
[[although testing on this was done with XFree86 3.1.1]]. All or
nothing is safest.
9. Problems.
Here're some common problems:
Q1) I tried the above, but nothing happens/X server crashes/app
crashes/lbxproxy crashes...
A) There's a bug in LBX released with X11R6 p11 (XFree86 3.1.1) where
lbxproxy must be one of the first 7 or 8 clients to attach to your
X server, or LBX will corrupt memory in your server causing