ThinkPad 530CS で Linux やまだてつやす tetsu@cauchy.nslab.ntt.jp あべひろのぶ hironobu@ap.isl.melco.co.jp v1.01, 1996/02/09 Revision History Revision 1.01 1996年2月9日 この文書 Revision 1.00 1996年2月2日 pre Release この文書は筆者らが所有する ThinkPad 530CS に Linux をインストールした時 にメモしたものをまとめたものです。これから ThinkPad 530CS で Linux をイ ンストールして使いたい人のヒントにでもなれば、と思ってとりあえず公開す ることにしました。 Note: この文書はかなり以前に書かれたものなので、いまどきの Linux 環 境にはあてはまらない箇所があります。 (JF Project) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Table of Contents はじめに 1. Slackware-3.0のインストール & XFree86の設定 1.1. 今回の実験台 1.2. ものの準備 1.3. Linux のインストール 1.4. 最低限の環境設定 1.5. X の環境設定 1.6. その他のケース 2. システムの設定 & JE-0.9.7j のインストール 2.1. kernel の再構築 2.2. pcmcia-cs の再設定 2.3. APM 対応のアプリケーション 2.4. JE-0.9.7jのインストール、設定 3. 設定ファイルの例 3.1. /etc/XF86Configの例 3.2. ~/.xinitcの例 3.3. ~/.fvwmrcの例 List of Examples 1-1. 図1 DOSパーティションの分割 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Chapter . はじめに この文書は筆者らが所有する ThinkPad 530CS に Linux をインストールした時 にメモしたものをまとめたものです。これから ThinkPad 530CS で Linux をイ ンストールして使いたい人のヒントにでもなれば、と思ってとりあえず公開す ることにしました。 また例によってのりだけで思い付いてから数日で作成したので間違いも多いと は思いますが、筆者らのマシンで挑戦したことの記録として、この文書と一緒 に成長して行く予定になっていますので(今後不定期にバージョンアップして行 く予定です)、何か情報がある方は上記 2 人までメールを下さい。 この文書に出会って皆さんの環境が少しでも良くなれば幸いです。 (あべひろ のぶ) この文書は以下の様な3章構成になっています。ただし、書き方は章によって自 由ですし、内容に一貫性が無い部分があるかも知れませんが御了承下さい。 ┌──────────────────────────────────┐ │ 第1章 Slackware-3.0のインストール & XFree86の設定 (やまだ) │ │ 第2章 システムの設定 & JE-0.9.7jのインストール (あべ) │ │ 第3章 設定ファイルの例 (やまだ) │ └──────────────────────────────────┘ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Chapter 1. Slackware-3.0のインストール & XFree86の設定 従来は、「PCMCIA のスロットを持ったサブノート PC に Linux をインストー ルする際は、Ethernet カードを用いて NFS で行なうのが楽だ」と言われてい ました。ところが、PCMCIA の SCSI カード対応の boot/rootdisk が作られる に至って、今や SCSI の CD-ROM からのインストールの方が簡単になってしま いました。 PCMCIA の SCSI カードと SCSI の CD-ROM ドライブが手元にある(または人か ら借りて来られる)人は、ぜひ CD-ROM からのインストールを試してみて下さい 。 本章では、ThinkPad530CS (以下 530CS )に、PCMCIA の SCSI カードと CD-ROM ドライブを用いて、Slackware-3.0 と XFree86 をインストールする方法を説明 します。 CD-ROM としては、LASER5 から出されている、「LINUX+JE4(1995/12)」(以下 JE^4 )を使います。この CD-ROM には、Slackware-3.0、JE0.9.7 が含まれてい ます。 ┌──────────────────────────────────┐ │ 「LINUX+JE4(1995/12)」 │ │ 発売元: LASER5出版局 │ │ 〒101 東京都千代田区外神田3-6-10 S.C.Cビル2F │ │ TEL 03-5256-1663 │ │ FAX 03-5256-5524 │ └──────────────────────────────────┘ Ethernet カードを用いた NFS でのインストール方法、ThinkPad 230Cs (以下 230Cs )や Canon INNOVA へのインストール方法については、違う点だけ別に解 説します。 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1. 今回の実験台 ・ 530CS 本体 2607-7FK(メモリ=20MB,HD=700MB,Windows95プレインストールモデル) ・ PCMCIA の SCSI カード Qlogic Fast!SCSI PCMCIA-10 Adaptec SlimSCSI (APA-1460) ・ CD-ROM ドライブ Logitec LCD-M500(SCSI, 2倍速) 外付けアクティブターミネータ 内蔵HDは、 ・ Windows3.1+DOS のみ ・ Windows95 のみ のどちらかの使い方をしていると仮定しています。複数の OS を入れている人 は、それなりのスキルがあると思いますので、本文を適宜読みかえて下さい。 ディスクドライブの DOS 上での名称. フロッピーディスク (FD) :ドライブ A 内蔵ハードディスク (HD) :ドライブ C 外付け CD-ROM ドライブ (CD) :ドライブ D ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2. ものの準備 [用意するもの] a. 530CS Windows 3.1, Windows 95 モデルのどちらでも可。 OS/2 モデルのことは分からない(持ってないので)。 b. PCMCIA の SCSI カード(以下のものは実績あり) Qlogic Fast!SCSI PCMCIA-10 Adaptec SlimSCSI (APA-1460) New Mesia Bus Toaster SCSI c. SCSI の外付け CD-ROM ドライブ SCSI カードのケーブルとコネクタの形状が合うかチェック。ターミネータ パワーを供給できるものであること。 d. FD (2HD を 3 枚以上) e. JE^4 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2.1. FD の準備 1. boot/rootdisk PCMCIA 用 boot/rootdisk を以下から持って来ます。 ftp:// ftp.kuis.kyoto-u.ac.jp/Linux/NotePC/pcscsi20i.gz これを、 C:> GZIP.EXE -DV PCSCSI20.GZ として解凍し、RAWRITE で FD に書き込みます。GZIP は、JE^4 の中なら ば、 /install/gzip.exe にあります。 FD に書き込みプロテクトをして「Slackware-3.0 boot/rootdisk (pcscsi20i)」とでも書いておきます。 2. FIPS用FD C:> FORMAT A: /S で、DOS の起動用FDを作成し、その中に、JE^4 の中の /tools/fips12.zip を解凍したものをコピーします。 FD に書き込みプロテクトをして「FIPS12」とでも書いておきます。 3. SVGA_for_230.tar.gz 230Cs 用パッチキットから、LCD画面関係のツールを持って来ます。 ftp:/ /ftp.lab.kdd.co.jp/OS/Linux/TP230CS/230kits/SVGA_for_230.tar.gz これを、フロッピーディスクにコピーしておきます。 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2.2. HD の準備 これ以降の作業は、途中でバッテリ切れが起きないよう、AC アダプタを付けて 行なって下さい。 ・ [バックアップ] 530CS の HD に入れてある、自分の作成したファイルについては、必ずバ ックアップを取って下さい。 HD 内には、DOS,Windows, ThinkPad 専用プログラム,おまけソフトがプレ インストールされています。念のためバックアップを取っておきましょう 。 (これらは、最悪の場合でもお金を払えば手に入れられます) ・ [HDの整理] Linuxをインストールするために必要な HD の空き容量の目安は以下の通り です(もちろん、使い方にもよります)。 □ X ウィンドウシステム(以下 X と略)を使わないなら 50MB以上 □ X を使うなら 140MB以上 バックアップを取ったならば、不要なファイルは思い切って消しましょう。使 わないなら、Windows を消すのも手です。これによりかなりの容量の空きがで きます。 HD の整理にあたっては、いくつか注意事項があります。 ・ (注1) DOS ぐらいは動くようにしておく。 Linux が動くようになってからも、内蔵 DSP や高度省電力機能 (APM) の 設定変更などのために DOS 上のプログラムが必要です。DOS が立ち上がる ために必要な最低限のファイルと、以下のプログラムは消さないで下さい 。 消してはいけないもの ┌───────────────────────────────┐ │ DOS : 立ち上がる程度でいいです。 │ │ DEFRAG.EXE : 後で使います。 │ │ PS2.EXE : APM、シリアルポートの設定等 │ │ MWGAMES.EXE : 内蔵DSPのサウントブラスターモード設定/解除│ └───────────────────────────────┘ ・ (注2) ハイバネーションファイルを作成しておく。 530CS では、メモリの内容を HD に書き込むことで、電気を全く消費する ことなく、作業状態を保存しておくことができます。この機能をハイバネ ーションと呼びます。 530CS のハイバネーション機能では、メモリ内容を DOS のパーティション 中にある、ハイバネーション用のファイル(見えないファイル)に書き込み ます。このため、DOS パーティションがなかったり、あったとしてもその 中にハイバネーションファイルがなかったりすると、ハイバネーションは 失敗に終ります。 普通はハイバネーションファイルがすでにあるはずですが、念のため、作 っておきます。 ハイバネーションファイルの作成法は、HD が C ドライブの場合、PS2 コ マンドを HFILE C オプションを付けて呼び出します。メモリ量+1MBぐらい のサイズの、見えないファイル(pm_hiber.bin)ができます。 C:\> PS2 HFILE C すでにある場合は、文句を言って来ますが別に問題ありません。 なお、メモリ量によってハイバネーション用ファイルの大きさも違うので、後 でメモリを増設した場合には、このコマンドを再実行する必要があります。メ モリ増設の予定のある場合、DOS パーティションの容量が足りなくならないよ うに注意して下さい。 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2.3. DOSパーティションの最適化(DEFRAG) DOSパーティションの後ろを切って空きのDOSパーティションとし、これを Linux用にします。 Example 1-1. 図1 DOSパーティションの分割 =================== =================== DOSパーティション(使用) FIPS (400MB) DOSパーティション → ------------------- (720MB) DOSパーティション(空き) (300MB) =================== =================== HD 上の DOS のファイルをきれいに上から詰めておかないと、空き容量の割に は Linux パーティションが小さくなってしまいます。 DEFRAG というプログラムが付いて来るので、これを実行します。DEFRAG は、 Windows95 ならば、 ┌──────────────────────────────────┐ │ スタート/アクセサリ/システムツール/デフラグ │ │ (場所は、C:\WINDOWS\DEFRAG) │ └──────────────────────────────────┘ Windows3.1ならば、Windowsを終了して、DOSで C:> C:\DOS\DEFRAG あとは指示にしたがって、ハードディスクを最適化してください。 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2.4. DOS パーティションを切り詰める(FIPS) DOS パーティションを切り詰めるには、FIPS を使います。私が何度か使った限 りにはトラブルはありませんでしたが、ファイルを破壊する恐れがないとは言 えないので、重要なファイルのバックアップは必ず取っておいて下さい。 覚悟ができたら、FIPS 用 FD で起動し、FIPS を起動します。 A:\> FIPS あとは表示(英語)に従って作業を行なって下さい。使用中 DOS パーティション のサイズをいくつに詰めるかを聞かれるだけなので、カーソルキーで数値を変 えて、リターンを押せば終りです。 注: FIPS はパーティションの分割はできますが、結合はできません。DOS 用のエリアを切り詰め過ぎないよう注意して下さい。 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3. Linux のインストール 1.3.1. ブート〜 root でのログイン boot/rootdisk を入れて起動します。boot: が出たらそのまま ENTER を押して 下さい。(以前のバージョンでは、ramdisk=2000 が必要でしたが、今回はデフ ォルト 2000 になったみたいです。) 注: この時点では、キーマップが英語の 101 キーボード用になっているの でご注意下さい。 rootdisk の内容も ramdisk に自動的に読み込んで最終的に login プロンプト が出るので、root でログインします。 slackware login: root ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3.2. Linux パーティション作成 (fdisk) 無事に root でログインできたら、fdisk で Linux パーティションを作成しま す。簡単に、swap と / に分けることとします。 =================== =================== DOSパーティション DOSパーティション /dev/hda1 (400MB) fdisk (400MB) ------------------- → ------------------- DOSパーティション(空き) Linux-swap (20MB) /dev/hda2 (300MB) Linux-/ (280MB)/dev/hda3 =================== =================== 図2 Linuxパーティションの分割 各パーティションの容量としては、 ・ swap 一般的に以下のように言われています。 □ メモリ量が16MB以下の場合=16MB □ メモリ量が16MB超の場合 =メモリ量と同じ ここでは、メモリフル搭載(20MB)と仮定して、20MBのswapを作ることにし ます。 ・ / 残り全てを当てます。 fdiskの使い方については、JE^4のマニュアルを参照して下さい。 # reboot で再起動します。boot/rootdisk で立ち上げ、root でログインするところまで 進んで下さい。 fdisk で確認して以下のようになっていれば成功です。 Disk /dev/hda: 32 heads, 63 sectors, 700 cylinders Units = cylindres of 2016 * 512 bytes Device Boot Begin Start End Blocks Id System /dev/hda1 * 1 1 394 397120+ 6 DOS 16-bit >=32M /dev/hda2 395 395 415 21168 82 Linux swap /dev/hda3 437 437 700 266112 83 Linux native おかしい場合は、fdisk をやり直して下さい。 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3.3. CD-ROMドライブの認識 CD-ROM ドライブの SCSI-ID は 0〜6 の内のどれかにしておきます。CD-ROM ド ライブをつなぐ際は、以下のように行ないます。 1. CD-ROMドライブの電源を切る。 2. SCSI カードと CD-ROM ドライブをケーブルで接続する。 3. CD-ROM ドライブの電源を入れる。 4. SCSI カードを 530CS に差し込む。 外す時はこの逆です。 差し込むと画面にいろいろ出て来ます。 Qlogic の Fast!SCSI の場合は、 # Jan 28 15:23:38 cardmgr[25] initializing socket 0 Jan 28 15:23:38 cardmgr[25]: socket 0: Qlogic FastSCSI Jan 28 15:23:38 cardmgr[25]: executing: '/sbin/insmod/lib/modules/1.2.13/pcmcia/qlogic_cs.o' Ql: Using present base address of 2e0 Ql: Using present IRQ 3 scsi0: Qlogic Driver version 0.43, chip 50 at 2E0, IRQ 3, TPdma:1 scsi : 1 host. Vendor: SONY Model: CD-ROM CDU-561 Rev: 1.7X Type: CD-ROM ANSI SCSI revision: 02 Detected scsi CD-ROM sr0 at scsi0, id 3, lun 0 AdaptecのSlimSCSIの場合は、 # Jan 28 15:32:05 cardmgr[25] initializing socket 0 Jan 28 15:32:05 cardmgr[25]: socket 1: Adaptec APA-1460 SlimSCSI Jan 28 15:32:05 cardmgr[25]: executing: '/sbin/insmod /lib/modules/1.2.13/pcmcia/toaster_cs.o' aha152x: processing commandline: ok detection complete aha152x: vital data: PORTBASE=0x340, IRQ=3, SCSI ID=7, reconnect=enabled, parity=enabled scsi0 : Adaptec 152x SCSI driver; $Revision: 1.6 $ scsi : 1 host. Vendor: SONY Model: CD-ROM CDU-561 Rev: 1.7X Type: CD-ROM ANSI SCSI revision: 02 Detected scsi CD-ROM sr0 at scsi0, id 3, lun 0 チェックのポイントは、 ・ /sbin/insmod ...という行で、適切なドライバが起動されていること。こ れが出ないと、カードが認識されていません。 ・ Detected scsi CD-ROM ...という行が出ること。出ない時は、CD-ROM ドラ イブの電源の入れ忘れ、SCSI-ID の不正、ターミネータが接続されていな い、などをチェックして下さい。 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3.4. setup ここからはデスクトップ機のインストール手順と同様です。 1. Slackware のパッケージの入っている CD-ROM (JE^4 ならば DISK 2) を CD-ROM ドライブに入れる。 2. setup を起動。 # setup 3. QUICK モードの選択 QUICK を選び、QUICK モードにします。 4. KEYMAP で 106 キーを選択 101 キーのブラインドタッチのできる人でなければ、KEYMAP を選び、 j106-d.map.gz を選択します。ここでキーマップを選択しておくと、イン ストール後も 106 キーボードのキーマップが使えるようになります。 5. ADDSWAP を選択 質問に全て Yes と OK で答えます。最後に "CONTINUE WITH INSTALLATION?" と聞いてくるので、Yes を選びます。 6. root パーティションの指定 /dev/hda3 を選びます。フォーマットの時は、Check を選んで不良ブロッ クをチェックすることをお勧めします。INODE DENSITY は 4096 でいいで す。 7. DOS パーティションのマウント /dev/hda1 が DOS パーティションだけどマウントするか、と聞いてくるの で、Yes と答え、/dev/hda1 を指定します。どこにマウントするかは、/ dosc などと答えます。他のパーティション名を聞いてきたら q で進みま す。 8. ソースメディアの選択 5 の Install from CD-ROM を選びます。どの CD-ROM かと聞いてくるので 、scan を選ぶと /dev/scd0 が検出されます。JE^4 の場合は、 slakware を選びます。 9. ディスクセットの選択 後で JE を入れるつもりの人は、以下のもの-以外-を選択します。HD の空 き容量が少ないならば、更に減らす必要があるかも知れません。 ┌───────────────────────────────┐ │ [CUS](関係ない) │ │ [E] (JEにある) │ │ [K] (2章で新しいカーネルを入れるため、ここでは入れません) │ │ [Q] (Ethernet接続をしないなら不要) │ │ [T] (JEにある) │ │ [TCL](JEにある) │ │ [XD] (HDの節約のため。入れてもいいです) │ │ [XV] (HDの節約のため。入れてもいいです) │ └───────────────────────────────┘ 10. 各ディスクセット毎のパッケージ選択 各自の好みに合わせて選択します。分からない場合は、インストールする ことにしておけば問題ありません。 各ディスクセット毎の注意事項だけ書きます。 ┌─────────────────────────────────────┐ │ [A] カーネルはscsiかidenetかのどちらか一方だけを選ぶ。 │ │ pcmciaは、2章で入れ換えるので入れない。 │ │ Xをインストールするならば、gpmを-入れない-こと。 │ │ [AP] 得になし │ │ [D] Cコンパイラは、今後のプログラムのインストールのために必須です。 │ │ [F] 得になし │ │ [N] 得になし │ │ [X] Xサーバは、x312svgaを選択。 │ │ その他のプログラムなど(次の面)は、できるだけ全部入れる。 │ │ [XAP] 得になし │ │ [Y] doomは、内蔵DSPの動作確認に使えるので、ぜひ入れること:-)。 │ │ bsdgamesを入れると、fortuneがインストールされ、loginのたびにメッ │ │ セージが表示されるが気にしないこと(/etc/profile, /etc/csh.login │ │ をいじれば止められます)。 │ └─────────────────────────────────────┘ 11. コンフィグレーション 勢いに乗って設定までしてしまいましょう。特に注意する点だけ書きます 。 □ マウスの種類は、PS/2(C&T 82C710 or PS/2)を選ぶ。 □ 内蔵モデムはデフォルトでは COM2 です。スピードも 38400 でいいと 思います。内蔵モデムが使えたという報告はまだ聞いていません。ぜ ひトライして下さい。 □ ネットワークの設定は、loop back only を選ぶ。PCMCIA の Ethernet カードの設定はここではできませんので。 □ gpm を入れるかどうか聞いてくるので、X を入れる人は NO を選ぶ。 □ LILOのインストールは、 ┌──────────────────────────┐ │ Beginを選択、だけ入力 │ │ Linuxを選択、/dev/hda3を指定。 │ │ DOSを選択、/dev/hda1を指定。 │ │ Installを選択、MBRを選択、時間は5秒を選択。 │ └──────────────────────────┘ これでインストールは終りです。SCSI カードを抜き、フロッピーを抜いて 、いったん電源を OFF してみましょう。急に電源スイッチを押さず、次の 手順に従って下さい。 12. 電源 OFF の際の心得 Linux はマルチタスクの OS なので、特に作業を行なっていない時でも、 裏で動いているプロセスが HD への書き込みを行なっていることもありま す。また、 HDに書き込んだつもりのデータが、まだキャッシュ(メモリ)上 にあり、HD へは書き込まれていないこともあります。このため、急に電源 を切るとHDの内容が破壊されたり、矛盾を起こしたりすることがあります 。 電源を切る時は、root でログインして、 # shutdown -h now と打ち、しばらく待って、 ┌────────────────────────────┐ │ System halted │ │ INIT: No more processes left in runlevel 0 │ └────────────────────────────┘ の両方が表示されてから、電源スイッチを押して下さい。 13. 正常に起動するかの確認 電源を ON するか、DOS や Windows 上で再起動を行なうと、LILO が起動 されます。 LILO: とプロンプトが出て、放っておくと Linux が立ち上がります。root 以外のアカウントはまだ無いので、root でログインして、reboot を実行 しましょう。 LILO: と出たところで、タブキーを押すと、Linux DOS と表示されるので 、 DOS と打って、DOS パーティションの中の OS が立ち上がるか チェックしましょう。この例では Windows95 が無事に立ち上がりました。 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4. 最低限の環境設定 1.4.1. root のパスワードの設定 root は既に登録されていますが、パスワードが空っぽです。root のパスワー ドを忘れるとちょっと面倒ですから、慎重に設定します。 setup の KEYMAP で 106 キーボードを選択した人はいいのですが、そうでない 場合、キートップの文字と違う文字が入力されることになります。少し打って みて、特に記号のキー(括弧や=+-/*など)で思った通りの文字が出るかどうか確 認してからパスワードの設定に移ります。 root のパスワードを設定するには、root でログインして、passwd コマンドを 実行します。 # passwd ┌──────────────────────────────────┐ │ Enter new password: │ │ ^^^^^^見えません │ │ Re-type new password: │ │ ^^^^^^見えません │ └──────────────────────────────────┘ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4.2. ユーザの登録 いつも root で作業をするのは危険なので、adduser を実行し、一般のユーザ の登録をします。 # adduser 質問に答えて行くと、/etc/passwd にユーザ名が登録され、 /home にディレク トリが作られ、基本的な設定ファイルがコピーされます。今後はできるだけ root での作業は行なわないようにしましょう。 以降、% のプロンプトで一般ユーザ、# のプロンプトで root を示します。 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5. X の環境設定 1.5.1. X サーバの選択と XF86Config の作成 (xf86config) xf86config を起動し、/var/X11R6/bin/X のシンボリックリンク(XF86_SVGAへ) と、/etc/XF86Config の作成を行ないます。 # xf86config (rootで実行) 途中で失敗したら、/etc/XF86Config を消してから xf86config を再実行しま す。 530CS では、以下の設定で作成した XF86Config に、1行書き加え、1行修正す るだけで動きます。 マウスの種類 : PS/2 Mouse Emulate3Buttons : y Mouse device : ... for the Alt keys? : n hsync : 31.5 (一番低いのを選択) vsync : 40-150 (一番狭いのを選択) monitor definition : vendor name : model name : look at... card database: y card definition : Cirrus Logic GD62XX (laptop) Xサーバ : XF86_SVGA set the symbolic link? : y set in /var/X11R6/bin? : y video memory : 512K card definition : vendor name : model (board) name : clgd6205(後で探しやすくするため) clock chip : X -proveonly now? : y resolution : 全て640x480にする write it to /etc/XF86...: y できあがった /etc/XF86Config の中から clgd6205 という行を探し、その後ろ に1行追加します。 Boardname "clgd6205" Chipset "clgd6205" ← 追加 #VideoRam 512 Section "Screen" 中で、Driver "svga" とあるところの、 ┌──────────────────────────────────┐ │ Virtual 800 600 │ └──────────────────────────────────┘ という行を、 ┌──────────────────────────────────┐ │ Virtual 640 480 │ └──────────────────────────────────┘ と直します。 これで準備は半分 OK です。一度 X を起動してみます。ログをファイルに落し ておいた方が後で確認できます。 % startx >& startx.log と打つと、派手な水色の画面が出て来ます。まだカーソルを動かすとチラチラ しますが、これは後で直すことにします。 出て来ない場合は、X サーバのシンボリックリンクが間違っているか、 XF86Config の内容がおかしいので、以下のことをチェックします。 1. startx を起動したディレクトリの中に /etc/XF86Config とは別の XF86Config がありませんか?あったら消すかリネームしておきます。 2. startx.log の中を見て、 ┌────────────────────────────┐ │ SVGA: server for 8-bit colour SVGA .... │ └────────────────────────────┘ という行がありますか?無ければ、X サーバのシンボリックリンク先が XF86_SVGA になっていません。 % ls -l /var/X11R6/bin/X で確認して下さい。 3. startx.log の中を見て、 ┌────────────────────────────┐ │ (**) SVGA chipset: clgd6250 │ └────────────────────────────┘ という行がありますか?無ければ、/etc/XF86Config が間違っています。 ┌────────────────────────────┐ │ Chipset "clgd6205" │ └────────────────────────────┘ という行があるかどうか確認して下さい。 これでもだめな時は、パートIII の XF86Config のサンプルを /etc にコ ピーして下さい。 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5.2. ビデオチップのクロックの設定(vgaclk0) 画面のちらつきを直すためには、X サーバ (XF86_SVGA) のソースにパッチを当 てて make しなおすか、vgaclk0 というプログラムを root で実行するかのど ちらかを行ないます。 外付けディスプレイをつなぐ場合も考えると、vgaclk0 を使用するほうが便利 だと思います。 フロッピーに入れておいた、SVGA_for_230.tar.gz を持って来て、 % tar zxvf SVGA_for_230.tar.gz % cd SVGA_for_230/ktakagi/gdset % make % su (rootになる) # make install (rootで) これで、 ・ /usr/local/bin/gdset ・ /usr/local/bin/vgaclk0 がインストールされます。setuid をする必要があるため、root でインストー ルしなくてはなりません。 /usr/lib/X11/xinit/xinitrc.fvwm をホームに .xinitrc という名前でコピー して来ます。 % cp /usr/lib/X11/xinit/xinitrc.fvwm ~/.xinitrc そして、#!/bin/bash の行の後ろに、以下のように3行を加えます。 #!/bin/bash if [ -x /usr/local/bin/vgaclk0 ]; then ← 追加 /usr/local/bin/vgaclk0 ← 追加 fi ← 追加 これで、X を起動すると、もうちらつきません。 fvwm の設定を変えたい時は、 /usr/lib/X11/fvwm/sample_configs/ system.fvwmrc などを、ホームに .fvwmrc という名前でコピーしてから修正し ます。 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6. その他のケース 1.6.1. NFS でのインストールのしかた(差分のみ) Ethernet に接続できる環境の人は、新しく買うならば、SCSI カードではなく 、 Ethernet カードを買うことをお勧めします。UNIX マシンは、ネットワーク で接続されてこそ本来の味が出ます。 ・ Ethernet カード PCMCIA の Ethenet カードとしては、以下のものが動作確認済みです。 3Com 3c589b Accton EN2212(とその互換品) Melco LPT-T IBM Ethernet PCMCIA Card II (Credit Card Ethernet Adapter) ・ NFS のしかた 1. ホストマシンの /etc/hosts に、530CS の IP を登録。 2. ホストマシンの /etc/exports に、CD-ROM のエントリを加える。 3. nfsd を起動 (Sun の場合は exports の実行)。 詳しくは「ノート PC への network からの LINUX インストール HOWTO」を読 むといいでしょう。 ソースメディアの選択の際に、Install via NFS を選択する以外は、CD-ROM か らのインストールと同じです。 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6.2. 16色カラーや、メモリの少ない機種の場合 メモリが 8MB 未満(4MB)の場合、pcscsi20i.gz は使えません。また、 pcscsi20i.gz では、16 色カラーのマシンで表示が見にくい場合があります。 モノクロ表示で英語版の pcscsi14.gz がありますので、こちらを使って下さい 。 ┌──────────────────────────────────┐ │ ftp://ftp.kuis.kyoto-u.ac.jp/Linux/pc-rootdisk-15Nov95/pcscsi14.gz│ └──────────────────────────────────┘ scsinet1 を boot ディスクとし、boot プロンプトに対して、何も入力せずに Enter を押します。 boot: VFS: Insert ramdisk floppy and press ENTER と出たら、pcscsi14.gz の FD と入れ換えて、ENTER を押します。 106 キー対応もありませんので、setup の KEYMAP で 106 キーを選択できませ ん。インストール後、2章のキーマップの変更法を見て自分で設定して下さい。 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6.3. 230Csの場合 ・ ディスクのジオメトリ boot プロンプトに対して、ディスクのジオメトリを入力しなければならな いことがあります。不要な場合もあります(BIOS バージョンの違いか?)。 boot: hd=cyls,hds,secs Cylinders, Heads, Sectors に入れるべき数値(ディスクのジオメトリ)は 、DOS で QCONFIG を実行することで調べることができます。 C:> QCONFIG /D | MORE Windows95 に QCONFIG 相当のプログラムがあるかどうか分かりませんが、 FIPS で数値を調べることもできます。 LILO のインストールで Begin の時に、 hd=Cylinders,Heads,Sectors を入力します。 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6.4. Canon INNOVA の場合 ・ ハイバネーション用パーティション ディスクが最初から 2 パーティションに分けられており、後ろの方がハイ バネーション用のパーティションとなっています。これは消さないように して、前の方の DOS パーティションをFIPSで詰めます。 ・ XFree86 の設定 X サーバは XF86_VGA16 を選択し、チップセットは Trident の TVGA9000 を選びます。 ちょっとコツがいるので、以下を参照して下さい。 ┌───────────────────────────────────┐ │ http://www.yy.cs.keio.ac.jp/contrib/sanpei/how2800x600.html │ │ ftp://ftp.phys.keio.ac.jp/pub/XFree86/800x600/800x600LCD-0.01.tar.gz│ └───────────────────────────────────┘ (やまだてつやす) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Chapter 2. システムの設定 & JE-0.9.7j のインストール 前章で pcmcia 接続した外付け CD-ROM から Slackware-3.0 のインストールを 行ないました。Slackware-3.0 でインストールされる pcmcia パッケージは 2.6.3 で Accton 互換の NIC カードでの利用で問題があるので、この際に新し いバージョンする方法について説明します。 本章の最後で、JE^4 の CD-ROM から JE-0.9.7j をインストールする方法につ いて説明します。 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1. kernel の再構築 Slackware-3.0 でインストールされた kernel のバージョンは古いのでまずは kernel の再構築を行なう必要があります。私は比較的安定しているということ で 1.3.57 をインストールすることにしました。 (筆者注)最新の kernel は 1.3.60 ですが、ここではまだ追い付いていないの で 1.3.57 で紹介しています。 私は以下のファイル (kernelソース) を準備しました。 ・ linux-1.3.42.tar.gz (UnixUser 1996.2 LibCD Vol.23) ・ patch-1.3.43.gz (ftp://ftp.tut.ac.jp/pub/Linux/packages/Kernel/ v1.3) ・ patch-1.3.44.gz ・ patch-1.3.45.gz ・ patch-1.3.46.gz ・ patch-1.3.47.gz ・ patch-1.3.48.gz ・ patch-1.3.49.gz ・ patch-1.3.50.gz ・ patch-1.3.51.gz ・ patch-1.3.52.gz ・ patch-1.3.53.gz ・ patch-1.3.54.gz ・ patch-1.3.55.gz ・ patch-1.3.56.gz ・ patch-1.3.57.gz 再構築の方法は、kernel のソースツリーを /usr/src/linux します。要領は、 『るんるん Linux 』の 265 ページに準拠しました。 # cd /usr/src # tar zxvf linux-1.3.42.tar.gz # gzip -dc patch-1.3.43.gz | patch -p0 # gzip -dc patch-1.3.57.gz | patch -p0 これを行なうことで 1.3.57 の kernel のソースツリーが /usr/src/linux 以 下に展開されます。 次は、kernel の再構築です。これも、『るんるん Linux 』の 264 ページに準 拠しました。1.3.57 では APM (Advanced Power Management) がすでに正式採 用されていますので特にパッチをあてませんでした。 # cd /usr/src/linux # make config # make dep; make clean # make zlilo # rdev -R /vmlinuz 1 (必要無いけど) 次に、module(*.o) をインストールしました。 # make modules # make modules_install ここで重要なのはもちろん config の設定ですが、1.3.57 は [y/n/m] で選択 するものがかなり多く占めています。y は kernel に組み込むドライバ、 n は 組み込まないもの、m はモジュールとして組み込むものです。 1.3.57 から kerneld が標準になっています。kerneld はモジュール化された ドライバの load/unload を自動的に行なうデーモンです。したがって、ほとん どのものがモジュール化できるようなので、個人的には日頃余り使わないが、 必要なドライバはモジュール化して kernel サイズを小さくすることをお勧め します。 その他の細かい設定はデスクトップマシンの場合と変わらないので、詳しくは Documentation の下の、Configure.help をご覧下さい。 重要なところでは pcmcia-cs 関係で CONFIG_MODVERSIONS を n にしました。 また、 kerneld 関係で CONFIG_KERNELD を y にする必要があります。この際 に、kerneld を選んだ場合、ext2fs までモジュール化すると、起動時にはまだ kerneld が上がっていないときにルートファイルシステムをマウントしに行く とエラーになりますので、今回は extsfs とか minixfs とかは kernel に組み 込んでしまいました。 (/sbin/kerneldは/をマウントしないと実行できないの で) mouse や psaux (PS/2マウス) に関しても startx した時に自動で insmod し なかったです。なかなか新しいものを使うのは難しいな。 その他は、530CS では重要と思われる APM の関連だけ少しふれます。 私の 530CS では以下の設定で動いています。 ┌──────────────────────────────────┐ │ CONFIG_APM yes │ │ CONFIG_APM_IGNORE_USER_SUSPEND no │ │ CONFIG_APM_APM_DO_ENABLE yes │ │ CONFIG_APM_CPU_IDLE yes │ │ CONFIG_APM_DISPLAY_BLANK no │ │ CONFIG_WATCHDOG yes │ └──────────────────────────────────┘ 注: (CONFIG_WATCHDOGをyesにした場合3つほど質問事項が増えます。) この kernel を利用すると、APM 機能が有効になります。 また、kerneld を y にしてドライバをモジュール化した場合、起動時に kerneld を動かす必要があります。 1.3.57 以降に対応した kerneld は以下のパッケージに入っていますので、入 手してインストールしましょう。このパッケージは pcmcia-cs の再設定をする 際にも重要ですので必ずインストールして下さい。 modules-1.3.57.tar.gz (ftp://ftp.tut.ac.jp/Linux/packages/System) # cd /usr/src # tar zxvf modules-1.3.57.tar.gz # cd modules-1.3.57 # make # make install 最後は、kerneld を起動時にたちあげる為のrcファイルの設定です。今回は / etc/rc.d/rc.S の先頭に以下の行を追加しました。 if [ -x /sbin/kerneld ] then /sbin/kerneld fi これで設定完了です。早速マシンをリブートしてみましょう。ちゃんと動かな かった場合は、Slackware-3.0 をインストールした時に作製したブートディス クで起動して kernel の再構築を再度行なって下さい。 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.2. pcmcia-cs の再設定 APM 関係のアプリケーションの設定は、とりあえず後回しにして JE-0.9.7j の インストールに必要な pcmcia-cs パッケージのインストールについて先に説明 します。 今回は以下のパッケージのインストールを行ないました。 ・ pcmcia-cs-2.8.7.tar.gz (ftp://ftp.tut.ac.jp/Linux/packages/System/laptops/pcmcia) # cd /usr/src # tar zxvf pcmcia-cs-2.8.7.tar.gz # cd pcmcia-cs-2.8.7 # make config # make dep # make all # make install pcmcia-cs-2.8.7 では、ATA フラッシュディスクを使うことができるようにな ったみたいです(ただしα版で kernel パッチが必要)。msdos フォーマットさ れたものに関しての read/write が確認されています。 多分、PCMCIA HDD (TYPE III のもの) なども原理的にはこのドライバで動くと 思います。 (筆者は貧乏なのでそんな高価なものは買えません:-)) ・ ide-1.3.57.patch (ftp://hyper.stanford.edu/pub/pcmcia/extras) kernel 1.3.57 では、Slackware-3.0 をインストールしたままだと、ps や w などの proc 関係を使うコマンドが動きません。そこで procps パッケージを バージョンアップする必要があります。 私は procps-0.99.tgz (ftp://ftp.tut.ac.jp/Linux/packages/System) をイン ストールしました。Slackware-3.0 そのままだと make するのに問題がありま したので、展開したときのバイナリをそのままインストールしました。今度暇 な時にでも確認してみましょう。 この状態でマシンをリブートすると pcmcia-cs パッケージが有効になりますの で、CD-ROM 経由で JE-0.9.7j のインストールを行なうことが出来るようにな ります。 Slackware-3.0 では /etc/rc.d/rc.M で pcmcia の初期化を行なっているので すが、 rc.M を編集しないと pcmcia 以降の処理が行なわれません! # Initialize PCMCIA devices: if [ -x /etc/rc.d/rc.pcmcia ] ; then . /etc/rc.d/rc.pcmcia start fi 上の . を外す必要があります。 (重要です) # Initialize PCMCIA devices: if [ -x /etc/rc.d/rc.pcmcia ] ; then /etc/rc.d/rc.pcmcia start fi ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.3. APM 対応のアプリケーション 2.1 で kernel を再構築する際に APM 機能を有効にしました。これで 530CS の APM 機能が有効になるのですが、これを利用したアプリケーションも利用す ることが可能になります。 まずは APM の確認をしてみましょう。私のマシンでは以下のように表示されま した。 /home/hironobu@popo% cat /proc/apm BIOS version: 1.1 Flags: 0x03 Entry f920:0 cseg16 f000 dseg 9fc0 cseg len 6e00, dseg len 400 AC: on line Battery status: high Battery life: unknown Battery flag: 0x01 Battery life: unknown Battery life のところを少し追いかけたい気分になりますが、とりあえず先を 急ぎます。 私のマシンでは、以下のアプリケーションを準備しました。 1. xbatt-1.0.tar.gz, xbatt.linux.diff.gz (ftp://theta.iis.u-tokyo.ac.jp/pub4/FreeBSD/2.0.5-RELEASE/ports/ distfiles) FreeBSD 用のバッテリモニタとその Linux 用パッチです。X 上で動作しま す。 Linux 用のパッチによって proc からデータを取得します。 # tar zxvf xbatt-1.0.tar.gz # zcat xbatt.linux.patch.gz | patch -p0 # cd xbatt-1.0 # xmkmf # make # make install xbatt.linux.diff.gz が入手できる a-ftp サイトをご存知の方は私まで連 絡下さい。 2. batt.el-0.2.1.tar.gz (Linux-ML) Mule から使うバッテリモニタです。X を利用している人は xbatt があり ますが、 X をあげずに、kon 上で Mule などを立ち上げて使っている人に は便利だと思います。 # tar zxvf batt.el-0.2.1.tar.gz # cd batt.el-0.2.1 # cd sample # make # cp showbatt /usr/local/lib/mule/19.28/i486-JE-linux/ # cd .. # cp batt.el /usr/local/lib/mule/site-lisp/ showbatt は C で書かれたものをコンパイルして使いました。また、イン ストールするディレクトリは JE-0.9.7j (後述) でインストールされる mule に合わせてあります。 あと、~/.emacs を編集して以下の行を追加下さい。 (load-library "batt") (show-batt) batt.el をインストールする際に、/dev/apm_bios が無い場合はこれを作 る必要があるかもしれません。 "cat /proc/devices" で apm_bios の major number をチェックします。 私のマシンだと下の様に 63 番になっていました。 Character devices: 1 mem 2 pty 3 ttyp 4 tty 5 cua 6 lp 7 vcs 10 mouse 21 sg 62 pcmcia 63 apm_bios Block devices: 1 ramdisk 2 fd 3 ide0 11 sr # mknod /dev/apm_bios c 62 0 としてデバイスファイルを作成して下さい。 3. apmd-2.1.tar.gz (ftp://ftp.tut.ac.jp/Linux/packages/System/laptops/ apm) このパッケージはどうも kernel-1.3.58 以降用のパッケージらしいですが 、 1.3.57 で動かしました。 # tar zxvf apmd-2.1.tar.gz # cd apmd-2.1 # make # make install インストールされるプログラムは以下のものがありました。 1) /proc/apm の内容のフォーマッタ。でも余り見やすくなってないで apm す。 2) APM BIOS をモニタリングするデーモン、状況をsyslogに出力する。 apmd こんなの使うのは余りいそうにないです。 3) X 上のバッテリモニタ。530CS じゃ意味無い。battery life が分か xapm らないので。 こんなものはよっぽど好きな人でないと入れんでしょう。 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.4. JE-0.9.7jのインストール、設定 この章の最大の目的である JE-0.9.7j のインストール & 設定を行ないます。 PCMCIA SCSI 接続の外付け CD-ROM ドライブが使用できるようになっています ので、インストールは簡単です。 まずは、外部 CD-ROM に JE^4 の Disk2 の CD-ROM を入れ、CD-ROM ドライブ 、ケーブル、PCMCIA SCSI カード(私は adaptec SlimSCSI )を繋いで電源を入 れます。 次に、530CS の PC カードスロットにカードを挿入します。『ピッ』と音がし てカードが認識されます。これで SCSI CD-ROM ドライブが使用可能になります 。 CD-ROM ドライブを mount してみましょう。 # mount -rt iso9660 /dev/scd0 /cdrom # cd /cdrom # ls AUTOEXEC.BAT* Introduction/ JG/ rr_moved/ CONFIG.SYS JE@ PCAT/ slackware/ Doc/ JE-0.9.7j/ TMENU.ITM slakware@ IO.SYS JF/ TOWNS/ tools/ と出て来れば大丈夫です。JE-0.9.7j のディレクトリに移りましょう。 # cd JE-0.9.7j # ls 00NEED_LIBC_5.0.9 ChangeLog JE-HOWTO.sjis packages/ 00README.eucj JE-HOWTO.eucj accessories/ sources/ COPYING JE-HOWTO.jis install/ 詳しいインストールの仕方は JE-HOWTO を読まないと分からないのですが、JE をインストールしない限りは Linux 上で JE-HOWTO を読むことが出来ません。 とりあえずは install 以下をインストールします。 # mkdir /install; cd /install # cp /cdrom/JE-0.9.7j/install/* . # sh jeinst.sh これで install 以下 ( kon, ezinst, jkeytables ) がインストールされまし た。 ここで kon を起動すれば、JE-HOWTO を読むことが出来ますので、ここでは詳 しい説明は割愛させて頂きます。 キーマップの設定は、私の 530CS では以下のコマンドを /etc/rc.d/rc.local で起動しています。既に1章で j106-d をインストールしている人も、keymap の変更が必要であるかどうかもう一度確認した方が良いでしょう。 /usr/bin/loadkeys defkeymap j106-d cl2c-d k2esc-d 以上の手順で 530CS で Slackware-3.0 + JE-0.9.7j を使っています。 (あべひろのぶ) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Chapter 3. 設定ファイルの例 3.1. /etc/XF86Configの例 -------->8 begin -------->8 begin -------->8 begin -------->8 begin # TP530CS用/etc/XF86Configの設定例 # @(#)$Id: 530deLinux.sgml,v 1.6 2002/10/03 11:42:44 mdk Exp $ # File generated by xf86config. # ********************************************************************** # Refer to the XF86Config(4/5) man page for details about the format of # this file. # ********************************************************************** # ********************************************************************** # Files section. This allows default font and rgb paths to be set # ********************************************************************** Section "Files" # The location of the RGB database. Note, this is the name of the # file minus the extension (like ".txt" or ".db"). There is normally # no need to change the default. RgbPath "/usr/X11R6/lib/X11/rgb" # Multiple FontPath entries are allowed (which are concatenated together), # as well as specifying multiple comma-separated entries in one FontPath # command (or a combination of both methods) # # If you don't have a floating point coprocessor and emacs, Mosaic or other # programs take long to start up, try moving the Type1 and Speedo directory # to the end of this list (or comment them out). # FontPath "/usr/X11R6/lib/X11/fonts/misc/" FontPath "/usr/X11R6/lib/X11/fonts/Type1/" FontPath "/usr/X11R6/lib/X11/fonts/Speedo/" FontPath "/usr/X11R6/lib/X11/fonts/75dpi/" FontPath "/usr/X11R6/lib/X11/fonts/100dpi/" EndSection # ********************************************************************** # Server flags section. # ********************************************************************** Section "ServerFlags" # Uncomment this to cause a core dump at the spot where a signal is # received. This may leave the console in an unusable state, but may # provide a better stack trace in the core dump to aid in debugging # NoTrapSignals # Uncomment this to disable the server abort sequence # This allows clients to receive this key event. # DontZap # Uncomment this to disable the / mode switching # sequences. This allows clients to receive these key events. # DontZoom EndSection # ********************************************************************** # Input devices # ********************************************************************** # ********************************************************************** # Keyboard section # ********************************************************************** Section "Keyboard" Protocol "Standard" # when using XQUEUE, comment out the above line, and uncomment the # following line # Protocol "Xqueue" AutoRepeat 500 5 # Let the server do the NumLock processing. This should only be required # when using pre-R6 clients # ServerNumLock # Specify which keyboard LEDs can be user-controlled (eg, with xset(1)) # Xleds 1 2 3 # To set the LeftAlt to Meta, RightAlt key to ModeShift, # RightCtl key to Compose, and ScrollLock key to ModeLock: # LeftAlt Meta # RightAlt ModeShift # RightCtl Compose # ScrollLock ModeLock EndSection # ********************************************************************** # Pointer section # ********************************************************************** Section "Pointer" Protocol "PS/2" Device "/dev/mouse" # When using XQUEUE, comment out the above two lines, and uncomment # the following line. # Protocol "Xqueue" # Baudrate and SampleRate are only for some Logitech mice # BaudRate 9600 # SampleRate 150 # Emulate3Buttons is an option for 2-button Microsoft mice # Emulate3Timeout is the timeout in milliseconds (default is 50ms) Emulate3Buttons Emulate3Timeout 50 # ChordMiddle is an option for some 3-button Logitech mice # ChordMiddle EndSection # ********************************************************************** # Monitor section # ********************************************************************** # Any number of monitor sections may be present Section "Monitor" Identifier "STF passive color LCD" VendorName "Unknown" ModelName "STF passive color LCD" # HorizSync is in kHz unless units are specified. # HorizSync may be a comma separated list of discrete values, or a # comma separated list of ranges of values. # NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR'S # USER MANUAL FOR THE CORRECT NUMBERS. # HorizSync 31.5 # HorizSync 30-64 # multisync HorizSync 15-64 # multisync # HorizSync 31.5, 35.2 # multiple fixed sync frequencies # HorizSync 15-25, 30-50 # multiple ranges of sync frequencies # VertRefresh is in Hz unless units are specified. # VertRefresh may be a comma separated list of discrete values, or a # comma separated list of ranges of values. # NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR'S # USER MANUAL FOR THE CORRECT NUMBERS. # VertRefresh 50-70 VertRefresh 40-100 # Modes can be specified in two formats. A compact one-line format, or # a multi-line format. # 640x480 Modeline "640x480" 25.2 640 664 760 800 480 491 493 525 Modeline "640x480" 25.180 640 664 760 800 480 491 493 525 Modeline "640x480" 25 640 672 768 800 480 500 502 555 #*#Modeline "640x480" 25 640 672 768 800 480 490 492 525 #*#Modeline "640x480" 25 640 664 760 800 480 491 493 525 #*#Modeline "640x480" 25 640 656 752 800 480 490 492 525 #*#Modeline "640x480" 25 640 648 768 800 480 487 492 525 EndSection # ********************************************************************** # Graphics device section # ********************************************************************** # Any number of graphics device sections may be present Section "Device" Identifier "clgd6205" VendorName "Cirrus" BoardName "CL-GD6205" Chipset "clgd6205" VideoRam 512 Clockchip "cirrus" #*# Clocks 25.00 #*# Option "noaccel" #*# Option "no_bitblt" #*# Option "dac_8_bit" Option "clgd6225_lcd" Option "linear" EndSection # ********************************************************************** # Screen sections # ********************************************************************** # The Colour SVGA server Section "Screen" Driver "svga" Device "clgd6205" Monitor "STF passive color LCD" Subsection "Display" Depth 8 Modes "640x480" ViewPort 0 0 Virtual 640 480 EndSubsection EndSection # The 16-color VGA server Section "Screen" Driver "vga16" Device "clgd6205" Monitor "STF passive color LCD" Subsection "Display" Modes "640x480" ViewPort 0 0 Virtual 640 480 EndSubsection EndSection -------->8 end -------->8 end -------->8 end -------->8 end -------->8 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2. ~/.xinitcの例 -------->8 begin -------->8 begin -------->8 begin -------->8 begin #!/bin/bash # @(#)$Id: 530deLinux.sgml,v 1.6 2002/10/03 11:42:44 mdk Exp $ if [ -x /usr/local/bin/vgaclk0 ]; then /usr/local/bin/vgaclk0 fi if [ -x $HOME/.Xdefaults ]; then /usr/X11/bin/xrdb $HOME/.Xdefaults fi if [ -x $HOME/.xmodmaprc ]; then . /usr/X11/bin/xmodmap $HOME/.xmodmaprc fi if [ ! -z $(type -path fvwm) ]; then exec fvwm else exec twm fi -------->8 end -------->8 end -------->8 end -------->8 end -------->8 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3. ~/.fvwmrcの例 -------->8 begin -------->8 begin -------->8 begin -------->8 begin # TP530CS用~/.fvwmrcの設定例 # @(#)$Id: 530deLinux.sgml,v 1.6 2002/10/03 11:42:44 mdk Exp $ # Unfortunately, order does matter in this file # The correct order for inserting configurations is: # 1. Colors # 2. Assorted configuration paramters such as ClickToFocus, or MWMBorders # 3. Path setup (ModulePath, PixmapPath, IconPath) # 4. Style settings, including the default style Style "*" ... # 5. InitFunction and ResetFunction definitions. # 6. Other Functions. Functions cannot be forward referenced from # other functions, but they can be backward referenced. # 7. Menus definitions. Same caveats about forward referencing # 8. Key and Mouse Bindings. # 9. Module options. # The order of steps 5, 6, and 7 is not critical, as long as there are # no forward references to functions or menus. # If you get it wrong, the most common problem is that color or font settings # are ignored ########################################################################### # set up the colors # # OK some people like bright clear colors on their window decorations. # These people, I guess would mostly be from nice sunny/good weather places # line California. # # StdForeColor Black # StdBackColor LightSkyBlue # HiForeColor yellow # HiBackColor PeachPuff1 # PagerBackColor BlanchedAlmond # Me, I'm from Upstate New York, and live in New Hampshire, so I prefer # these dark muddy colors... StdForeColor Wheat StdBackColor DimGrey # this is used for the selected window HiForeColor Wheat HiBackColor SlateBlue4 #PagerBackColor #5c54c0 #PagerForeColor orchid StickyForeColor Black StickyBackColor #60c0a0 # Menu colors MenuForeColor Wheat MenuBackColor DimGrey MenuStippleColor SlateGrey ############################################################################ # Now the fonts - one for menus, another for window titles, another for icons #Font -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-* #Font -*-times-medium-i-*-*-*-120-*-*-*-*-*-* #WindowFont -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-* #IconFont -adobe-helvetica-medium-r-*-*-11-*-*-*-*-*-*-* #IconFont fixed Font lucidasanstypewriter-12 WindowFont lucidasanstypewriter-12 IconFont lucidasanstypewriter-12 ########################################################################### # Set up the major operating modes # ######################## FOCUS STUFF ############################## # Set windows to auto-raise after 750 milliseconds if you like it. # Autoraise can sometimes obscure pop-up windows. Performance is now # similar to olvwm's auto-raise feature. #AutoRaise 750 # Normally, we'll be in focus-follows mouse mode, but uncomment this # for mwm-style click-to-focus #ClickToFocus ######################## ICON STUFF ############################## # Auto Place Icons is a nice feature.... # This creates two icon boxes, one on the left side, then one on the # bottom. Leaves room in the upper left for my clock and xbiff, # room on the bottom for the Pager. #IconBox -150 90 -5 -140 #IconBox 5 -140 -140 -5 #*#IconBox -70 1 -1 -140 # If you uncomment this, and make sure that the WindowList is bound to # something, it works pretty much like an icon manager. #SuppressIcons # StubbornIcons makes icons de-iconify into their original position on the # desktop, instead of on the current page. #StubbornIcons # With AutoPlacement, icons will normally place themselves underneath active # windows. This option changes that. #StubbornIconPlacement # If you want ALL you icons to follow you around the desktop (Sticky), try # this #StickyIcons ######################## MWM EMULATION ####################### # # My feeling is that everyone should use MWMDecorHints and MWMFunctionHints, # since some applications depend on having the window manager respect them # MWMFunction hints parses the function information in the MOTIF_WM_HINTS # property, and prohibits use of these functions on the window. Appropriate # portions of the window decorations are removed. MWMFunctionHints # MWM is kinda picky about what can be done to transients, and it was keeping # me from iconifying some windows that I like to iconify, so here's an # over-ride that will allow me to do the operation, even tough the menu # item is shaded out. MWMHintOverride # MWMDecor hints parses the decoration information in the MOTIF_WM_HINTS # property, and removes these decoratons from the window. This does not affect # the functions that can be performed via the menus. MWMDecorHints # These are affect minor aspects for the look-and-feel. # Sub-menus placement mwm-style? # MWMMenus # mwm-style border reliefs (less deep than default fvwm) ? # MWMBorders # Maximize button does mwm-inversion thingy # MWMButtons ######################## MISCELLANEOUS STUFF ####################### # If you don't like the default 150 msec click delay for the complex functions # change this and uncomment it. # ClickTime 150 # OpaqueMove has a number (N) attached to it (default 5). # if the window occupies less than N% of the screen, # then opaque move is used. 0 <= N <= 100 # OpaqueMove 100 # flip by whole pages on the edge of the screen. EdgeScroll 100 100 # A modest delay before flipping pages seems to be nice... # I thresh in a 50 pixel Move-resistance too, just so people # can try it out. #*#EdgeResistance 250 50 EdgeResistance 2500 50 ######################## WINDOW PLACEMENT ####################### # RandomPlacement prevents user interaction while placing windows: RandomPlacement # SmartPlacement makes new windows pop-up in blank regions of screen # if possible, or falls back to random or interactive placement. SmartPlacement # With SmartPlacement, windows will normally place themselves over icons. # Uncomment this to change that. #StubbornPlacement # NoPPosition instructs fvwm to ignore the PPosition field in window # geometry hints. Emacs annoyingly sets PPosition to (0,0)! NoPPosition ######################## DECORATIONS ####################### # If you want decorated transient windows, uncomment this: #DecorateTransients ########################################################################### # Set up the virtual desktop and pager #set the desk top size in units of physical screen size DeskTopSize 2x2 # and the reduction scale used for the panner/pager DeskTopScale 32 ########################################################################## # Module path and paths to the icons # # ModulePath is a colon-separated list, just like regular unix PATH ModulePath /usr/lib/X11/fvwm PixmapPath /usr/include/X11/pixmaps:/usr/include/X11/bitmaps IconPath /usr/include/X11/pixmaps:/usr/include/X11/bitmaps ############################################################################ # Set the decoration styles and window options # Order is important!!!! # If compatible styles are set for a single window in multiple Style # commands, then the styles are ORed together. If conflicting styles # are set, the last one specified is used. # These commands should command before any menus or functions are defined, # and before the internal pager is started. # change the default width. Style "xeyes" NoTitle, NoHandles, Sticky, WindowListSkip Style "*" BorderWidth 5, HandleWidth 5, Icon unknown1.xpm Style "Fvwm*" NoTitle, NoHandles, Sticky, WindowListSkip, BorderWidth 0 Style "Fvwm Pager" StaysOnTop Style "FvwmPager" StaysOnTop Style "FvwmBanner" StaysOnTop Style "GoodStuff" NoTitle, NoHandles, Sticky, WindowListSkip, BorderWidth 0, CirculateSkip Style "*lock" NoTitle, NoHandles, Sticky, WindowListSkip, BorderWidth 0, CirculateSkip Style "xbiff" NoTitle, NoHandles, Sticky, WindowListSkip, BorderWidth 0, CirculateSkip Style "Maker" StartsOnDesk 1 Style "matlab" StartsOnDesk 3 Style "signal" StartsOnDesk 3 Style "rxvt" Icon term.xpm Style "xterm" Icon xterm.xpm Style "Console" Icon xterm.xpm Style "xterm_color" Icon xterm.xpm Style "kterm" Icon kterm.xpm Style "pxvt" Icon kterm.xpm Style "Appointment" Icon datebook.xpm, NoButton 2, NoButton 4 Style "xcalc" Icon xcalc.xpm, NoButton 2 Style "xbiff" Icon mail1.xpm, NoButton 2 Style "xmh" Icon mail1.xpm, StartsOnDesk 2, NoButton 2 Style "xman" Icon xman.xpm Style "xvgr" Icon graphs.xpm Style "matlab" Icon math4.xpm Style "xmag" Icon mag_glass.xpm Style "xgraph" Icon graphs.xpm Style "GoodStuff" Icon toolbox.xpm # Change the Maximize and iconify buttons to up and down triangles. #ButtonStyle : 2 4 50x35@1 65x65@0 35x65@0 50x35@1 #ButtonStyle : 4 4 50x65@1 35x35@1 65x35@1 50x65@0 ButtonStyle 2 20x20 ButtonStyle 4 50x50 ############################################################################# # Stuff to do at start-up Function "InitFunction" # Module "I" FvwmBanner # Exec "I" xpmroot /usr/include/X11/pixmaps/fvwm.xpm & Module "I" GoodStuff Exec "I" exec kterm -fn r14 -fk k14 -geometry 80x32 & Wait "I" kterm # Wait "I" xterm # Desk "I" 0 2 # Exec "I" exec xterm -geometry +0+0 & # Wait "I" xterm # Module "I" FvwmPager 0 0 Desk "I" 0 0 EndFunction Function "RestartFunction" # Exec "I" xsetroot -solid "#266294" Module "I" GoodStuff # Module "I" FvwmPager 0 0 EndFunction ############################################################################ # Now define some handy complex functions # This one moves and then raises the window if you drag the mouse, # only raises the window if you click, or does a RaiseLower if you double # click Function "Move-or-Raise" Move "Motion" Raise "Click" EndFunction # This one maximizes vertically if you click (leaving room for the GoodStuff bar at the # bottom, or does a full maximization if you double click, or a true full vertical # maximization if you just hold the mouse button down. Function "maximize_func" Maximize "Motion" 0 100 Maximize "Click" 0 80 Maximize "DoubleClick" 100 100 EndFunction # This one moves and then lowers the window if you drag the mouse, # only lowers the window if you click, or does a RaiseLower if you double # click Function "Move-or-Lower" Move "Motion" Lower "Motion" Lower "Click" RaiseLower "DoubleClick" EndFunction # This one moves or (de)iconifies: Function "Move-or-Iconify" Move "Motion" Iconify "Click" EndFunction # This one resizes and then raises the window if you drag the mouse, # only raises the window if you click, or does a RaiseLower if you double # click Function "Resize-or-Raise" Resize "Motion" Raise "Motion" Raise "Click" RaiseLower "DoubleClick" EndFunction # This is provided as a hint only. # Move to a known page on the desktop, then start an application in a # known location. Could also switch to a known desktop, I guess #Function "abs_coord" # GoToPage "Immediate" 1,1 # Exec "Immediate" exec xcalc -geometry +100+100& #EndFunction ############################################################################## #now define the menus - defer bindings until later # This menu is invoked as a sub-menu - it allows you to quit, # restart, or switch to another WM. Popup "Quit-Verify" Title "Really Quit Fvwm?" Quit "Yes, Really Quit" Restart "Restart Fvwm" fvwm Restart "Start twm" twm Restart "Start tvtwm" tvtwm Restart "Start mwm" mwm Restart "Start olwm" /usr/openwin/bin/olwm Nop "" Nop "No, Don't Quit" EndPopup # Provides a list of modules to fire off Popup "Module-Popup" Title "Modules" Module "GoodStuff" GoodStuff Module "Clean-Up" FvwmClean Module "Identify" FvwmIdent Module "SaveDesktop" FvwmSave Module "Debug" FvwmDebug Module "Pager" FvwmPager 0 0 Module "FvwmWinList" FvwmWinList EndPopup # This menu will fire up some very common utilities Popup "Utilities" Title "Utilities" Exec "Kterm" exec kterm -fn r14 -fk k14 -geometry 80x32 & Exec "pxvt" exec pxvt -fn rk14 -fk k14 -km eucj & Exec "Xterm" exec xterm -e bash & Exec "Color Xterm" exec xterm_color & Exec "RHS Control Panel" exec control-panel & Exec "Rxvt" exec rxvt & Exec "Top" exec xterm -T Top -n Top -e top & Exec "Calculator" exec xcalc & Exec "Xman" exec xman & Exec "Xmag" exec xmag & Nop "" Popup "Modules" Module-Popup Nop "" Restart "Restart Fvwm" fvwm Popup "Exit Fvwm" Quit-Verify EndPopup # This defines the most common window operations Popup "Window Ops" Title "Window Ops" Function "Move" Move-or-Raise Function "Resize" Resize-or-Raise Raise "Raise" Lower "Lower" Iconify "(De)Iconify" Stick "(Un)Stick" Function "(Un)Maximize" maximize_func Nop "" Destroy "Destroy" Close "Close" Nop "" Refresh "Refresh Screen" EndPopup # A trimmed down version of "Window Ops", good for binding to decorations Popup "Window Ops2" Function "Move" Move-or-Raise Function "Resize" Resize-or-Raise Raise "Raise" Lower "Lower" Iconify "Iconify" Stick "(Un)Stick" Nop "" Destroy "Destroy" Close "Close" Nop "" Module "ScrollBar" FvwmScroll 2 2 EndPopup ############################################################################# # One more complex function - couldn't be defined earlier because it used # pop-up menus # # This creates a motif-ish sticky menu for the title-bar window-ops # pop-up # Menu acts like normal twm menu if you just hold the button down, # but if you click instead, the menu stays up, motif style Function "window_ops_func" PopUp "Click" Window Ops2 PopUp "Motion" Window Ops2 # Motif would add: # I'll add it too, it can be mighty handy. Close "DoubleClick" EndFunction ############################################################################## # This defines the mouse bindings # First, for the mouse in the root window # Button 1 gives the Utilities menu # Button 2 gives the Window Ops menu # Button 3 gives the WindowList (like TwmWindows) # I use the AnyModifier (A) option for the modifier field, so you can hold down # any shift-control-whatever combination you want! # Button Context Modifi Function Mouse 1 R A PopUp "Utilities" Mouse 2 R A PopUp "Window Ops" Mouse 3 R A Module "winlist" FvwmWinList transient # Now the title bar buttons # Any button in the left title-bar button gives the window ops menu # Any button in the right title-bar button Iconifies the window # Any button in the rightmost title-bar button maximizes # Note the use of "Mouse 0" for AnyButton. # Button Context Modifi Function #Mouse 0 1 A Function "window_ops_func" #Mouse 0 2 A Function "maximize_func" #Mouse 0 4 A Iconify Mouse 0 1 A Function "window_ops_func" Mouse 1 2 A Iconify Mouse 3 2 A Destroy Mouse 1 4 A Maximize 0 100 Mouse 3 4 A Maximize 100 100 # Now the rest of the frame # Here I invoke my complex functions for Move-or-lower, Move-or-raise, # and Resize-or-Raise. # Button 1 in the corner pieces, with any modifiers, gives resize or raise #Mouse 1 F A Function "Resize-or-Raise" Mouse 1 FS A Resize # Button 1 in the title, sides, or icon, w/ any modifiers, gives move or raise #Mouse 1 TS A Function "Move-or-Raise" Mouse 1 T A Function "Move-or-Raise" # Button 1 in an icons gives move for a drag, de-iconify for a double-click, # nothing for a single click # Button 2 in an icon, w/ any modifiers, gives de-iconify Mouse 1 I A Function "Move-or-Iconify" Mouse 2 I A Iconify # Button 2 in the corners, sides, or title-bar gives the window ops menu Mouse 2 FST A Function "window_ops_func" # Button 3 anywhere in the decoration (except the title-bar buttons) # does a raise-lower Mouse 3 TSIF A RaiseLower # Button 3 in the window, with the Modifier-1 key (usually alt or diamond) # gives Raise-Lower. Used to use control here, but that interferes with xterm #Mouse 3 W M RaiseLower Mouse 1 W M RaiseLower Mouse 2 W M Move Mouse 3 W M Resize ############################################################################ # Now some keyboard shortcuts. # Arrow Keys # press arrow + control anywhere, and scroll by 1 page #Key Left A C Scroll -100 0 #Key Right A C Scroll +100 +0 #Key Up A C Scroll +0 -100 #Key Down A C Scroll +0 +100 # press arrow + meta key, and scroll by 1/10 of a page #Key Left A M Scroll -10 +0 #Key Right A M Scroll +10 +0 #Key Up A M Scroll +0 -10 #Key Down A M Scroll +0 +10 # press shift arrow + control anywhere, and move the pointer by 1% of a page #Key Left A SC CursorMove -1 0 #Key Right A SC CursorMove +1 +0 #Key Up A SC CursorMove +0 -1 #Key Down A SC CursorMove +0 +1 # press shift arrow + meta key, and move the pointer by 1/10 of a page #Key Left A SM CursorMove -10 +0 #Key Right A SM CursorMove +10 +0 #Key Up A SM CursorMove +0 -10 #Key Down A SM CursorMove +0 +10 # Keyboard accelerators #Key F1 A M CirculateUp #Key F1 A M Popup "Utilities" #Key F2 A M Popup "Window Ops" #Key F3 A M Module "WindowList" FvwmWinList #Key F4 A M Iconify #Key F5 A M Move #Key F6 A M Resize #Key F7 A M CirculateUp #Key F8 A M CirculateDown #Page Up/Dapge Down keys are used to scroll by one desktop page # in any context, press page up/down + control # in root context, just pressing page up/down is OK # # I prefer the non-wrapping scroll. These are for example purposes only #Key Next A C Scroll 100000 0 #Key Next R N Scroll 100000 0 #Key Prior A C Scroll -100000 0 #Key Prior R N Scroll -100000 0 ############################################################################ ############################################################################ #Definitions used by the modules ###################### GoodStuff button-bar ################################ # Colors *GoodStuffFore Orchid *GoodStuffBack Grey20 # Font #*#*GoodStuffFont -adobe-helvetica-bold-r-*-*-16-*-*-*-*-*-*-* *GoodStuffFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* # Geometry - really likes to pick its own size, but giving a position is OK *GoodStuffGeometry +1-1 # Layout: specify rows or columns, not both *GoodStuffColumns 1 # xterm or rxvts on remote machines can be done like this # Output re-direction is csh style, not sh style # You will want to substitute your own hosts here! # *GoodStuff Dopey rterm.xpm Exec "" rsh dopey "exec xterm -T dopey -display $HOSTDISPLAY &/dev/null & "& # *GoodStuff Grumpy rterm.xpm Exec "" rsh grumpy "exec xterm -T grumpy -display $HOSTDISPLAY &/dev/null & "& # *GoodStuff Snoopy rterm.xpm Exec "" rsh snoopy "exec xterm -T snoopy -display $HOSTDISPLAY &/dev/null & "& # *GoodStuff mail mail2.xpm Exec "" xmh & ############################################################################# # ここに追加する ############################################################################# *GoodStuff kterm xterm.xpm Exec "kterm" kterm -fn r14 -fk k14 -geometry 80x32 & *GoodStuff netscape xterm.xpm Exec "netscape" netscape & # Define the buttons to use..... *GoodStuff XEyes - Swallow "xeyes" xeyes -bg Grey20 -center pink -geometry -1500-1500 & *GoodStuff Kill rbomb.xpm Destroy #*#*GoodStuff xclock clock.xpm Swallow "clock" xclock -bg Grey20 -fg Orchid -hd Orchid -hl Orchid -geometry -1500-1500 -padding 0 & *GoodStuff xclock - Swallow "xclock" xclock -bg Grey20 -fg Orchid -hd Orchid -hl Orchid -geometry -1500-1500 -padding 0 & #*#*GoodStuff xbiff mail1.xpm Swallow "xbiff" xbiff -bg Grey20 -fg Orchid -geometry -1500-1500 & # *GoodStuff Paging clamp.xpm TogglePage # *GoodStuff - clock.xpm Swallow "xclock" xclock -bg \#908090 -geometry -1500-1500 -padding 0 *GoodStuff(1x1) - whatever SwallowModule "FvwmPager" FvwmPager 0 0 -geomrtry -1500-1500 ######################### No Clutter ######################################## # I only wrote NoClutter as a simple test case, but maybe some big sites like # universities really have usage problems (too many open windows).... # Time delays are in seconds. *FvwmNoClutter 3600 Iconify 1 *FvwmNoClutter 86400 Delete *FvwmNoCLutter 172800 Destroy ########################## Window-Identifier ############################### # Just choose colors and a fonts *FvwmIdentBack MidnightBlue *FvwmIdentFore Yellow *FvwmIdentFont -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-* ########################### Pager ######################################### #*#*FvwmPagerBack Black *FvwmPagerBack Gray20 *FvwmPagerFore Orchid *FvwmPagerFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* *FvwmPagerHilight Black #*#*FvwmPagerGeometry +1-1 *FvwmPagerLabel 0 megu #*FvwmPagerLabel 1 haru #*FvwmPagerLabel 2 cauchy #*FvwmPagerLabel 3 ss-net #*#*FvwmPagerLabel 4 misc *FvwmPagerSmallFont 5x8 ##########################FvwmWinList################################## *FvwmWinListBack #908090 *FvwmWinListFore Black *FvwmWinListFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* *FvwmWinListAction Click1 Iconify -1,Focus *FvwmWinListAction Click2 Iconify *FvwmWinListAction Click3 Module "FvwmIdent" FvwmIdent *FvwmWinListUseSkipList *FvwmWinListGeometry +0-1 -------->8 end -------->8 end -------->8 end -------->8 end -------->8 (やまだ てつやす)