レンタルサーバ + Webシステム開発 = E-business

■レンタルサーバご利用参考資料
サーバご利用の参考にJF Project によるJF (Japanese FAQ)を掲載しています。

Linux JF(Japanese FAQ)Project.
JF は, Linux に関する解説文書・FAQ などを作成・収集・配布するプロジェクトです.

グリーンネット・トップページへ戻る


一覧に戻る
スキャナーを使うための HOWTO

Howard Shane

hshane[AT]austin.rr.com

中谷千絵 - 日本語訳

jeanne@mbox.kyoto-inet.or.jp

Revision History                                                       
Revision 0.04               07-03       Revised by: jhs                
Clarified, revised and edited after inviting feedback from participants
of the SANE-devel mailing list                                         
Revision 0.01               06-03       Revised by: jhs                
Completed draft.                                                       

  Linux システム上で、写真スキャナーデバイスへのアクセスと使用について
必要なステップをまとめた文書です。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

Table of Contents
1. はじめに
   
    1.1. 著作権について
    1.2. 免責事項
    1.3. 最新版について
    1.4. 謝辞
    1.5. フィードバック
    1.6. この文書の記述で使った約束事
   
2. インターフェースのタイプ
   
    2.1. SCSI スキャナー
    2.2. USB スキャナー
    2.3. パラレルポートスキャナー
    2.4. IEEE 1394 (FirewireTM, i.LinkTM)
    2.5. オペレーティングシステムサポート
    2.6. USB スキャナーと Libusb
    2.7. お使いのスキャナーデバイスの Linux カーネルサポート
    2.8. パラレルポートスキャナー
   
3. スキャナーデバイスを作成しアクセスする
   
    3.1. デバイスファイルシステム
    3.2. デバイス類を手動で作成する
    3.3. グループと許可属性
   
4. SANE
   
    4.1. SANE を入手する
    4.2. SANE を設定する
   
5. スキャナーをテストする
6. SANE のフロントエンド
7. トラブル解決集
   
    7.1. 私のスキャナーは scanimage でも xsane でも見つけることができま
        せん!
    7.2. USB ハードウェアが動いているか分かりません!
    7.3. 私が使った scanimage またはフロントエンドが不正なデバイスにな
        ります!
    7.4. パラレルポートスキャナーに root でしかアクセスできません!
    7.5. Acme WhizzbangTMのスキャナーを持っていますが、特有の問題や質問
        をするところがありません。
    7.6. SANEについて、サポートされているスキャナーや SANE の開発につい
        ての詳細な情報はどこにありますか。
   
8. 日本語訳について
9. Gnu Free Documentation License

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

1. はじめに

この文書は、平台型やハンディタイプのスキャナー、ビデオカメラ、さらにス
チールカメラ、画面保存などを含むラスターイメージスキャナーデバイスの設
定について、 Linux ユーザを助けるのを目的に作成されました。インターフェ
ースのタイプ、カーネルサポートについての情報や、必要なデバイスを作成し
アクセスする方法について述べており、そして最後の章で、コマンドラインま
たは X11 でスキャナーハードウェアを使うアプリケーションについての手短な
まとめを行いました。特別な用途の画像ファイルを保存したり、お使いのスキ
ャナーデバイスの仕様を最大限に利用してソフトウェアを使う方法については
対応していません。そのような情報についてはこの文書中で紹介したアプリケ
ーションのホームページや、お使いのハードウェアに添付されている業者の情
報窓口へ問い合わせてください。

お断りしておきますが、この文書は "私はどのようなスキャナーを購入すべき
か?"という質問には答えていません。そのような質問への答えは、あなたがど
んなスキャナーデバイスを探しているかによって違ってきます。 Section 2 に
サポートされているハードウェアのリストのリンクを探すか、こちら を探してください。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

1.1. 著作権について

 参考訳:この文書は Howard Shane に著作権(2003)があります。 Free
Software Foundation によって発行された GNU Free Documentation License(
修正項目なし、表紙カバーなし、裏表紙なし)の Version 1.2 またはそれ以降
の版の条項のもとに、この文書のコピー、配布、そして(または)改編を許可
します。ライセンスのコピーは Section 9 で見ることができます。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

1.2. 免責事項

 No liability for the contents of this document can be accepted. Use
the concepts, examples and other content entirely at your own risk. As
this is a new edition, there may be technical or other inaccuracies
that may result in system failure, destruction of your hardware and the
loss of your irreplaceable data. Proceed with caution and be aware that
although errors are unlikely, the author can nonetheless accept no
responsibility whatsoever for them.

 参考訳:この文書の内容について責任がないことを知っておいてください。考
え方やさまざまな例、その他の内容を利用することはすべてあなた自身の責任
です。この文書が最新版ですから、あなたのハードウェアを壊してしまったり
大事なデータの損失といったシステムの欠陥になるような技術的な間違い、あ
るいはその他間違いがあるかもしれません。注意して作業してください、そし
てエラーは不幸だということを知っておいてください。著者はそれらすべての
どんなことにも責任を負うことはできません。

 All copyrights are held by their by their respective owners, unless
specifically noted otherwise. Use of a term in this document should not
be regarded as affecting the validity of any trademark or service mark.

 参考訳:すべての著作権は、特別に記されない限りそれぞれの所有者に保有さ
れています。この文書で使用した用語は、いかなる商標やサービスマークの有
効性に評価を与えていると考えてはいけません。

 特定の製品の名前やブランド名は推奨品と見なさないでください。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

1.3. 最新版について

 この文書が始めてのリリース版です。

 この文書の最新版はこちら で入手できます。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

1.4. 謝辞

 Oliver Rauch、Henning Meier-Geinitz、 Jonathan Buzzard、 Laurent-jan、
Jochen Eisinger その他 SANE の開発に参加している方々や SANE-devel メー
リングリストに貢献している方々に感謝したいと思います。メーリングリスト
に誰の投稿もなければ、どんな基準でレベルを維持しても、このプロジェクト
を続けるのは困難だったでしょうから。

 また、私がこの文書を書くという計画でキーボードを叩いて過ごした期間、ず
っと好意的に耐えてくれた Maria に感謝を述べたいと思います。あなたは素晴
らしい人です。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

1.5. フィードバック

 この文書への追加やご意見は次のアドレス宛に送ってください: 。これが最初のリリースなので何らかの誤りがあることがとり
わけ気がかりですから、間違いや訂正する必要がある点については遠慮なく私
に知らせてください。またこの文書に含まれたほうがよいと思うコツやツール
類について、またユーザの助けになるどんな小さな情報でも私に知らせてくだ
さい。先にお断りしておきますが、私は技術的な質問あれこれや、スキャナー
について"どうかお助けを"という質問にはお答えできません。そのような内容
のメールを受け取ったら、 /dev/null行きにしてしまうでしょう。; メールで
助けを求めるかわりに参考資料としてSection 7.5を検討してください。私はス
キャナーについての専門家ではありませんし、テストのために利用できるすべ
てのスキャナーのモデルを持っているわけでもありません。Linux でのスキャ
ナーサポートについて私ができることは、他の人たちによる正確な情報を盛り
こみ、簡潔で(できれば)わかりやすい HOWTO を作成するために、私自身の限
られた経験をまとめることくらいです。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

