Debian を使用する上で役立つと思われる事柄の端書き
contents
コンソールを高解像度に
$su #nano /boot/grub/menu.lst
# defoptions=queit
の行を
# defoptions=queit vga=771
と書き変える。
#update-grub #reboot
設定した数値 771 では 800x600 かつ 8bit color のコンソールで起動する。 以下、改造とカラーの一覧。
数値 | 解像度 | カラー深度 |
---|---|---|
771 | 800x600 | 8bit |
773 | 1024x768 | 8bit |
775 | 1280x1024 | 8bit |
788 | 800x600 | 16bit |
791 | 1024x768 | 16bit |
794 | 1280x1024 | 16bit |
789 | 800x600 | 24bit |
792 | 1024x768 | 24bit |
795 | 1280x1024 | 24bit |
現在の directory 以下の特定 file を一括して通知なしで削除
特定 file を FILE.NAME とする。
$find ./ -name FILE.NAME -exec rm -f {}\;
標準の desktop 環境を設定し直す
KDE を使っていたのに後から入れた XFce4 が標準で起動するようになったのを強引なやり方で解決していたが、より良い方法があるらしいので修正を試みる。
$su #update-alternatives --config x-session-manager There are 2 alternatives which provide `x-session-manager'. Selection Alternative -----------------------------------------------~~ 1 /usr/bin/startkde *+ 2 /usr/bin/xfce4-session Press enter to keep the default[*], or type selection number: 1 Using `/usr/bin/startkde' to provide `x-session-manager'.
時報
#aptitude install grandfatherclock #exit $crontab -e ^00 * * * * /usr/bin/grandfatherclock -g 0.3 > /dev/null 2>&1
引数の -g は GAIN とのこと。初期値は 1.0 だが騒い。
NTP で時刻合わせ
http://k64.mydns.to/debian/ntp.html
NTP を利用して PC の時刻を合わせておく
#aptitude install ntpdate #nano /etc/default/ntpdate NTPSERVERS="ntp3.jst.mfeed.ad.jp"
設定後、 ntpdate を起動する。
- sarge の場合
#/etc/init.d/ntpdate start
- etch の場合
#/etc/network/if-up.d/ntpdate start
user 名を変更する
#usermod -d /home/new_name -m -l new_name old_name && groupmod -n new_name old_name
設定 file 内の user 名も変更
$find -name "\.*" -exec echo perl -i -p -e 's/old_name/new_name/g;' {} \;
PDF file を閲覧する
#aptitude install xpdf xpdf-japanese
Wine
#aptitude install wine winesetuptk
JAVA
http://www.prime-stage.net/linux/debian-java.html
Samba の password を設定
user_name は現 account 名にする。
#smbpasswd user_name
Xfce4.2 - 電源を切る、再起動する
http://www.dayomon.net/xfce/のhttp://www.dayomon.net/xfce/docs-4.2/xfce4-session.html#xfsm-shutdownに依ると、 /usr/sbin/xfsm-shutdown-helper を sudo で実行できるようにすれば良いようだ。
#visudo
末尾にでも下記内容を追加。 user_name は現 account 名にする。
user_name hostname=NOPASSWD: /usr/sbin/xfsm-shutdown-helper