XFree86™ を導入する方法 (Solaris 8 for Intel)

Linux活用日記


Last modified: Oct 26th, 2002



この文書では XFree86 のバイナリをダウンロードしてインストールする手順をご紹介していきます. また Sun 提供のビデオキットを利用する手順についてはXF86 Video Kit を使うの項をご参照下さい.

XFree86-4.0 対応ビデオカードリスト

ところで Solaris 8 (x86) をノート PC にインストールするうえで, 気を付けなければいけないことがあります. それは, グラフィックチップがサポートされていない場合は, 1枚目のインストール CD は使えない(多分)ということです. インストールするには2枚目の CDROM (SOLARIS 8 SOFTWARE 1 OF 2) でインストールを開始する必要があります. こうすることによって, GUI モードではなく, テキストモード(ただし英語)でインストール作業を進めていくことができます. そしてインストールが完了し, 再起動したらいよいよ, XFree86 のインストール開始です.

私がインストールをしてみたノートパソコンは下表のとおりですが, 良くわからなかったのが, ThinkPad 2台は共に ATI Rage Mobility なのですが, ThinkPad (i Series 1800) が XFree86-4.0.2 であっさり X を起動出来たのに, ThinkPad (X21) の方は X を起動しようとすると, "CheckSum で V_BIOS に問題がある" などといったエラーが出てしまい, 起動出来ませんでした. 仕方がないので, XFree86-4.1.0 のバイナリをダウンロードしてインストールしてみたらすんなりと X を起動し, CDE デスクトップ環境を拝むことが出来ました. このページの最後に /etc/X11/XF86Config のサンプルを載せておきます.

機種 NEC Lavie-NX (LW23D53D) IBM ThinkPad (i Series 1800) IBM ThinkPad (X21)
グラフィックチップ NeoMagic NM2160 ATI Rage Mobility ATI Rage Mobility
XFree86 対応状況
XFree86-4.0.2 X
XFree86-4.1.0 ?

とりあえず, XFree86-4.x のバイナリをダウンロードする必要があります. 私がダウンロードしたファイルは以下のとおりです. 最低限, これだけあればまともに動くようです. というか, OpenWindows がある以上, 必要なファイルなどは既にある程度存在するのかも知れません.

Xbin.tgz
Xdoc.tgz
Xlib.tgz
Xetc.tgz
Xfenc.tgz
Xfscl.tgz
Xf100.tgz
Xfnts.tgz
Xfsrv.tgz
Xinstall.sh
Xman.tgz
Xprog.tgz
Xprt.tgz
Xmod.tgz
Xxserv.tgz
Xvfb.tgz
extract

ダウンロードは下記の FTP サイトから行いました.

ftp://ftp.xfree86.org/pub/XFree86/4.0.2/binaries/Solaris-8/

ダウンロードが完了したらインストールを開始します.

# sh Xinstall.sh

このあと, インストール完了までにいくつか聞いてきますが, ほとんど Y でいいかと思います.

インストールが完了したら XF86Config の設定を行います. XFree86-4.0 には XF86Setup のような便利なツールがありませんので xf86config を実行します. ただし, 実行するときには, PATH が通っていませんのでフルパスで実行します. 下記のどちらかを実行して下さい.

# /usr/X11R6/bin/xf86config
または,
# /usr/X11R6/bin/XFree86 -configure

まず, "/usr/X11R6/bin/xf86config" を実行した場合は, 対話式に設定をすすめていき, 最後に /etc/X11/XF86Config が完成します. "/usr/X11R6/bin/XFree86 -configure" を実行した場合は, / に XF86Config.new という雛形ファイルが作成されますので /etc/X11 に, XF86Config とりネームした上で移動して下さい.

以上のいずれかの方法で XF86Config の基を作成します. どちらがいいか一概には言えませんし, 手間も変わりません. いずれにしても編集作業が必要になるので, vi の使い方は憶えておいた方が良いでしょう.

では, 今作った XF86Config を編集していきましょう.
ここからはかなり難しい設定になってきます. Linux での Xconfigurator や XF86Setup で X の設定を行ったことがあるならなんとか出来るかと思います. 気をつける点は,

Mouse device:

ここは /dev/kdmouse にします. 同じパソコンにインストールしている Linux では, /dev/mouse なのですが Solaris では何故かこうしないといけないようでした. 私はここでかなりハマりました.

次に, 完成した /etc/X11/XF86Config を修正する必要があるかも知れません. 少なくとも私の環境ではそのままでは X が起動できませんでした.