1.6. この文書の記述で使った約束事

 次に示すことは、この文書で使った約束事です。Linux で通常 bash シェルを
使っていて、オペレーティングシステムにアクセスし操作する方法をまだ完全
に理解していないかもしれない方に向けて解説しておきます。

 まず第一に、ファイル名は文中で:/path/fileのように示しています。

 Linux でコマンドはコマンドプロンプトで実行され(つまり「呼びだされ」)
ます。これを’コマンドライン’とも言います。非グラフィカル環境(テキス
トベース)で使用しているなら、通常、ドルの印:

$                                                                      

あるいは、root でログインしているか、あるいは root になるのを要求されて
いるか、あるいは、’スーパーユーザ’なら、ハッシュマーク:

#                                                                      

を使った bash シェルプロンプトが示されています。X とか X11 とも言います
が、X window システムでxterm  やよ
く似た X ターミナルエミュレータで、 bash シェルにもアクセスできます。
bash プロンプトで実行されるべきコマンドというのは、この文書で使っていま
すが、通常次のようなことです: do this now(いま、これを行え)。

 コマンドやコマンドの実行結果の出力は文章、あるいは項目でスクリーン出力
でも示されます:

 

$ date                                                                 
Sun Jul 27 22:37:11 CDT 2003                                           

 コマンドが bash プロンプト(たとえば、上記のように$ date と書くこと)
の先頭に書かれ、[リターン]あるいは[エンター] キーがコマンドに続いて押さ
れると、出力が後に続くでしょう(たとえば、日付け時刻など)。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

2. インターフェースのタイプ

 この文書で扱っている利用可能なスキャナーインターフェースには、SCSI、
USB、パラレルポートと IEEE 1394のおもに4つのタイプがあります。 Linux
サポートは、ほとんどのスキャナーについてSANE  プロジェクトで開発されています。SANE はTWAIN
と同じものではありません。Apple
MacintoshTM や Microsoft WindowsTM のような別のオペレーティングシステム
でスキャナーデバイスを使っているなら TWAIN  をご存じかもしれません。後者のプロトコルは、ドライバやユー
ザインターフェースといっしょになっていて専用の環境以外で使うことはでき
ません。したがって、 SANE や Scanner Access Now Easy は、 Linux(同一も
のに限りませんが)を含む Un*x の環境で使うように想定されています。SANE
では、お使いのデバイスでコマンドラインだけでスキャンできますし、SANE バ
ックエンドで使うためにお使いのフロントエンドアプリケーションを設定でき
ますし、ネットワーク越しにスキャナー類にアクセスでき、また、カメラやそ
の他video4linux  のデバイスにもアクセス
できます。

 注意:さらに先を読む前に、お使いのスキャナーデバイスがサポートされてい
るかどうかは、SANE のホームページhttp://www.sane-project.org/
sane-mfgs.html を調べるのがよいでしょう。sane supported scanners search
engine  も利用できます。

 統合デバイス、たとえばスキャナー、プリンターそして(または)ファックス
としての機能がひとつになったものを持っていて、標準のスキャナーとして適
切なインターフェースを使うスキャナー機能に関しては、下記のステップに従
ってください。HP officejetの場合は、Linux で動く統合デバイスのさまざま
な機能をどのように使うかについての詳細は the HP Officejet Linux Driver
project site, を調べるのがよいでしょう。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

2.1. SCSI スキャナー

 これらのスキャナーは SCSI コントローラで管理されています。一般に、SCSI
ハードウェアを想定して動く SCSI インターフェースを使うスキャナーはどれ
もサポートされています。SCSI コントローラがサポートされているかどうか確
信が持てないなら、SCSI controller list of the Hardware HOWTO を調べてください。お使いの SCSI
コントローラがスキャナーにバンドルされているものなら、ハードウェアがサ
ポートされていないか一部しかサポートされていないかもしれませんので、付
属 SCSI カードの場合は、ちゃんとした SCSI コントローラと同じようには動
かないかもしれません。

 お使いの SCSI スキャナーが何らかの点で設定が困難なら、 man sane-scsi
で調べてください。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

2.2. USB スキャナー

USB コネクタがどんなもので、どこにつながるかはすでにご存じでしょう。
USB スキャナーを持っているなら、お使いのハードウェアは Linux でサポート
されている見込みがあります。 USB サブシステムと USB スキャナーを使用可
能にする情報はSection 2.5を見てください。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

2.3. パラレルポートスキャナー

 パラレルポートインターフェースでスキャナーを使いたいなら、Section 2 に
あるサポートされているデバイスのリンクを調べた後、page on the subject,
by Jonathan Buzzard 
のページを見たほうがよいでしょう。この文書を書いている時点で、前者のペ
ージは更新はされていませんでしたが。概してパラレルポートスキャナーはそ
れをサポートするバックエンドがあれば動かせますが、お使いのデバイスが
USB ポート(最近リリースされた新しいスキャナーのほとんどがそうなってい
ます)も持っており、USB バックエンドを動かせるなら、それをかわりに使う
よう強くお勧めします。お使いのモデルがパラレルポートインターフェースし
かなく、しかも専用で非標準のコントローラなら、うまくいかないかもしれま
せん。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

2.4. IEEE 1394 (FirewireTM, i.LinkTM)

 IEEE 1394 スキャナーはこの文書を書いている時点でサポートされているもの
もあります。 Nikon と Epson の製品がそれです。IEEE 1394 インターフェー
スは Linux のカーネル 2.4 系以降サポートされています。お使いのカーネル
で IEEE 1394 がサポートされているなら、Section 2 で製造業者のリンクから
SANE をサポートするデバイスを調べたほうがよいでしょう。また、お使いの固
有のハードウェアに関係する何らかの問題については、ハードウェア(もしあ
れば)について manpage を読んだほうがよいでしょう。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

2.5. オペレーティングシステムサポート

 USB スキャナーを持っていないなら、Section 2.7 を飛ばしてください。そし
てお使いの装置がパラレルポートのものなら、Section 2.8 に飛んでください
。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

2.6. USB スキャナーと Libusb

 この項は以前は"USB スキャナーカーネルサポート"というタイトルでしたが、
libusb の登場で、 USB スキャナーを使用
可能にしたカーネルの必要がなくなっています。このような対応状況の違いに
ついての詳しい情報は、 man sane-usb を調べてください。お使いの USB スキ
ャナーについて従来通りのカーネルサポートのほうがよいなら、Section 2.7.2
を見てください。この点についてほとんどのディストリビューションは、安定
版(そしてデフォルトでインストールするものもあります)で、libusb を提供
(デフォルトでインストールされるものもあります)していますから、すでに
USB スキャナーデバイスをサポートするカーネルを使っていないなら、お使い
のデバイスにアクセスするために libusb パッケージをインストールすればよ
いだけかもしれません。ほとんどのディストリビューションではそうなってい
ますが、カーネルで USB デバイスファイルシステムサポートを有効にしていな
ければいけません。確認するために、コマンドラインで次のコマンドを実行し
ます。

 

