次のページ 前のページ 目次へ

==================================================================
        ThinkPad 530CS で Linux
        Version 1.00    1996/2/2 (pre Release)
        Version 1.01    1996/2/9

                tetsu@cauchy.nslab.ntt.jp       (やまだ てつやす)
                hironobu@ap.isl.melco.co.jp     (あべ ひろのぶ)
==================================================================

この文書は筆者らが所有するThinkPad 530CSにLinuxをインストールした時に
メモしたものをまとめたものです。これからThinkPad 530CSでLinuxをインス
トールして使いたい人のヒントにでもなれば、と思ってとりあえず公開するこ
とにしました。

また例によってのりだけで思い付いてから数日で作成したので間違いも多いと
は思いますが、筆者らのマシンで挑戦したことの記録として、この文書と一緒
に成長して行く予定になっていますので(今後不定期にバージョンアップして
行く予定です)、何か情報がある方は上記2人までメールを下さい。

この文書に出会って皆さんの環境が少しでも良くなれば幸いです。
                                                        (あべ ひろのぶ)

この文書は以下の様な3章構成になっています。ただし、書き方は章によって
自由ですし、内容に一貫性が無い部分があるかも知れませんが御了承下さい。

第1章   Slackware-3.0のインストール & XFree86の設定 (やまだ)
第2章   システムの設定 & JE-0.9.7jのインストール    (あべ)
第3章   設定ファイルの例                                (やまだ)

第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でのインストール方法、ThinkPad230Cs(以下
230Cs)やCanon INNOVAへのインストール方法については、違う点だけ別に解説
します。

[目次]
1.1 今回の実験台
1.2 ものの準備
1.2.1 FDの準備
1.2.2 HDの準備
1.2.3 DOSパーティションの最適化(DEFRAG)
1.2.4 DOSパーティションを切り詰める(FIPS)
1.3 Linuxのインストール
1.3.1 ブート〜rootでのログイン
1.3.2 Linuxパーティション作成(fdisk)
1.3.3 CD-ROMドライブの認識
1.3.4 setup
1.4. 最低限の環境設定
1.4.1 rootのパスワードの設定
1.4.2 ユーザの登録
1.5 Xの環境設定
1.5.1 Xサーバの選択とXF86Configの作成(xf86config)
1.5.2 ビデオチップのクロックの設定(vgaclk0)
1.6 その他のケース
1.6.1 NFSでのインストールのしかた(差分のみ)
1.6.2 16色カラーや、メモリの少ない機種の場合
1.6.3 230Csの場合
1.6.4 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
  Windows3.1, Windows95モデルのどちらでも可。
  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用にします。

 ===================      ===================
                           DOSパーティション(使用)
                     FIPS      (400MB)
  DOSパーティション   →  -------------------
      (720MB)              DOSパーティション(空き)
                               (300MB)
 ===================      ===================

           図1 DOSパーティションの分割

  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.1.1.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

  チェックのポイントは、
・/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を選択、<Enter>だけ入力
  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<Enter>と打って、DOSパーティションの中のOSが立ち上がるかチェックし
ましょう。この例ではWindows95が無事に立ち上がりました。

1.4. 最低限の環境設定

1.4.1 rootのパスワードの設定

  rootは既に登録されていますが、パスワードが空っぽです。rootのパスワー
ドを忘れるとちょっと面倒ですから、慎重に設定します。

  setupのKEYMAPで106キーボードを選択した人はいいのですが、そうでない場
合、キートップの文字と違う文字が入力されることになります。少し打ってみ
て、特に記号のキー(括弧や=+-/*など)で思った通りの文字が出るかどうか確
認してからパスワードの設定に移ります。

  rootのパスワードを設定するには、rootでログインして、passwdコマンドを
実行します。

# passwd

Enter new password:       <Enter>
                    ^^^^^^見えません
Re-type new password:     <Enter>
                    ^^^^^^見えません

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            : <Enter>
... for the Alt keys?   : n
hsync                   : 31.5 (一番低いのを選択)
vsync                   : 40-150 (一番狭いのを選択)
monitor definition      : <Enter>
vendor name             : <Enter>
model name              : <Enter>
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         : <Enter>
vendor name             : <Enter>
model (board) name      : clgd6205(後で探しやすくするため)
clock chip              : <Enter>
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: <Enter>

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

                                                        (やまだ てつやす)

第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の再構築
2.2 pcmcia-csの再設定
2.3 APM対応のアプリケーション
2.4 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)apm /proc/apmの内容のフォーマッタ。でも余り見やすくなってないです。
2)apmd APM BIOSをモニタリングするデーモン、状況をsyslogに出力する。こ
       んなの使うのは余りいそうにないです。
3)xapm X上のバッテリモニタ。530CSじゃ意味無い。battery lifeが分からな
       いので。

こんなものはよっぽど好きな人でないと入れんでしょう。

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を使っています。

                                                        (あべ ひろのぶ)

第3章   設定ファイルの例

[目次]
3.1 /etc/XF86Configの例
3.2 ~/.xinitcの例
3.3 ~/.fvwmrcの例

3.1 /etc/XF86Configの例
-------->8 begin -------->8 begin -------->8 begin -------->8 begin
# TP530CS用/etc/XF86Configの設定例
# @(#)$Id: 530deLinux.sgml,v 1.1.1.1 1999/02/22 19:20:47 baba 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 <Crtl><Alt><BS> server abort sequence
# This allows clients to receive this key event.

#    DontZap

# Uncomment this to disable the <Crtl><Alt><KP_+>/<KP_-> 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.1.1.1 1999/02/22 19:20:47 baba 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.1.1.1 1999/02/22 19:20:47 baba 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 >&/dev/null & "&
# *GoodStuff Grumpy  rterm.xpm   Exec "" rsh grumpy "exec xterm -T grumpy -display $HOSTDISPLAY </dev/null >&/dev/null & "&
# *GoodStuff Snoopy  rterm.xpm   Exec "" rsh snoopy "exec xterm -T snoopy -display $HOSTDISPLAY </dev/null >&/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

                                                        (やまだ てつやす)

次のページ 前のページ 目次へ