まずフォントパスです. XFree86 で標準で書き込まれるフォントパス /usr/X11R6/lib/X11/fonts 以下のディレクトリの他に, Solaris では /usr/openwin/lib/X11 や /usr/openwin/lib/locale/ja/X11 の下に OpenWindows のフォントがインストールされていますのでここらへのパスを書き足す必要があるかも知れません.

次にキーボードの設定です. 上記と同じく Linux では

Option "XkbModel" "jp106"

という行が必要なのですが Solaris ではこの行を入れると起動できませんでした.

あとは最後の方の "Screen" セクションなどが正しいかどうかをチェックします. これで問題なければ XF86Config の設定は終了です. 正しく設定できたかどうかは以下のコマンドで確認できます.

# /usr/X11R6/bin/XFree86
または,
# /usr/X11R6/bin/X

これで網目状の画面になってマウスポインタが X 印になったら成功です. Ctrl+Alt+Backspace で X を終了させましょう.

次に dtlogin で日本語表示するための設定ファイルを編集します. 通常は /etc/default/init に "LANG=ja_JP.eucJP" を書き足せば良いのですが, 別途 XFree86 をインストールした環境では次の手順を行うことになります.

設定ファイルは /etc/dt/config/Xconfig ですが, このファイルは存在しません. しかし /usr/dt/config にある XFree86 を使わない場合のファイルをコピーするか, 検索エンジンなどで Xconfig で検索するとサンプルファイルがあります. このファイルの以下の行を編集します(100行目あたり).

Dtlogin*language: <lang> ---> Dtlogin*language: ja

次に /usr/dt/config/Xservers を /etc/dt/config 以下にコピーし下記の行を編集します.

:0 Local local_uid@console root /usr/openwin/bin/Xsun :0 -nobanner

:0 Local local_uid@console root /usr/X11R6/bin/X :0 または,
:0 Local local_uid@console root /usr/X11R6/bin/X :0 -bpp 24 または,
:0 Local local_uid@console root /usr/X11R6/bin/X :0 -quiet

次に, CDE で日本語フォントを正しく表示するために, 設定ファイルを編集します.
/usr/openwin/lib/X11/fontserver.cfg を開き, 上記の XF86Config の "Files" セクションに書いたフォントパスの中で, /usr/openwin/lib/locale/ja/X11/fonts 以下にある下記のフォントパスを書き足して下さい.

/usr/openwin/lib/locale/ja/X11/fonts/75dpi/
/usr/openwin/lib/locale/ja/X11/fonts/TTbitmaps/
/usr/openwin/lib/locale/ja/X11/fonts/TT/

テキストログインにしている場合は, 最後に以下のコマンドを実行してグラフィカルログインに切り替えます.

# /usr/dt/bin/dtconfig -e

これで再起動すれば OpenWindows X Server を使わなくても X が起動するはずです.

それでは, 以下に上記の手順で作成した /etc/X11/XF86Config を載せておきます. 内容が若干違いますが, どちらも同じマシンで作成したものです.

/etc/X11/XF86Config のサンプル( /usr/X11R6/bin/xf86config で作った場合)
Section "Module"
SubSection "extmod"
Option "omit xfree86-dga" # don't initialise the DGA extension
EndSubSection

Load "dbe"
Load "type1"
Load "freetype"
EndSection

Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"

FontPath "/usr/X11R6/lib/X11/fonts/local/"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
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/"
FontPath "/usr/openwin/lib/X11/fonts/F3bitmaps/"
FontPath "/usr/openwin/lib/X11/fonts/F3/"
FontPath "/usr/openwin/lib/X11/fonts/Type1/"
FontPath "/usr/openwin/lib/X11/fonts/Speedo/"
FontPath "/usr/openwin/lib/X11/fonts/misc/"
FontPath "/usr/openwin/lib/X11/fonts/75dpi/"
FontPath "/usr/openwin/lib/X11/fonts/100dpi/"
FontPath "/usr/openwin/lib/X11/fonts/TrueType/"
FontPath "/usr/openwin/lib/locale/ja/X11/fonts/75dpi/"
FontPath "/usr/openwin/lib/locale/ja/X11/fonts/TTbitmaps/"
FontPath "/usr/openwin/lib/locale/ja/X11/fonts/TT/"
# ModulePath "/usr/X11R6/lib/modules"
EndSection

Section "ServerFlags"
# Option "NoTrapSignals"
# Option "DontZap"
# Option "Dont Zoom"
# Option "DisableVidModeExtension"
# Option "AllowNonLocalXvidtune"
# Option "DisableModInDev"
# Option "AllowNonLocalModInDev"
EndSection