$ cat /proc/filesystems                                                

 次のようなものが表示されるはずです(表示されるものはこれら以外にもあり
ますが):

nodev   usbdevfs                                                       
nodev   usbfs                                                          

  usbdevfs をマウントし使用可能にして、デバイスファイルを見ないといけな
いかもしれません。コマンドラインで次のように行います。 mount -t
usbdevfs none /proc/bus/usb kernelスキャナーサポートが組込みか、あるい
はモジュールをロードするかのどちらかで使用可能になるまで、 libusb を使
ってはいけません。同時にひとつだけしか使えません。

 お使いの Linux ディストリビューションから .rpm、 .tgz または .deb で
libusb のパッケージを入手できます。自分で libusb サポートのあるソースか
ら SANE バイナリをコンパイルするつもりなら、 libusb-dev パッケージも同
様に入手しておきます。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

2.7. お使いのスキャナーデバイスの Linux カーネルサポート

 カーネルサポートは SCSI、USB とパラレルポート一般のインターフェースサ
ポート、USB スキャナーサポート(libusb を使わないなら)になります。すで
に使っているカーネルが必要なものをサポートしているなら、 dmesgコマンド
を使って、起動時にロードされたドライバの認識状況を調べることです。見つ
からない場合、ドライバはモジュール(必要がないとロードしない)として存
在するかもしれません。コマンドラインで次のように入力して探してください:

 

 $  ls -R /lib/modules/X.XX/kernel/drivers                             

'X.XX' にはお使いのカーネルバージョンの数字が入ります。次の出力は USB
スキャナーが使用可能になっている例です(ここに示したものがすべてではな
く、関連する行を短く編集しています):

 

./usb:                                                                 
scanner.o                                                              
usbcore.o                                                              

 (初心者へのヒント:dmesg 情報やモジュールリストの表示が速すぎて見えな
いなら、'less' ( less がないなら 'more')で出力をパイプしてみましょう
。 ls -R /lib/modules/X.XX/kernel/drivers | less あるいは、次のようにし
て、ファイルに書きだします。 ls -R /lib/modules/X.XX/kernel/drivers >
file.txt 'file.txt' には、情報が書きだされますから、 cat [file] | less
で、ファイルにアクセスできます。)

 次の情報は、スキャナーインターフェースのタイプを基準にして並べてありま
す。お使いのカーネルに必要なサポートが含まれていないなら、カーネルの再
構築をしましょう。カーネルの再構築に不慣れなら、詳細については Kernel
HOWTO  の指示に従いましょ
う。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

2.7.1. カーネル SCSI サポート

 SCSI タイプのインターフェースなら、make config、 make menuconfigあるい
は、make xconfig などを行うとき、お使いの固有の SCSI アダプタをサポート
するオプションを追加するのを知っておいてください。generic SCSI device
support もまた必要になります。一般的なデバイスというのは /dev/sg0, /dev
/sg1 になります。お使いのカードがサポートされているかどうかは supported
SCSI controllers list 
を読めば前もって分かるので、これらすべてはカーネルがお使いのハードウェ
アをサポートしていることを確認した後にやる必要があります。generic SCSI
device は、適切なモジュールをロードするためのものです。

# modprobe CARD_MODULE_NAME                                            

# modprobe sg                                                          

......root 権限で。スキャナーアクセスに問題を起こす ide-scsi emulation
support ( ATAPI-eide CDRW supportを使う場合)の報告がありました。お使
いのハードウェアがサポートされているのが分かっているのに、ide-scsi
module をアンロード出来ないことがあります。:

rmmod                                                                  
ide-scsi                                                               

(この問題が最新のカーネルで修正済かどうかご存知の方は、私に連絡してく
ださい。)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

2.7.2. カーネル USB と USB スキャナーサポート

 USB のスキャナーをサポートするには、カーネルの USB サブシステムサポー
トと、usb-ohci もしくは usb-ehci もしくはお使いのシステムにあった USB
ドライバのいずれかが必要になります。USB サブシステムはカーネル 2.2 以降
から Linux のカーネルに存在してきました。一般的に USB サポートについて
のより詳しい議論は、linux-usb project site 
を見てください。お使いのスキャナーにアクセスするためカーネルを(libusb
の代りに、Section 2.6 に解説しました)にアクセスするためカーネルを使う
なら、'USB scanner support' を使用可能にしないといけません。すでに存在
するかどうかは、 dmesgあるいはlsmod で確認するか、モジュールがロードさ
れているかどうかを調べるのは、コマンドラインか、 xterm で次のようにしま
す。

 

# lsmod                                                                

上の行のプロンプト記号で示されるように、この作業は root 権限でやらない
といけません。次のような出力(これだけというわけではありませんが)にな
るでしょう。:

cdrom                  29312   0  (autoclean) [sr_mod]                 
usb-ohci               17888   0  (unused)                             
usbcore                56768   0  [scanner ibmcam usbvideo usb-ohci]   
scanner                 8704   0                                       

 scanner がロードされておらず、カーネルでモジュールとして USB scanner
support があるのが分かっているなら、直接ロードしてください。:

# modprobe -v scanner                                                  

...次に示すものに似ている項目が見つかるはずです。:

Using /lib/modules/2.4.20/kernel/drivers/usb/scanner.o                 

/etc/modules(ディストリビューションによってファイル名はさまざまである
ことに注意)にscanner という項目を書くことで、起動時に自動的にモジュー
ルをロードできます。さらに、 syslog あるいは dmesg | lessで起動時の記録
を調べてモジュールがロードされたのを確認できます。次のような行があるは
ずです。

May 16 23:17:25 K7 kernel: usb.c: registered new driver usbscanner     
May 16 23:17:25 K7 kernel: scanner.c: 0.4.6:USB Scanner Driver         

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

2.8. パラレルポートスキャナー

 ここまでの説明で、パラレルポートスキャナーは問題があるかもしれないのを
ご存じかもしれませんが、もう一度言います。お使いのデバイスがパラレルポ
ートインターフェースと USB インタフェースの両方があるなら、より簡単に設
定するために USB を選択するように考えたほうがよいでしょう。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

2.8.1. カーネル Parport サポート

 2.2 と 2.4 カーネルシステムでは、パラレルポートサポートは組み込み、あ
るいはモジュール(すでにお使いのカーネルは通常デフォルトで使用可能です
)で使用可能にしなければいけません。この作業を始める前にmore generic
info about parallel-port device support under the Linux kernel を読んだほうがよいかもしれません。モジュー
ルparportがロードされているかどうかは、dmesgを調べるか、先に説明したよ
うに lsmod を使って調べることができます。 dmesg | lessで、次のような行
(この他にも行はあります)がないといけません。

Mar  3 08:00:25 K7 kernel: parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] 
Mar  3 08:00:25 K7 kernel: parport0: irq 7 detected                             

 自分でカーネルをコンパイルするなら、'Parallel Port support'を使用可能
にします。'IEEE 1284 transfer modes,'を使用可能にし、そして、x86 タイプ
アーキテクチャをお使いなら、 'PC-style hardware' も使用可能にしなければ
いけません。

 モジュールをロードしようとした時エラーが出るなら、 modprobeを実行する
