The LBX Mini-HOWTO <author>Paul D. Smith, <tt><htmlurl url="mailto:psmith@baynetworks.com" name="psmith@baynetworks.com"></tt> <date>v1.04, 11 Dec 1997 <trans>伊佐治 哲, <tt><htmlurl url="mailto:isaji@mxu.meshnet.or.jp" name="isaji@mxu.meshnet.or.jp"></tt> <!-- 参照HOWTO 「Remote X Apps Mini-HOWTO」 --> <abstract> <!-- LBX (Low Bandwidth X) is an X server extension which performs compression on the X protocol. It is meant to be used in conjunction with X applications and an X server which are separated by a slow network connection, to improve display and response time. --> LBX(Low Bandwidth X:低バンド幅 X)はXプロトコルを圧縮するためのXサーバ の拡張機能です。遅いネットワーク上でやりとりされるXアプリケーションと Xサーバの、表示/応答時間を改善するのに使われます。 </abstract> <toc> <sect>イントロダクション <!-- Introduction --> <p> <!-- <em/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. --> <em/Low-Bandwidth X/ (LBX)は高速LANを使っていない、あるいはアプリケーション を起動しているシステムから2台以下のマシンを経由(hop)して使える場所にいる人 ばかりではないというような現状に対処しようとするものです。 <!-- hop = 飛行(距離)--> <!-- 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 28.8 or even higher can attest, creating new X windows can involve an excruciating wait. --> Xプロトコルは非常に膨大なトラフィックをつくり出すことがあります。特に新 しいウィンドウを開くといった簡単なことでもトラフィックの量はかなりあり ます。28.8モデム(あるいはそれ以上)のダイアルインモデムでXを使おうとした ユーザーならわかるように、Xセッションの確立には非常に時間がかかります。 <!-- LBX is fundamentally a compression and caching scheme designed to minimize the amount of X traffic generated between two systems. --> LBXは基本的に2つのシステム間でやりとりされるXアプリケーションのトラフィック 量を最小化するように設計された圧縮およびキャッシングの機能を持っています。 <sect>LBXについて <!-- What's The Status Of LBX? --> <p> <!-- As of the X Consortium's release of X11R6.3 in December, 1996, LBX is a full extension to the X protocol. For XFree86 folks, that's XFree86 version 3.3. --> Xコンソーシアムの X11R6.3リリース(1996年12月)において、LBXはXプロトコル に組み込まれました。XFree86に関してはXFree86 バージョン3.3で組み込まれてい ます。 <sect>LBXが役立つケース <!-- Who Can Benefit From LBX? --> <p> <!-- 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. --> モデムを使ってプロバイダにダイアルインしている場合は、環境変数DISPLAYを ローカルマシンに設定してリモートマシン上のXアプリケーションを起動します (逆ももちろん可能です)。LBXはこの時の接続を高速にしてくれます。 DISPLAY変数をWAN外部などの遅いリンク先のシステム(例えば外国など)に設定して いる場合も、LBXが役立ちます。 <sect>LBXが不要なケース <!-- Who Doesn't Need LBX? --> <p> <!-- LBX is useless, of course, if you're only running applications locally, or if you're not running X at all. --> ローカル(自マシン)でアプリケーションを起動したりXを使わない場合はLBXでは かえって不便です。 <!-- 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. --> また高速LAN上でアプリケーションを使う場合もLBXは十分役立つとは言えませ ん。ある人は「もしLBXがネットワークトラフィックを少なくしてくれるなら 、高速LAN上でもLBXは便利なのでは?」と言います。もし目指すものがネットワーク トラフィックを減らすことだけならきっとそうでしょう。しかし目指すもの が応答時間を良くすることだけなら、LBXはおそらく役に立ちません。LBXは キャッシュと圧縮を導入していますが、そのために「キャッシュの<bf/外部メモリ/、 非圧縮のための<bf/外部CPU/」に負担をかけているのです(<em/訳注:/キャッシュに 使われる余分なメモリと伸長のための余分なCPU 時間)。そのためリンクが速いなら LBXは通信速度を結果的に下げてしまうのです。 <sect>LBXはどのような動作をするか? <!-- How Does LBX Work?--> <p> <!-- LBX works by introducing a <em/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. --> LBXはクライアント側(訳注:REMOTE側。アプリケーションを起動するほうです) の<em/プロキシサーバ/(キャッシュと圧縮を行うサーバ)を導入して動作させます。 Xサーバは、クライアントがプロキシサーバを使ってい ることを認識して、それに応じて展開(decompress)します。 <p> <!-- 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. --> リモートXクライアントの通常セットアップについて。 ここで&dquot;LOCAL&dquot;はあなたが使っているモニター が接続されているワークステーションで、REMOTEは実際のアプリケーション が起動されているリモートワークステーションです。 <tscreen><code> LBXを使っていない状態: REMOTE LOCAL +-----+ +-----+ | APP |-\ Network +----------+ | |\ +-----+ \--------------------------->| X SERVER |=>| || +-----+ / (X Protocol) +----------+ +-----+\ | APP |-/ /_____// +-----+ </code></tscreen> 一方、 <!-- When using LBX, a proxy server (<tt/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: --> LBXを起動しているとプロキシサーバ(<tt/lbxproxy/)がリモート側に導入され、 アプリケーションは LOCALサーバと直接通信する代わりにそのプロセス(リモート側 のプロキシ)と通信します。そしてそのプロセスがXリクエストの圧縮と転送を 行います。これらは以下の図のようになります: <tscreen><code> LBXを使っている状態: REMOTE LOCAL +-----+ +-----+ +-------+ Network +----------+ | |\ | APP |->| PROXY |----------------------------->| X SERVER |=>| || +-----+ +-------+ (LBX/X Protocol) +----------+ +-----+\ +-----+ / /_____// | APP |--/ +-----+ </code></tscreen> <!-- Details on exactly what caching and compression LBX does is beyond the scope of this document. --> LBXが行っているキャッシングと圧縮についての詳細はこのドキュメントでは 扱いません。 <sect>LBXを使うために必要なもの <!-- What Do I Need To Use LBX? --> <p> <!-- You need an X server on your LOCAL system which has the LBX extension compiled in. Unless you explicitly told it not to when building it, X11R6.3 servers automatically enable LBX. Also, all XFree86 3.3 servers have LBX enabled by default. --> LOCALシステム上にのXサーバがLBX拡張機能付きでコンパイル されている必要があります。構築するときに特に指定しない限りX11R6.3のサーバでは 自動的にLBXが使えるようになっています。またXFree86 3.3サーバではデフォルトで LBXが使えます。 <!-- You can use the <tt/xdpyinfo/ command to see if your server has the LBX extension: run <tt/xdpyinfo/ and look at the list just under "number of extensions"; you should see "LBX" listed there. --> <tt/xdpyinfo/コマンドを使ってサーバがLBXをサポートしているかどうか確認でき ます。<tt/xdpyinfo/と実行して&dquot;number of extensions&dquot;でリストされ ている項目を見れば&dquot;LBX&dquot;がのっているでしょう。 <!-- Next, you need to get an <tt/lbxproxy/ program compiled for the REMOTE system. This is the tricky part. If the remote system is not the same type as your local system, the <tt/lbxproxy/ on your local system will do you no good, of course. --> 次にリモート(REMOTE)システム用の<tt/lbxproxy/プログラムが必要です。 これはテクニカルなことで、もしリモートシステムがローカルシステムと同じタイプ でなければ当然<tt/lbxproxy/(ローカルシステム)は使えません(no good)。 <!-- There is unfortunately no "broken out" distribution of <tt/lbxproxy/, so you will have to either (a) get and build most, if not all, of X11R6.3 for the remote system, or (b) find someplace to get a pre-compiled <tt/lbxproxy/ binary for your system. The latter is much simpler of course. --> <tt/lbxproxy/の"broken out"ディストリビューションは残念ながらありません。 そこで <verb> (a)リモートシステム用X11R6.3を入手して構築する。 (b)あなたのシステムにあったプレコンパイルされた<tt/lbxproxy/バイナリ を見つけてくる。 </verb> のどちらかをする必要があります。 もちろん後者が一番手っ取り早いでしょう。 <!-- The <tt/lbxproxy/ is simply a single executable. There are no configuration files, resource files, etc. associated with it. --> <tt/lbxproxy/は単体で実行可能です。<tt/lbxproxy/用の設定ファイル、リソース等 はいりません。 <sect>LBXを使うとき不用なもの <!-- What Don't I Need To Use LBX? --> <p> <!-- The REMOTE system <bf/does not/ need a new X server (as always, the REMOTE system doesn't need <em/any/ X server running). --> REMOTEシステム側では新しいXサーバは<bf/いりません/(同様にXサーバが走っている 必要もありません)。 <!-- The application you want to run <bf/does not/ need to be linked with any special version of X, or any special libraries; I regularly use commercial X11R5 apps over LBX with no trouble. --> 実行したいアプリケーションもXの特定のバージョンやライブラリにリンクされている 必要はありません。私は定期的にLBXで商用のX11R5アプリケーション使って いますが問題ありませんでした。 <!-- You <bf/do not/ need root or other privileged access on the REMOTE system; the <tt/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. --> rootである必要も、REMOTEシステムへの特別なアクセスも<bf/必要ありません/。 <tt/lbxproxy/プロセスは通常のアクセスパーミッションで実行します。さらに ホームディレクトリからでも正しく実行できます(インストールするものは何も ありません)。 <sect>LBXはどのようにスタートされるか <!-- How Do I Start LBX? --> <p> <!-- 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!) --> OK、ここまで来れば実行するのはいたって簡単です。以下の文章で LOCAL と REMOTEをそれぞれローカルワークステーションとリモートシステムの名前に 置き換えて話しをすすめます(混同しないように!)。 LOCAL側: <enum> <item> <!-- Start your X server. --> Xサーバをスタートします。 <item> <!-- Tell your X server that the remote system is allowed access. Using the host-list method, type <tt/xhost +REMOTE/. If you use <tt/xauth/ you may need to do more than this; see the <em/xauth(1)/ man page for more information. --> リモートシステム側でアクセスが許可されているかをXサーバで確認します。 ホストリスト(host-list)法を使って、<tt/xhost +REMOTE/と入力して下さい。 もし<tt/xauth/を使っているならもう少し作業する必要があります (詳しくは<em/xauth(1)/ manページを見て下さい)。 <!-- You should consult the <url url="http://www.xs4all.nl/~zweije/xauth.html" name="Remote X Apps Mini-HOWTO"> if you're not familiar with remote X access permission setup. --> もしリモートXアクセスのパーミッション設定についてよくわからない場合は <url url="http://www.xs4all.nl/~zweije/xauth.html" name="Remote X Apps Mini-HOWTO">を参照しましょう。 </enum> REMOTE側: <enum> <item> <!-- Start <tt/lbxproxy/ and tell it to forward to the LOCAL X server, like this:--><tt/lbxproxy/をスタートさせて、以下のようにLOCAL X サーバへ フォワードさせるようにします。 <tscreen><verb> $ lbxproxy -display LOCAL:0 :1 &ero; </verb></tscreen> <!-- This tells <tt/lbxproxy/ to use display <tt/:1/ on the REMOTE system; if that system has >1 display already you can use <tt/:2/ or whatever instead. --> これは<tt/lbxproxy/に、REMOTEシステムの<tt/:1/ディスプレイを使うように 指示しています。もし>1ディスプレイをすでに使っているなら<tt/:2/ など別のディスプレイを指定します。 <item> <!-- Set your DISPLAY environment variable to point to the display that <tt/lbxproxy/ is providing, instead of the normal display: --> ノーマルディスプレイのかわりにDISPLAY変数を<tt/lbxproxy/が与えている ディスプレイに設定します(<bf/訳注:/bash系はこちら)。 <tscreen><verb> $ DISPLAY=:1 $ export DISPLAY </verb></tscreen> <!-- Or, if you use csh or clones: -->あるいはcsh(やcshクローン)なら <tscreen><verb> % setenv DISPLAY :1 </verb></tscreen> とします。 <item> <!-- If you're using <tt/xauth/ you will need to ensure that your cookie is available locally. See the <url url="http://www.xs4all.nl/~zweije/xauth.html" name="Remote X Apps Mini-HOWTO"> for more information on this. --> ここで<tt/xauth/を使っている場合は、ローカルにcookieが使えるかどうか確認する 必要があります。詳しくは<url url="http://www.xs4all.nl/~zweije/xauth.html" name="Remote X Apps Mini-HOWTO">を参照。 <item> <!-- Start your X applications! --> Xアプリケーションを起動します! </enum> <!-- That's it; all X apps that are started up pointing to <tt/:1/ will use LBX. Of course, there's no reason you couldn't also start X apps pointing to <tt/LOCAL:0/ and have both running at the same time. --> こうして<tt/:1/ディスプレイに表示される全てのXアプリケーションはLBXを 使うようになります。もちろん<tt/LOCAL:0/としてXアプリケーションを使うことも できますし併用して使うこともできます。 <sect>問題 <!-- Problems --> <p> <!-- Here are some common problems: --> ここで共通した問題があります: <descrip> <tag/Q)/ <!-- <tt/lbxproxy/ exits with an "access denied" error. -->&dquot;access denied&dquot;となって<tt/lbxproxy/が終了してしまう。 <tag/A)/ <!-- This means the LOCAL system isn't accepting connections from the REMOTE system due to permissions errors. See the <url url="http://www.xs4all.nl/~zweije/xauth.html" name="Remote X Apps Mini-HOWTO"> for details on these issues. --> これは LOCALシステムがREMOTEシステムかrなお接続許可をしておらずパーミッション エラーが出るためです。この問題については<url url="http://www.xs4all.nl/~zweije/xauth.html" name="Remote X Apps Mini-HOWTO">を参照して下さい。 <!-- As a simple trouble-shooting measure, try running a simple X app like <tt/xclock/ on REMOTE and have it display on the local system without using <tt/lbxproxy/: --> トラブルシューティングとして REMOTE上で<tt/xclock/といったXアプリケーションを起動してみて下さい。 <tt/lbxproxy/を使わずにローカルシステム上で表示させるには: <tscreen><verb> $ xclock -display LOCAL:0 </verb></tscreen> とします。 <!-- If that doesn't work, it's <tt/xhost/ or some other basic X problem, not LBX. --> もしこれで動作しないようでしたら<tt/xhost/や基本的なXの問題ということに なります。LBXのせいではありません。 </descrip> <sect>ドキュメント <!-- Documentation --> <p> <!-- The only documentation available in a standard X distribution may be the <em/lbxproxy(1)/ man page. --> Xディストリビューションで読めるドキュメントは<em/lbxproxy(1)/ manページ くらいでしょう。 <!-- If you have access to the X source tree, then very interesting information on LBX is available there: --> Xソースがあるディレクトリツリーにアクセスできるなら、LBXの興味深い情報が 以下のディレクトリから入手できます。 <itemize> <item><tt>xc/doc/specs/Xext/lbx.mif</tt> (Framemaker MIF) <item><tt>xc/doc/hardcopy/Xext/lbx.PS.Z</tt> (Compressed Postscript) <item><tt>xc/doc/hardcopy/Xext/lbxTOC.html</tt> (HTML) </itemize> <!-- More detailed discussion of specific LBX algorithms is available here: --> LBXアルゴリズムについて詳しく書かれたものは: <itemize> <item><tt>xc/doc/specs/Xext/lbxalg.mif</tt> (Framemaker MIF) <item><tt>xc/doc/specs/Xext/lbxalg.PS.Z</tt> (Compressed Postscript) </itemize> などです。 <!-- If you don't have access to the X11 source, you can obtain these files from <url url="ftp://ftp.x.org/pub/R6.3/xc/doc/" name="the X Consortium's FTP site">. --> X11ソースがないなら<url url="ftp://ftp.x.org/pub/R6.3/xc/doc/" name="the X Consortium's FTP site"> からドキュメントを入手できます。 <sect>代わりの方法 <!-- Alternatives --> <p> <!-- If you don't like <tt/lbxproxy/ for some reason: you're not satisfied with the performance, it doesn't work for you, you don't want to hassle with creating an lbxproxy for the remote host, or you simply are interested in trying other options, there is at least one other package for X protocol compression (anyone have others?) --> 「パフォーマンスがよくない」、「思い通りに動作しない」、「リモートホストで lbxproxyをスタートするのが煩わしい」、「他のオプションのほうに興味がある」 などの理由で<tt/lbxproxy/を使わないならXプロトコル圧縮用のパッケージがもう 一つあるのでご紹介します(誰かこれ以外のパッケージをご存知ですか?)。 <sect1>dxpc - もう一つのXプロトコル圧縮 <!-- dxpc - The Differential X Protocol Compressor --> <p> <itemize> <item>オリジナル作者: <htmlurl url="mailto:brianp@cnet.com" name="Brian Pane <brianp@cnet.com>"> <item>現在の管理者: <htmlurl url="mailto:lightborn@mail.utexas.edu" name="Zachary Vonler <lightborn@mail.utexas.edu>"> </itemize> <!-- <tt><url url="http://ccwf.cc.utexas.edu/~zvonler/dxpc/" name="dxpc"></tt> works in essentially the same way as LBX. However, to avoid having to implement an X extension and modify the X server code, <tt/dxpc/ uses <bf/two/ proxies: one that runs on the REMOTE host, like <tt/lbxproxy/, and one that runs on the LOCAL host. --> <tt><url url="http://ccwf.cc.utexas.edu/~zvonler/dxpc/" name="dxpc"></tt> は基本的にLBXと同じ方法で動作するものです。しかし X拡張機能の実装やXサーバのコードを修正しなくて済むように、<tt/dxpc/は<em/2つ/ のプロキシ(<tt/lbxproxy/のようなREMOTEホスト上で実行するものとLOCALホスト上で 実行させるもの)を使います。 <!-- The REMOTE host proxy communicates between the X clients and the LOCAL host proxy, and the LOCAL host proxy communicates between the X server and the REMOTE host proxy. --> REMOTEホストのプロキシ(proxy)はXクライアントとLOCALホストのプロキシのあいだ で通信をします。 またLOCALホストのプロキシはXサーバとREMOTEホストのあいだで通信をします。 <p> 訳注: <tscreen><code> REMOTE LOCALホスト +-----+ +-----+ +-------+ Network +-------+ +----------+ | |\ | APP |->| PROXY |--------------------| PROXY |->| X SERVER |=>| || +-----+ +-------+ (LBX/X Protocol) +-------+ +----------+ +-----+\ +-----+ / /_____// | APP |--/ Xサーバ +-----+ Xクライアント </code></tscreen> <!-- So, to <em/both/ the X clients and the X server, it looks like X protocol as usual. --> こうしてXクライアントとXサーバの<em/両方で/通常のXプロトコルのように 振る舞います。 <sect2>利点、長所 <!-- Advantages --> <p> <itemize> <item> <!-- Since it's a completely separate application that does not require any X internals, it's <em/much/ simpler to compile and install. --> Xの内部的なものを必要としない完全に独立したアプリケーションなので コンパイル、インストールが<em/とても/容易にできます。 <item> <!-- It's maintained separately, so you don't have to wait for the OSF to release new X versions for enhancements or fixes. --> Xとは別々にメンテナンスされているので、拡張/フィックスされた新しいXバージョン のリリースを待つ必要がありません。 <item> <!-- It provides more and better compression information and statistics than <tt/lbxproxy/. --><tt/lbxproxy/と比べて圧縮について得られる情報や統計的な量において 優れている。 </itemize> <sect2>欠点 <!-- Disadvantages --> <p> <itemize> <item> <!-- It is not a standard part of X; you must obtain and build it separately. --> Xの標準的なパッケージには含まれていないので、Xとは別々に入手して構築する 必要があります。 <item> <!-- It is slightly more complex to set up, since it requires a LOCAL-side proxy as well as the REMOTE proxy. --> REMOTE側に加えてLOCAL側のプロキシ設定が必要で、設定が少し複雑です。 </itemize> <sect2>dxpcの入手先 <!-- Where Can I Get dxpc? --> <p> <!-- The source for dxpc is available at <url url="ftp://ftp.x.org/contrib/utilities/" name="ftp.x.org">. There is a WWW homepage for dxpc that gives a lot of good information, including pointers to the dxpc mailing list, access to the source code, and a number of pre-built binaries for various platforms: --> dxpcのソースは <url url="ftp://ftp.x.org/contrib/utilities/" name="ftp.x.org"> で入手できます。またすぐれた情報を満載したdxpcのホームページがあります。 dxpcメーリングリストへのポインタやソースコードの利用、いろいろなプラット フォーム用にプレコンパイルされたバイナリファイルなどについては以下の サイトを見てみて下さい<url url="http://ccwf.cc.utexas.edu/~zvonler/dxpc/">。 <sect1>Ssh (Secure Shell) <p> <!-- <htmlurl url="mailto:lbxhowto@sizone.org" name="Ken Chase <lbxhowto@sizone.org>"> notes that <tt><url url="http://www.cs.hut.fi/ssh/" name="ssh"></tt> can be used for compression. Although its main purpose is to provide security, it also compresses the data it sends. --> <htmlurl url="mailto:lbxhowto@sizone.org" name="Ken Chase <lbxhowto@sizone.org>">氏は <tt><url url="http://www.cs.hut.fi/ssh/" name="ssh"></tt>で圧縮プロトコル が使えることを指摘しています。sshの主な目的はセキュリティの強化なのですが データを圧縮して送信することもできます。 <!-- Thus, if you run X over a <tt/ssh/ link you will automatically obtain some amount of compression. --> <tt/ssh/接続を経由してXを起動する場合は、自動的に圧縮されます。 <sect1>どちらがよいか? <!-- Which Is Better? --> <p> <!-- I don't know. Both LBX and <tt/dxpc/ are certainly better at raw compression than <tt/ssh/. Of course, <tt/ssh/ provides the added advantage of security. And of course, there's no reason you can't use both <tt/ssh/ and one of the other two, to get good compression and security. --> 残念ながらわかりません。LBX、<tt/dxpc/どちらも<tt/ssh/よりは圧縮そのものは (raw compression)優れています。もちろん<tt/ssh/はセキュリティについて 優れています。もっとよい圧縮とセキュリティを得るために2つ(<tt/ssh/と <tt/dxpc/、<tt/ssh/のどちらか一方)を併用しない手はありません。 <!-- It shouldn't be hard to run some benchmarking against these options and get both subjective and statistical measurings of performance. But I haven't done this, and I don't know of anyone who has. --> これらのオプションについてベンチマークを実行したり統計的にパフォーマンス の計測を行うことは難しくありません。しかしまだ試していません。またこれを 試してみたという人もまだいないようです。 <hrule> [ 日本語訳:伊佐冶 哲, <tt/isaji@mxu.meshnet.or.jp/<p> 校正:吉田 英樹さん, <tt/hideki@isl.rdc.toshiba.co.jp/<p> 吉田さん、JFの方達に大変お世話いただきました。ここに感謝いたします。] </article>