Arch 構築メモ
絶対これ忘れるので、今のうちにできるだけ書いておく
インストール
$ km i386/qwerty/jp106.map.gz を選択 フォントはスキップ
$ /arch/setup 1 Select source testing系以外は選択 3 Set clock 時間はAsia/Tokyo ntp設定する 4 Prepare hard drive(s) FSはよく分からないのでEnter連打 最後はext3を選択 5 Select packages インストールパッケージはデフォルト 7 Configure system rc.conf の設定で en_US を ja_JP にする locale.gen の設定で ja_JP.UTF-8 UTF-8 のコメントを外す パスワードも設定する
pacman
// ドライバとかいろいろ xorg // startx とか用 xorg-xinit // ディスプレイマネージャ。slim とか gdm でもいい。 xorg-xdm // ウインドウマネージャ。これ以外あり得ない xmonad // なぜ入ってないし sudo openssh xterm // エディタ gvim // 日本語フォント ttf-sazanami // クロムさん chromium
設定
ディスプレイマネージャ設定。XDM以外を入れた場合のみ弄る。
$ vi /etc/inittab x:5:respawn:/usr/bin/xdm -nodaemon #x:5:respawn:/usr/sbin/gdm -nodaemon #x:5:respawn:/usr/bin/kdm -nodaemon #x:5:respawn:/usr/bin/slim >/dev/null 2>&1
X でのキーボードを日本語に。
$ vi /etc/X11/xorg.init.d/10-evdev.conf Section "InputClass" Identifier "evdev keyboard catchall" MatchIsKeyboard "on" MatchDevicePath "/dev/input/event*" Driver "evdev" + Option "XkbModel" "jp106" + Option "XkbLayout" "jp" + Option "XkbOptions" "ctrl:nocaps" EndSection
スクリーンの設定
$ vi /etc/X11/xorg.init.d/10-monitor.conf (新規作成) Section "Monitor" Identifier "Monitor0" EndSection Section "Device" Identifier "Device0" Driver "vesa" EndSection Section "Screen" Identifier "Screen0" Device "Device0" Monitor "Monitor0" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1024x768" EndSubSection EndSection
VMWare の画面を Macbook Air のサイズ(1440x900)で使いたいけどダメだった例。正しく動きそうなものだけど、枠が再描画されなくて悲しいことになる。
$ cvt 1440 900 # 1440x900 59.89 Hz (CVT 1.30MA) hsync: 55.93 kHz: pclk: 106.50 MHz Modeline "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync $ vi /etc/X11/xorg.init.d/10-monitor.conf Section "Monitor" Identifier "Monitor0" + Modeline "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync + HorizSync 1.0 - 10000.0 + VertRefresh 1.0 - 10000.0 EndSection - Driver "vesa" + Driver "vmware" - Modes "1024x768" + Modes "1440x900_60.00"
ユーザの追加。
$ useradd -m melpon $ passwd melpon $ visudo root ALL=(ALL) ALL + melpon ALL=(ALL) ALL
ランレベル3で頑張るモード
$ su - melpon [melpon] $ vi ~/.xinitrc + xmonad & + xterm # 終了したらコンソールに戻るようにしておく [melpon] $ startx
ランレベル5で頑張るモード
$ vi /etc/inittab # Boot to console - id:3:initdefault: + #id:3:initdefault: # Boot to X11 - #id:5:initdefault: + id:5:initdefault: $ su - melpon [melpon] $ vi ~/.xinitrc + xmonad [melpon] $ sudo reboot
リモートのアプリを動かす
自分のIPの確認
$ ip addr list
Xサーバ
$ vi /etc/X11/xinit/Xserverrc - exe /usr/bin/X -nolisten tcp "$@" + exe /usr/bin/X "$@"
[melpon] $ vi ~/.xinitrc + xhost +
Xクライアント
$ ssh -l melpon2 192.168.0.100 [remote@melpon2] $ export DISPLAY=192.168.0.50:0 [remote@melpon2] $ xeyes