DEBIANの導入と設定
DEBIAN導入と設定は数段階で進めます。
第一段階: なんとか使える環境
英語情報と同様の導入をします。インストールは英語でしましたが、キーボード・時間などは日本を選びました。
コンソール(GDMを立ち上げない)をRUNLEVEL=2で、GDMをRUNLEVEL=3で使い分けています。
以前はSIDでもDEBIANの標準カーネルでは動かないキーがあるので、次のスクリプトでそれぞれの環境の応急措置をしました。いまは2.6.24-1-amd64なのでこれは必要ないです。
コンソールは次のコマンドをrootから実行して凌いでいます:
#!/bin/sh
/bin/loadkeys << EOF
##
## For MacBook jp106 keyboad after initial install
## Somehow default install has unresponsive keys in Linux console:
## [\] and [|] : 2nd row 2nd from right (next to Backspace marked as delete)
## [_] : 5th row 2nd from right (next to L-Shift)
## MacBook lacks real the access to Remove (keycode 111) key
##
## For English, missing key may be for [asciitilde] / [grave] instead.
##
## Here is the quick fix for jp106:
##
## enable [_] using unmarked shift 0 (In jp106, shift ^ gives ~)
##
keycode 11 = zero underscore nul
alt keycode 11 = Meta_zero
shift alt keycode 11 = Meta_underscore
## Reboot with CTRL-ALT-@ (I chose this since japanse @ is far from
## frequently used CREL-ALT-key combination keys
## i.e., F1-F12, Backspace (marked as delete), ESC, TAB, ...
control alt keycode 26 = Boot
##
## enable [\] and [|] key and Boot combination wth the key marked as enter
## You can create Ctrl-Alt-Del equivalent by Ctrl-Alt-enter for (re)boot
##
keycode 96 = backslash bar Control_backslash
alt keycode 96= Meta_backslash
shift alt keycode 96 = Meta_bar
EOF
## modinfo hid
## filename: /lib/modules/2.6.20-1-amd64/kernel/drivers/hid/hid.ko
## license: GPL
## vermagic: 2.6.20-1-amd64 SMP mod_unload
## depends:
## parm: pb_fnmode:Mode of fn key on PowerBooks (0 = disabled, 1 = fkeyslast, 2 = fkeysfirst) (int)
# Set function key as the first choice mode
echo 2 >/sys/module/hid/parameters/pb_fnmodeXはユーザーのターミナルから次のコマンドを実行しています:
#!/bin/sh xmodmap - << EOF keycode 19 = 0 underscore keycode 108 = backslash bar EOF
設定によってはうまくXからALT-CTROL-F1等でコンソールに移動できないときは、"sudo cgvt 1"とでもすればXから出られる。
第二段階: カーネル構築
sid 環境で macbook を使うには
2007/07 の段階で、xorg が7.2になっています。各Wikiに載っている xorg.conf では正常に動作しません。 以下に動作させるための方法を示します。
- xorg.conf 以下に 動作確認している xorg.conf を示します。 細かいところは 各自設定を変更してください。
# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg
Section "Module"
Load "i2c"
Load "bitmap"
Load "ddc"
Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "type1"
# Load "vbe"
EndSection
Section "Extensions"
# Option "Composite"
Option "Composite" "Enable"
# Option "RENDER" "Enable"
EndSection
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc106"
Option "XkbLayout" "us"
Option "XkbOptions" "ctrl:nocaps"
EndSection
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "Emulate3Buttons" "true"
EndSection
#Section "InputDevice"
# Identifier "Synaptics Touchpad"
# Driver "synaptics"
# Option "SendCoreEvents" "true"
# Option "Device" "/dev/psaux"
# Option "Protocol" "auto-dev"
# Option "HorizScrollDelta" "0"
#EndSection
Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "SHMConfig" "true"
Option "LeftEdge" "100"
Option "RightEdge" "1120"
Option "TopEdge" "50"
Option "BottomEdge" "310"
Option "FingerLow" "25"
Option "FingerHigh" "30"
Option "VertScrollDelta" "20"
Option "HorizScrollDelta" "50"
Option "MinSpeed" "0.79"
Option "MaxSpeed" "0.88"
Option "AccelFactor" "0.0015"
# Option "HorizScrollDelta" "0"
EndSection
Section "InputDevice"
Identifier "Wiimote"
Driver "evdev"
Option "Name" "Nintendo Wiimote"
EndSection
Section "Device"
Identifier "Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller"
Driver "i810"
BusID "PCI:0:2:0"
Option "XAANoOffscreenPixmaps" "true"
EndSection
Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
EndSection
Section "Screen"
Identifier "screen0"
Device "Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Depth 16
Virtual 2560 1600
EndSubSection
SubSection "Display"
Depth 24
Virtual 2560 1600
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "screen0"
InputDevice "Generic Keyboard"
InputDevice "Synaptics Touchpad"
InputDevice "Configured Mouse"
Option "AIGLX" "true"
# Option "Xinerama" "on"
EndSection
#Section "DRI"
# Mode 0666
#EndSection- Dual Screen を使う xorg 7.1 では使用できた Dual screen ですが、xorg.conf の仕様変更により xorg.conf からの設定では動作しなくなているようです。 xrandr を使用して、Dual screen を設定する必要があります。 まず、Dual screenが使用可能であるか、xrandr を使って確認します。
% xrandr Screen 0: minimum 320 x 200, current 1280 x 864, maximum 2560 x 1600 VGA connected (normal left inverted right) 1280x1024 75.0 1280x800 60.0 1152x864 75.0 1280x768 60.0 1024x768 75.1 70.1 60.0 43.5 832x624 74.6 74.5 800x600 72.2 75.0 60.3 56.2 640x480 75.0 72.8 66.7 60.0 60.0 59.9 720x400 87.8 70.1 LVDS connected 1280x800+0+0 (normal left inverted right) 286mm x 179mm 1280x800 59.9*+ 60.0 1280x768 60.0 1024x768 60.0 800x600 60.3 640x480 59.9 TMDS-1 connected (normal left inverted right) 1280x800 60.0 1280x768 60.0 1024x768 60.0 800x600 60.3 640x480 59.9 TV disconnected (normal left inverted right)
VGA が外部出力で、LVDS がMacbookのLCDです。 xrandr を使って、外部出力を有効にします。
% xrandr --output VGA --mode 1024x768 % xrandr --output VGA --right-of LVDS
出力をOFFにするには
% xrandr --output VGA --off
です。