Section "InputDevice"
Identifier "Keyboard1"
Driver "Keyboard"

Option "AutoRepeat" "500 30"
# Option "Xleds" "1 2 3"
# Option "LeftAlt" "Meta"
# Option "RightAlt" "ModeShift"
# Option "XkbOptions" "ctrl:swapcaps"

Option "XkbRules" "xfree86"
# Option "XkbModel" "jp106"
Option "XkbLayout" "jp"
EndSection

Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "PS/2"
Option "Device" "/dev/kdmouse"
Option "Emulate3Buttons"
# Option "Emulate3Timeout" "50"
# Option "ChordMiddle"
EndSection

Section "Monitor"
Identifier "My Monitor"
HorizSync 31.5 - 57.0
VertRefresh 50-90
EndSection

Section "Device"
Identifier "ATI (laptop/notebook)"
Driver "ati"
# VideoRam 4096
EndSection

Section "Screen"
Identifier "Screen 1"
Device "ATI (laptop/notebook)"
Monitor "My Monitor"
DefaultDepth 24
# DefaultDepth 16

Subsection "Display"
Depth 8
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
EndSection

Section "ServerLayout"
Identifier "Simple Layout"
Screen "Screen 1"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection


/etc/X11/XF86Config のサンプル( /usr/X11R6/bin/XFree86 -configureで作った場合)
Section "ServerLayout"
Identifier "XFree86 Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
# ModulePath "/usr/X11R6/lib/modules"
FontPath "/usr/X11R6/lib/X11/fonts/local"
FontPath "/usr/X11R6/lib/X11/75dpi/:unscaled"
FontPath "/usr/X11R6/lib/X11/100dpi/:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
# FontPath "/usr/X11R6/lib/X11/fonts/CID/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
FontPath "/usr/openwin/lib/X11/fonts/F3bitmaps/"
FontPath "/usr/openwin/lib/X11/fonts/F3/"
FontPath "/usr/openwin/lib/X11/fonts/TrueType/"
FontPath "/usr/openwin/lib/X11/fonts/Speedo/"
FontPath "/usr/openwin/lib/X11/fonts/Type1/"
FontPath "/usr/openwin/lib/X11/fonts/75dpi/"
FontPath "/usr/openwin/lib/X11/fonts/100dpi/"
FontPath "/usr/openwin/lib/X11/fonts/misc/"
FontPath "/usr/openwin/lib/locale/ja/X11/fonts/75dpi/"
FontPath "/usr/openwin/lib/locale/ja/X11/fonts/TTbitmaps/"
FontPath "/usr/openwin/lib/locale/ja/X11/fonts/TT/"
EndSection

Section "Module"
# Load "extmod"
# Load "xie"
# Load "pex5"
# Load "glx"
Load "dbe"
# Load "record"
Load "type1"
Load "freetype"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbRules" "xfree86"
Option "XkbLayout" "jp"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "PS/2"
Option "Device" "/dev/kdmouse"
EndSection

Section "Monitor"
Identifier "Monitor0"
# VendorName "Monitor Vendor"
# ModelName "Monitor Model"
HorizSync 31.5 - 57.0
VertRefresh 50 - 90
EndSection

Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option "accel" # [<bool>]
#Option "crt_screen" # [<bool>]
#Option "composite_sync" # [<bool>]
#Option "hw_cursor" # [<bool>]
#Option "linear" # [<bool>]
#Option "mmio_cache" # [<bool>]
#Option "probe_clocks" # [<bool>]
#Option "reference_clock" # <freq>
#Option "shadow_fb" # [<bool>]
#Option "sw_cursor" # [<bool>]
Identifier "ATI (laptop/notebook)"
Driver "ati"
# VendorName "ATI"
# BoardName "Mach64 LM"
# ChipSet "ati"
# ChipId 0x4c4d
# ChipRev 0x64
# BusID "PCI:1:0:0"
EndSection

Section "Screen"
Identifier "Screen0"
Device "ati (laptop/notebook)"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 16
Modes "1024x768"
ViewPort 0 0
EndSubSection
SubSection "Display"
Depth 24
Modes "1024x768"
ViewPort 0 0
EndSubSection
SubSection "Display"
Depth 8
EndSubSection
SubSection "Display"
Depth 15
EndSubSection
SubSection "Display"
Depth 16
EndSubSection
SubSection "Display"
Depth 24
EndSubSection
EndSection



HOME