ときにハードウェアアドレスを決めて与える必要があるかもしれません。通常
のアドレスは x86 システムでは 0x378 です。統合されたものや ISA のパラレ
ルポートの場合は 0x278 と 0x3BC の可能性もあります。Add-in PCI parallel
ports は違ったベースアドレスを持っています。ひとつは parport_pc または
parport_arc モジュールのどちらかに複数のデバイスを配置することもできま
すが、これはこの文書の範囲を超えています。警告: コマンドラインでこの情
報を入力する前に正しいアドレスを使っているか確認してください。さもない
とあなたのマシンが不安定になったり、故障したり壊れるかもしれません。

 パラレルポートは "EPP"モード、あるいは ECP/EPP のどちらかに設定されて
いなければいけません。"Bidirectional(双方向) " ("BPP" あるいは "PS/
2")としても知られています)ゆっくりですが動くかもしれません。
"Unidirectional(一方向)"モードはスキャンニングには不適切です。上記設
定は少なくとも x86 システムでは、通常 BIOS メニューを通してアクセスでき
ます。

 パラレルポートスキャナーが SCSI サポートを必要とするかどうかによります
が、parport-SCSI support には、お使いのカーネルにパッチがいるかもしれま
せん。www.torque.net/parport/ppscsi.html  でツール一式があります。これが必要なら、次の項目も有効に
する必要があります。

 

 ・   SCSI support
   
 ・   SCSI generic support
   
 ・  お使いの ppSCSI コントローラのコアモジュールに関するサポート(
    APA-348 に対しては t348、 APA-358 と T358 には t358、より古い
    Shuttle EPSA-2 には epsa2、Shuttle EPST と APA-1350 には epst、
    OnSpec 90c26 には onscsi、SparCSI と ParaSCSI には sparcsi)。
   
 一度これらがコンパイルされると、適切なモジュールをロードするのは簡単で
す。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

3. スキャナーデバイスを作成しアクセスする

 次の項はすべてのハードウェアのタイプに適用されます。スキャナーインター
フェースタイプについて特徴のあるものについては、この項の最後のところで
述べています。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

3.1. デバイスファイルシステム

 Devfs  または
'device filesystem' は、2.2 系以降 Linux カーネルでオプションになってい
ました。この時点で使っていなかったのなら最新版にされるようお勧めします
。安定しており、デバイスノードの生成に的確にアプローチしますし、デバイ
ス管理をとても簡単にします。デバイスファイルシステムデーモンである
devfsd は、ユーザ入力を必要としないで、直接にお使いのシステムでデバイス
を生成、削除します。システムで devfsd が動いているなら、コマンドライン
か xterm 上で ls -f /dev/ を実行すると、 /dev 内のサブディレクトリで、
論理的に秩序ある階層構造のなかにデバイスファイルへのほとんどのシンボリ
ックリンク、または "ノード" を示します。コマンドラインで ps -A で稼働し
ているプログラムを調べると、devfsd が動いているのも見ることができます。
デーモンはとても小さなメモリを使っています。 devfsd/devfs を動かしてい
るなら、デバイスノードを作成する最初の過程はすでになされているでしょう
し、/dev で適切なシンボリックリンクを選ぶことでデバイスを見つけ出すこと
は簡単ですから、次の項をスキップできます。

 devfs を試そうとしているなら、カーネルのコンフィグレーションの項の 'フ
ァイルシステム'のところで、'/dev file system' と 'Automatically mount
at boot' を使用可能にしなければいけません。すでにそうなっていないなら絶
対にカーネルの再構築をしなければいけません。警告:その他のサポートして
いるパッケージだけが 'devfsd'を必要としますから、お使いのディストリビュ
ーションのベンダーから入手できます。警告: devfs デーモンをインストール
していないのに起動時に自動的にマウントするように devicefs を可能にする
と、起動不能になってしまうでしょう。

 devfs はユーザによってアクセスするためにデバイスの許可属性を変更する必
要がありません。

 もちろん、devfs についての上記の解説は、(数ある人なかでの)私の意見で
あり、とりわけあなたが初心者あるいはカーネルをコンパイルする準備ができ
ていないなら、記述通りにやったほうがよいでしょう。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

3.2. デバイス類を手動で作成する

 devfs と devfsd を稼働させてない場合に、必要なやり方を解説します。USB
スキャナーに libusb を使わないなら、この項をスキップしてSection 4に飛ん
でください。手動で必要なデバイス類を作成するにはふたつの方法があります
。ひとつは MAKEDEV を使うことで、もうひとつはコマンドラインでデバイスノ
ードを作成することです。

 MAKEDEV スクリプトはふたつの方法のうちのより簡単な方で、/dev、あるいは
実行可能のバイナリーを置く場所である(/bin、/sbin など)に置かれているか
もしれません。man MAKEDEV で調べてください、デバイスに特徴的なコマンド
オプションに注意することが警告してありますから、それであなたはメジャー
とマイナーの番号が正しいかどうかを確認できます。(これについての詳細は
次を見てください、なぜそれが重要なことかがわかるでしょう。とりわけ
MAKEDEV が動かないとか、苦労してやるほうがよいなら)。

 デバイスはブロック(ドライブのような)、fifo ( xconsole 上でのファイル
の入力出力法あるいはパイプ)あるいはキャラクターデバイスとして作成でき、
別のハードウェアを意味します。それぞれのデバイスはそれが何であるか、そ
してどこにアクセスするかをカーネルに伝えるためにメジャーとマイナー番号
を持っています。これらの番号は任意ではありません。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

3.2.1. SCSI デバイス類

 2.4系のカーネルを使っているなら、SCSI proc interface access を知っておいたほうがよいでし
ょう。どのカーネルを使っていても、ここから先を読む前にman sane-scsi を
読んだほうがよいでしょう。システムが起動するとき、一般的な SCSI デバイ
ス類は /dev/sgN にマップされます。N は、ゼロから始まる数値です。SCSIデ
バイスに対するメジャーとマイナーの番号は 21 とそれぞれ0,1,2,3... になり
ます。デバイスがすでにロードされているかは、 ls -l /dev/sg* で調べるこ
とができ、このような出力になるはずです。:

crw-------   1 root   sys     21,  0 Jan 06  2003 /dev/sg0             
crw-------   1 root   sys     21,  0 Jan 06  2003 /dev/sg1             
crw-------   1 root   sys     21,  0 Jan 06  2003 /dev/sg2             
crw-------   1 root   sys     21,  0 Jan 06  2003 /dev/sg3             
crw-------   1 root   sys     21,  0 Jan 06  2003 /dev/sg4             
crw-------   1 root   sys     21,  0 Jan 06  2003 /dev/sg5             

 存在するデバイスに(/dev/scanner というシンボリックリンクを作らないと
いけません(理由はのちほど明らかにします)。たとえば、お使いのスキャナ
ーが SCSI ホストデバイスの最初の scsi-bus (と lun と target)に接続され
ているなら、次のように関連するデバイスにリンクしなければいけません:

#  ln -s /dev/sg0 /dev/scanner                                         

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

3.2.2. 手動で USB デバイス類を作る

 繰り返しますが、libusb を使っているなら、この項を飛ばしてください。USB
スキャナーデバイスはメジャー番号 180 とマイナー 48、49 から 63 までを持
っています。最初にお使いのディストリビューションのどのディレクトリに
USB ディレクトリデバイスが置かれているかを調べるために /dev を見ます。/
dev/usb というディレクトリのなかにusbscanner0, usbscanner1... のような
名前で存在するかもしれませんし、あるいは /dev/ディレクトリのなかに
usbscanner0, usbscanner1...というような名前で存在するかもしれません。 /
dev/ディレクトリのなかにスキャナーデバイスがすでにあるなら、仕事は終わ
っています。もしないなら、自分で作らないといけません。root になって次の
ようにしてスキャナーに対するキャラクターデバイスを作成します。:

# mknod /dev/usbscanner0 c 180 48                                      

...あるいはお使いのディストリビューションでは、 '/dev/usb'というサブデ
ィレクトリかもしれません。 :

# mknod /dev/usb/scanner0 c 180 48                                     

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

3.2.3. 手動でパラレルポートデバイスを作成する

 次の generic parport デバイスを作成するために、上記項で説明した例を示
します。:

crw-------    1 root     root      99,   0 Jun 24 13:47 parport0       
crw-------    1 root     root      99,   1 Jun 24 13:47 parport1       
crw-------    1 root     root      99,   2 Jun 24 13:47 parport2       
crw-------    1 root     root      99,   3 Jun 24 13:47 parport3       
crw-r-----    1 root     root       1,   4 Jan  1  1970 port           

 お使いになる予定のバックエンドによって、/dev/port と(または)/dev/
parport を作らないといけないかもしれませんので、アプリケーションがそれ
を必要とするなら、前のステップに戻って用意してください。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

3.3. グループと許可属性

 いったんすべてのモジュールがロードされ、ノードが生成されたら、あなたの
ユーザアカウントがデバイスにアクセスできるかを確かめるのはよいことです
。ほとんどのセキュリティについての考え方では、固有のグループにスキャナ
ーアクセスを追加するというようにします。私のシステムでは、'video' とい
うグループのメンバーにスキャナーとその他画像デバイスの使用を許可してい
ます。このようにする方法は(root で) /devでデバイスの所有者を変更する
ことです。:

# chown root.video /dev/usb/scanner*                                   

...root.videoはデバイスが新しく所属する所有者とグループです。言うまでも
なく具体的なコマンドで、SCSI スキャナーが /dev/sg*になるかどうかなどは
お使いのシステムとデバイスのタイプによって違ってきます。シンボリックリ
ンクでないデバイスノードそれ自体の所有者を変更するのは重要なことです。;
シンボリックリンクの所有者は親デバイスあるいは、それらが示すファイルを
変更するだけで変わります。

 あなたのユーザアカウントがグループのメンバーであるかどうかを調べるには
、 root になり次のようなコマンドを使ってください。: grep -e video /etc/
group。次に示すようなものが表示されるはずです。

video:x:44:                                                            

 '44' がグループナンバーです。'video'グループの最後のコロンに続くメンバ
ーがないので加えることができますから、コマンドで 'jhs' というユーザを加
えましょう。

# adduser jhs  video                                                   

このあとで、デバイスの件でユーザに読み書きを許可するのは簡単です。

# chmod g+rw /dev/usb/scanner0                                         

... g+rw というのは、 group(グループ)に対して、read (読み)と write
(書き)アクセスを加えるという意味です。 chmod のマニュアルを見てくださ
い(もっと詳しい情報はman chmod または info chmod)。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

4. SANE

 スキャナーアクセスのために最終的に必要なものは、SANE バックエンド(類
)と、任意ですが適切な SANE のフロントエンドです。前者はお使いのスキャ
ナーにつながるドライバと low-levelのアクセスツールで、後者は X でスキャ
ナーにアクセスして使うグラフィカルアプリケーションです。前者はスキャナ
ーにアクセスするために必要なだけですが、フロントエンドは画像を操作する
ために推奨されるもので、画像をプリントしなくても画面に表示された環境で
実際にイメージを見ることができます。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

4.1. SANE を入手する

 SANE のバックエンド一式は次のところで入手できます :  http://
www.sane-project.org/source.html 、ここでソースコードと同様にほとんどすべての Linux ディスト
リビューション向けのバイナリーを入手できます。ソースからコンパイルする
つもりならすでに何をしなければいけないかはお分かりでしょうが、Software
Building HOWTO のリ
ンクは追加更新したい場合に利用できます。さらに、すでに SANE をインスト
ールしてしまっているなら、新しくコンパイルした版にするために古いものを
取り除きたいかもしれませんし、コンパイルするために最新の安定版が欲しい
かもしれません。

 バイナリーをインストールしたいなら、関連ファイルをダウンロードしたほう
がよいでしょう、それから通常通りにインストールします。たとえば rpm タイ
プのディストリビューションでは次のように行います:

# rpm -iVh sane-backends-VERSION.rpm                                   

Debian ユーザには安定版(Woody)、テスト版(Sarge)のSANE パッケージがあり
、開発版(Sid)パッケージもあり、お使いになりたい版をどれでも apt-get
install saneという簡単なコマンドで入手できます。

 ソースから SANE の最新版をコンパイルしたいならftp.mostang.com/pub/sane
 から入手できます。ソースから SANE を
コンパイルし、ゼロから SCSI スキャナーを動かす方法について、
Laurent-jan's HOWTO page originally written by Steve Sheriff  に、もっと詳しい(少し悲観的ではあ
りますが)記事があります(グラフィックも興味があります)。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

4.2. SANE を設定する

4.2.1. SANE のバックエンド類

 ディストリビューションのオフィシャル SANE を入手したのであれ、SANE ホ
ームーページからバイナリを入手したのであれ、ソースから自分で SANE をコ
ンパイルしたのであれ、いずれにせよ SANE は scanimage あるいは他フロント
エンドを呼び出すときに、お使いのハードウェアを使うために適切なバックエ
ンドを見分けるはずです。scanimage -L あるいは、あなたが選んだフロントエ
ンドを実行しようとして、デバイスが見つからないなら、詳しい情報はSection
7を見てください。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

4.2.2. ネットワークを通して利用する

 リモートマシンからネットワークを通してスキャナーサービスを使えるように
したいなら、 server のディレクトリにある saned.conf(the computer with
the scanner)、または /etc/sane.d、あるいは、 /usr/local/etc/sane.dとい
うファイルを編集しなければいけません。通常、
'scan-client.somedomain.firm' を登録して成立し、サーバーのスキャナーと
して使いたいなら、クライアントのホスト名で置きかえなければいけません。
IP アドレスがよいなら、ホスト名のかわりに使えます。

 saned デーモンはサーバー上で inetd あるいは xined と同じように稼働しな
ければいけません。inetd.conf あるいは xined.conf でやらなくてはいけない
正しい変更内容については、man sanedを見てください。さらに、ポート6566
が/etc/servicesファイルに加えられなければいけません:

sane 6566/tcp                                                          

 (スキャナーを接続していない)クライアントコンピュータはサーバーのマシ
ン名、たとえば、'scan-server.somedomain.firm.'を加えるようにnet.conf を
編集しなければいけません。

 クライアント(複数の場合も)に関して、"net"の登録は dll.confファイルの
なかでコメントアウトになっていないのを確認しましょう。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

4.2.3. Video4linux デバイスで SANE を使う

 Video4linux は webcams、スチールカメラ、ビデオキャプチャーデバイスを持
っています。SANE はこれらにアクセス可能です。これを使えるようにするには
、設定ファイルがあるディレクトリ (/etc/sane.d または /usr/local/etc/
sane.d)に、 v4l.confという名前のファイルを置きます。このファイルを開き
、次のような内容に似たものを作ります。

# v4linux バックエンドを使うために、デバイスを与えなければいけません。 
# 必要なら複数行を使用可能にできます。                                 
# 実際に複数の[sic] v4l デバイスがあります。                           
/dev/bttv0                                                             
/dev/video0                                                            
/dev/video1                                                            
/dev/video2                                                            
/dev/video3                                                            

 このファイルの最初の行は、知っていなければいけないすべてのことが書いて
ありますので、スキャナーハードウェアをテストしている項で分かったことを
思い出してください。お使いのカーネルが、コメントをはずされた(たとえば
上述のように行頭にある # を取り外す)カメラあるいは v4l デバイスのデバ
イスを認識します。さらに、'v4l' についての行は dll.confファイルでコメン
トアウトになっていないかを確かめてください。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

5. スキャナーをテストする

 上で述べたことが全部できたなら、スキャナー環境をテストする準備が整って
います。この項では、スキャナーには電源が入り、適切なインターフェースを
通してつながっていると仮定しています。SCSI あるいは USB スキャナーなら
、コマンドラインで次のようなコマンドを実行できます。:

$ sane-find-scanner                                                    

...可能なデバイスのリストからお使いのスキャナーが見つかり確認できるはず
です。スキャナーがsane-find-scanner で見つからないタイプのものなら、接
続されたデバイスについての詳細がわかるかもしれないscanimage
--list-devicesを試すこともできます。(これをふたつともやらないといけな
いかもしれません)。 sane-find-scanner は別のユーティリティで、それは
SANE のもとでサポートを保証していませんから、スキャナーであると要求する
デバイスを見るだけです。

 次にスキャナーのイメージ獲得力をテストしたほうがよいでしょう。Section
6にリストされたフロントエンドのひとつか、次のようなコマンドのどちらかを
使えます。:

$ scanimage -d backend:/dev/scanner --format pnm > outfile.pnm         

 たとえばこのように Epson のバックエンドを使うなら、コマンドは次のよう
になります:

$ scanimage -d epson:/dev/scanner --format pnm > outfile.pnm           

 一台以上のスキャナーがあり使用する一台を選択したいなら、 -d オプション
を使えばよいだけです。たとえば、 Epson と Mustek のスキャナーを使ってい
るなら、"-d epson" あるいは、"-d mustek" を使わないといけません。同じバ
ックエンドでサポートされた1台以上のスキャナーを持っているなら完全なパ
スが必要になるだけです。 /dev/scanner は、設定した(あるいは v4l デバイ
スの場合は、/dev/video0)どんなスキャナーデバイスにも置き換わるはずです
。--format スイッチは pnm または tiff のどちらかにすることができますが
、変更しなければ、pnm がデフォルトになります。見つけにくいですが、利用
できるオプションについては、 man scanimageを見てください。 'portable
anymap'に対する '.pnm' フォーマットは Linux での画像ファイルとしては普
通のイメージフォーマットで、Imagemagick 
または netpbm で他のイメージフォーマッ
トに変換できます。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

6. SANE のフロントエンド

 さて、ハードウェアが動くことがわかりましたから、X11 で、スキャナーデバ
イスを使う予定なら、たぶん適当なフロントエンドが必要になります。 X11 は
スキャンしたものを見るにはとてもよいものです。私が個人的に好きなものは
、xsane  で、これはいままで見たどんな商用製品とも
同じくらいエレガントで機能的です。魅力的な GTK+ ベースの GUI を使ってい
て、さまざまなフォーマットでイメージを保存でき、プリンタにイメージを送
り、GIMP に簡単につながります。フルカラーでアクセ
スし、お使いのハードウェアのその他の可能性を簡単に引き出します。

 GIMP は、GNU Image Manipulation Program とも言いますが、イメージを編集
したい、あるいは、PhotoshopTMのようなアプリケーション内のスキャン機能に
興味があるならとてもお勧めのもうひとつ別のプログラムです。xsane モジュ
ールがお使いのディストリビューションに依存している別のパッケージとして
利用できるかもしれません。GIMP を起動させた後、'File (ファイル)'をク
リックし、それからスキャナーにアクセスするために、' Xsane:device
dialog'で'Acquire(取得)'を選択します。

 さらに別の高機能のお勧めのフロントエンドはKDE desktop environment
のKooka です。他の
KDE アプリケーションと簡単に統合する直感的なインターフェースを持ってお
り、大きなイメージコレクションをとても簡単に管理できます。

 Xscanimage はスキャナーからイメージを得るための X11 でのいくぶん単純な
(しかし十分パワフルです)スキャナーアプリケーションです。ディストリビ
ューションによって SANE バックエンドにバンドルされているかもしれません
し、付属していないかもしれません。もっと詳しいことはman xscanimageを見
てください。

 the SANE frontends page  で、SANE フロントエンドのもっと完璧なリストを見る
ことができます。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

7. トラブル解決集

7.1. 私のスキャナーは scanimage でも xsane でも見つけることができません
!

 まず最初に、あきらめてはいけません。ここまでちゃんとすべてのことをして
きたという確信があるなら、すべての正しいモジュールがロードされ、すべて
の設定ファイルが説明通りに直され、お使いのハードウェアがサポートされて
いることも分かっているなら、許可属性を調べてください。スキャナーハード
ウェアにアクセスするために読みと書きの許可を持っていなければいけません
。詳しいことはSection 3.3を見てください。これが問題ないなら、/etc/
sane.d/(あるいは /usr/local/etc/sane.d)に行き、 dll.confというファイ
ルで、何かバックエンドをコメントアウトするか、必要のないその他のプロト
コル(たとえば v4l)をコメントアウトします。

 上記のことをやってもうまくいかないなら、SANE の設定ファイルがあるディ
レクトリで、お使いの個別のスキャナーに対するバックエンドの後ろにそのス
キャナーの名前がついたファイルを開いてください。そのファイルのなかにイ
ンターフェースタイプ(scsi 対 usb)、そしてデバイス名のふたつの重要な登
録があります(それ以外のものも並んでいますが):usb スキャナーを使って
いるなら、通常、'scsi'行(の先頭にある # マーク)をコメントアウトし、'
usb.' を含む行をアンコメントにしなければいけません。さらに、お使いのデ
ィストリビューションに合わせて(たとえば、 /dev/usbscanner0 は、 /dev/
usb/usbscanner0になるかもしれません)デバイス名を変更しなければいけませ
ん。お気づきのように、モデルに合わせてこのファイルのなかでお使いのスキ
ャナーを利用できるその他いくつかのオプションがあるかもしれませんので、
お使いのスキャナーが目論み通りに動かないなら、このファイルを調べたほう
がよいでしょう。どこかにそのモデルのための文書が付属しているかもしれま
せん。man sane-scsiまたは sane-usb 、あるいはお使いのスキャナーのどれか
の製造業者のものを見てください(sane-plustek、 sane-qcam、 sane-ricoh、
sane-sharp、 sane-snapscan、 sane-umaxなど)。リストのすべてについて、 
apropos saneを試してください。利用可能な正確なプロトコルと製造業者はお
使いの SANE に依存するかもしれません。

 上記のことがすべてだめなら、Section 7.5を見てください。さらに解決に挑
戦する気があるなら、これを書いている時点ではまだ完成していませんが、
sane-troubleshoot Homepage を調
べたほうがよいでしょう。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

7.2. USB ハードウェアが動いているか分かりません!

 usbdevfs と /proc ファイルシステムサポートがあると仮定して、次のコマン
ドを実行してください: cat /proc/bus/usb/devices。 USB バスの状態と接続
したデバイスそして、ハードウェアの調査結果を出力するはずです。スキャナ
ーがサポートされていて、お使いのハードウェアを認識できるなら、問題がど
こにあるかがわかるでしょう。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

7.3. 私が使った scanimage またはフロントエンドが不正なデバイスになりま
す!

 まず最初に、あなたの設定ファイルを通常の場所: /etc/sane.d または /usr
/local/etc/sane.d に置きます。一般に、ディストリビューションからあらか
じめコンパイルされたパッケージ、あるいは SANE のホームページからバイナ
リを入手したなら、/etc に置かれます、一方、ソースからコンパイルしたなら
、設定ファイルは/usr/local/etc/sane.d に置かれます。専用のディレクトリ
に入ります(cd)。 Section 2 で、SANE list of supported and
not-yet-supported ハードウ
ェアについて触れました。それであなたは"バックエンド" またはサポート状況
を加えたそれぞれのモデルに対する SANE ドライバをリストした個々の製造業
者の表のなかから見つけだせるでしょう。 /etc/sane.d または /usr/local/
etc/sane.d のなかで、それぞれのバックエンドに対して似たような名前のファ
イルがあります。あなたは dll.conf という名前のファイルを選択したはずで
す。これがひとつずつのバックエンドプロトコルをリストしています。お使い
のスキャナーのバックエンドがコメントアウトされていないかどうかを調べて
ください(すなわち、その行頭にハッシュマークがあるかどうか)。そうなっ
ているなら、(root で、そしてあなたのエディタプログラムを使って)'#.'
を取り外さないといけないでしょう。それでもまだ動かないなら、Section 7.5
を見てください。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

7.4. パラレルポートスキャナーに root でしかアクセスできません!

 スキャナーに対する SANE ドライバはパラレルポート(/dev/portを経由して
)に直接アクセスします。これはセキュリティの理由で root でしか動きませ
ん。この問題にどのように対処するかについての説明している Till Kamppeter
のthis mini-HOWTO を見てください
。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

7.5. Acme WhizzbangTMのスキャナーを持っていますが、特有の問題や質問をす
るところがありません。

 SANE のウエッブサイトで、 the mailing list and irc channel  に行ってください。申し込みの方
法やその他のことについての解説のリンクを調べてください。また、いくつか
のハードウェア特性についての質問や回答、そして関連文書へのリンクがある
SANE FAQ を読んだほうがよいで
しょう。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

7.6. SANEについて、サポートされているスキャナーや SANE の開発についての
詳細な情報はどこにありますか。

 先の質問の答えを見てください。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

8. 日本語訳について

 翻訳にあたって査読をしてくださり校正をして下さった方々、そして助言を頂
いた JF の方々に感謝します。

 

 ・ 堺さん:s_sakai@mxn.mesh.ne.jp
   
 ・ 小林さん:zap03216@nifty.ne.jp
   
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 

9. Gnu Free Documentation License

 Version 1.2, November 2002

 Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to
copy and distribute verbatim copies of this license document, but
changing it is not allowed.

 0. PREAMBLE

 The purpose of this License is to make a manual, textbook, or other
functional and useful document "free" in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it, with
or without modifying it, either commercially or noncommercially.
Secondarily, this License preserves for the author and publisher a way
to get credit for their work, while not being considered responsible
for modifications made by others.

 This License is a kind of "copyleft", which means that derivative
works of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft cense
designed for free software.

 We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals; it
can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.

  1. APPLICABILITY AND DEFINITIONS

 This License applies to any manual or other work, in any medium, that
contains a notice placed by the copyright holder saying it can be
distributed under the terms of this License. Such a notice grants a
world-wide, royalty-free license, unlimited in duration, to use that
work under the conditions stated herein. The "Document", below, refers
to any such manual or work. Any member of the public is a licensee, and
is addressed as "you". You accept the license if you copy, modify or
distribute the work in a way requiring permission under copyright law.

 A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.

 A "Secondary Section" is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall subject
(or to related matters) and contains nothing that could fall directly
within that overall subject. (Thus, if the Document is in part a
textbook of mathematics, a Secondary Section may not explain any
mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.

 The "Invariant Sections" are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License. If a
section does not fit the above definition of Secondary then it is not
allowed to be designated as Invariant. The Document may contain zero
Invariant Sections. If the Document does not identify any Invariant
Sections then there are none.

 The "Cover Texts" are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License. A Front-Cover Text may be
at most 5 words, and a Back-Cover Text may be at most 25 words.

 A "Transparent" copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the general
public, that is suitable for revising the document straightforwardly
with generic text editors or (for images composed of pixels) generic
paint programs or (for drawings) some widely available drawing editor,
and that is suitable for input to text formatters or for automatic
translation to a variety of formats suitable for input to text
formatters. A copy made in an otherwise Transparent file format whose
markup, or absence of markup, has been arranged to thwart or discourage
subsequent modification by readers is not Transparent. An image format
is not Transparent if used for any substantial amount of text. A copy
that is not "Transparent" is called "Opaque".

 Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format, SGML or
XML using a publicly available DTD, and standard-conforming simple
HTML, PostScript or PDF designed for human modification. Examples of
transparent image formats include PNG, XCF and JPG. Opaque formats
include proprietary formats that can be read and edited only by
proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the machine-generated
HTML, PostScript or PDF produced by some word processors for output
purposes only.

 The "Title Page" means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in formats
which do not have any title page as such, "Title Page" means the text
near the most prominent appearance of the work's title, preceding the
beginning of the body of the text.

 A section "Entitled XYZ" means a named subunit of the Document whose
title either is precisely XYZ or contains XYZ in parentheses following
text that translates XYZ in another language. (Here XYZ stands for a
specific section name mentioned below, such as "Acknowledgements",
"Dedications", "Endorsements", or "History".) To "Preserve the Title"
of such a section when you modify the Document means that it remains a
section "Entitled XYZ" according to this definition.

 The Document may include Warranty Disclaimers next to the notice which
states that this License applies to the Document. These Warranty
Disclaimers are considered to be included by reference in this License,
but only as regards disclaiming warranties: any other implication that
these Warranty Disclaimers may have is void and has no effect on the
meaning of this License.

  2. VERBATIM COPYING

 You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.

 You may also lend copies, under the same conditions stated above, and
you may publicly display copies.

  3. COPYING IN QUANTITY

 If you publish printed copies (or copies in media that commonly have
printed covers) of the Document, numbering more than 100, and the
Document's license notice requires Cover Texts, you must enclose the
copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify you
as the publisher of these copies. The front cover must present the full
title with all words of the title equally prominent and visible. You
may add other material on the covers in addition. Copying with changes
limited to the covers, as long as they preserve the title of the
Document and satisfy these conditions, can be treated as verbatim
copying in other respects.

 If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.

 If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a computer-network location from which the general network-using public
has access to download using public-standard network protocols a
complete Transparent copy of the Document, free of added material. If
you use the latter option, you must take reasonably prudent steps, when
you begin distribution of Opaque copies in quantity, to ensure that
this Transparent copy will remain thus accessible at the stated
location until at least one year after the last time you distribute an
Opaque copy (directly or through your agents or retailers) of that
edition to the public.

 It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.

  4. MODIFICATIONS

 You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release the
Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy of
it. In addition, you must do these things in the Modified Version:

 A. Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions (which
should, if there were any, be listed in the History section of the
Document). You may use the same title as a previous version if the
original publisher of that version gives permission.

 B. List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has fewer than five),
unless they release you from this requirement.

 C. State on the Title page the name of the publisher of the Modified
Version, as the publisher.

 D. Preserve all the copyright notices of the Document.

 E. Add an appropriate copyright notice for your modifications adjacent
to the other copyright notices.

 F. Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the
terms of this License, in the form shown in the Addendum below.

 G. Preserve in that license notice the full lists of Invariant
Sections and required Cover Texts given in the Document's license
notice.

 H. Include an unaltered copy of this License.

 I. Preserve the section Entitled "History", Preserve its Title, and
add to it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If there
is no section Entitled "History" in the Document, create one stating
the title, year, authors, and publisher of the Document as given on its
Title Page, then add an item describing the Modified Version as stated
in the previous sentence.

 J. Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise the
network locations given in the Document for previous versions it was
based on. These may be placed in the "History" section. You may omit a
network location for a work that was published at least four years
before the Document itself, or if the original publisher of the version
it refers to gives permission.

 K. For any section Entitled "Acknowledgements" or "Dedications",
Preserve the Title of the section, and preserve in the section all the
substance and tone of each of the contributor acknowledgements and/or
dedications given therein.

 L. Preserve all the Invariant Sections of the Document, unaltered in
their text and in their titles. Section numbers or the equivalent are
not considered part of the section titles.

 M. Delete any section Entitled "Endorsements". Such a section may not
be included in the Modified Version.

 N. Do not retitle any existing section to be Entitled "Endorsements"
or to conflict in title with any Invariant Section.

 O. Preserve any Warranty Disclaimers. If the Modified Version includes
new front-matter sections or appendices that qualify as Secondary
Sections and contain no material copied from the Document, you may at
your option designate some or all of these sections as invariant. To do
this, add their titles to the list of Invariant Sections in the
Modified Version's license notice. These titles must be distinct from
any other section titles. You may add a section Entitled
"Endorsements", provided it contains nothing but endorsements of your
Modified Version by various parties--for example, statements of peer
review or that the text has been approved by an organization as the
authoritative definition of a standard.

 You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of Front-Cover
Text and one of Back-Cover Text may be added by (or through
arrangements made by) any one entity. If the Document already includes
a cover text for the same cover, previously added by you or by
arrangement made by the same entity you are acting on behalf of, you
may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.

 The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.

 5. COMBINING DOCUMENTS

 You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice, and that you preserve all their Warranty Disclaimers.

 The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of Invariant
Sections in the license notice of the combined work.

 In the combination, you must combine any sections Entitled "History"
in the various original documents, forming one section Entitled
"History"; likewise combine any sections Entitled "Acknowledgements",
and any sections Entitled "Dedications". You must delete all sections
Entitled "Endorsements".

 6. COLLECTIONS OF DOCUMENTS

 You may make a collection consisting of the Document and other
documents released under this License, and replace the individual
copies of this License in the various documents with a single copy that
is included in the collection, provided that you follow the rules of
this License for verbatim copying of each of the documents in all other
respects.

 You may extract a single document from such a collection, and
distribute it individually under this License, provided you insert a
copy of this License into the extracted document, and follow this
License in all other respects regarding verbatim copying of that
document.

 7. AGGREGATION WITH INDEPENDENT WORKS

 A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, is called an "aggregate" if the copyright
resulting from the compilation is not used to limit the legal rights of
the compilation's users beyond what the individual works permit. When
the Document is included in an aggregate, this License does not apply
to the other works in the aggregate which are not themselves derivative
works of the Document.

 If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one half of
the entire aggregate, the Document's Cover Texts may be placed on
covers that bracket the Document within the aggregate, or the
electronic equivalent of covers if the Document is in electronic form.
Otherwise they must appear on printed covers that bracket the whole
aggregate.

 8. TRANSLATION

 Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License, and all the license notices in the
Document, and any Warranty Disclaimers, provided that you also include
the original English version of this License and the original versions
of those notices and disclaimers. In case of a disagreement between the
translation and the original version of this License or a notice or
disclaimer, the original version will prevail.

 If a section in the Document is Entitled "Acknowledgements",
"Dedications", or "History", the requirement (section 4) to Preserve
its Title (section 1) will typically require changing the actual title.

 9. TERMINATION

 You may not copy, modify, sublicense, or distribute the Document
except as expressly provided for under this License. Any other attempt
to copy, modify, sublicense or distribute the Document is void, and
will automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such parties
remain in full compliance.

 10. FUTURE REVISIONS OF THIS LICENSE

 The Free Software Foundation may publish new, revised versions of the
GNU Free Documentation License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in
detail to address new problems or concerns. See http://www.gnu.org/
copyleft/.

 Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
License "or any later version" applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.

 ADDENDUM: How to use this License for your documents

 To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and license
notices just after the title page:

 Copyright (c) YEAR YOUR NAME. Permission is granted to copy,
distribute and/or modify this document under the terms of the GNU Free
Documentation License, Version 1.2 or any later version published by
the Free Software Foundation; with no Invariant Sections, no
Front-Cover Texts, and no Back-Cover Texts. A copy of the license is
included in the section entitled "GNU Free Documentation License".

 If you have Invariant Sections, Front-Cover Texts and Back-Cover
Texts, replace the "with...Texts." line with this: with the Invariant
Sections being LIST THEIR TITLES, with the Front-Cover Texts being
LIST, and with the Back-Cover Texts being LIST. If you have Invariant
Sections without Cover Texts, or some other combination of the three,
merge those two alternatives to suit the situation.

 If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License, to
permit their use in free software.

一覧に戻る
グリーンネット・トップページへ戻る

http://www.green.ne.jp/