CUIのコマンドラインから検索できる辞書ツールを探していたところ、eblookがあった。
辞書ファイルはEPWING形式のものを扱えるので、手持ちの辞書が使えそうだ。
# aptitude install eblook
使用方法
$ eblook ~/epwing/wordnet 辞書のあるディレクトリを指定
eblook> list 辞書リストを表示
eblook> select 1 辞書リストから辞書を選択
eblook> search hoge 検索
eblook> content 1 内容を表示
で使えるようになった。
外字の表示がおかしいが、解決法がマニュアルに書かれている。
もう少し、使い込んでみよう。
wordnetのようなものは、非常に見やすいが、英和辞典は簡潔な辞書を選択したほうがよさそうだ。
詳しくは
http://openlab.ring.gr.jp/edict/eblook/eblook.html
情報過多の時代、古いPCを蘇らせて、よりシンプルに使っていくために、Linuxを勉強してます
2010年5月5日水曜日
mutt+Gmailの環境設定
Muttはキーボードのみで操作できる、テキストベースのUNIX向け電子メールクライアント。
msmtpとofflineimapを使って、シンプルなメール環境を作ってみた。
必用なアプリケーションのインストール
# aptitude install mutt
# aptitude install msmtp
# aptitude install offlineimap
mutt: CUIベースのメールクライアント
msmtp: SMTPクライアント
offlineimap: OfflineIMAPは、インターネットに接続していなくてもIMAPのメールを読めるようにするツール
$ cp /usr/share/doc/offlineimap/examples/offlineimap.conf.minimal ~/.offlineimaprc
.offlineimaprcを以下のように編集する。
[general]
metadata = ~/.offlineimap
accounts = GmailMain
ui = Noninteractive.Quiet
[mbnames]
enabled = yes
filename = ~/.mutt/muttrc.mailboxes
header = "mailboxes "
peritem = =%(foldername)s
sep = " "
footer = "\n"
[Account GmailMain]
localrepository = GmailLocal
remoterepository = GmailRemote
[Repository GmailLocal]
type = Maildir
localfolders = ~/.mail/GMAIL
[Repository GmailRemote]
type = Gmail
remoteuser = yourname@gmail.com
remotepassfile = ~/.mailpass
.msmtprcをホームディレクトリに作成し、以下のように編集する。
account default
host smtp.gmail.com
port 587
from yourname@gmail.com
tls on
tls_starttls on
# you can google on how to find this
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth on
user yourname@gmail.com
password yourpassword
logfile ~/.msmtp.log
$ chmod 600 .msmtprc
.muttrcをホームディレクトリに作成し、以下のように編集する。
set mbox_type=Maildir
set hostname=gmail.com
# GMAIL+OFFLINEIMAP settings
set imap_user=yourname@gmail.com
set folder=$HOME/.mail/GMAIL
set spoolfile=+/INBOX
set postponed="+[GMAIL].Drafts"
set record="+[GMAIL].Sent Mail"
# Mailboxes via offlineimap
source $HOME/.mutt/muttrc.mailboxes
set sendmail="/usr/bin/msmtp"
ディレクトリの作成
~/.mail
~/.mutt
offlineimapのパスワードファイルの作成
~/.mailpass
ここまでで設定は終了
$ offlineimap メールのローカルへの同期
$ mutt メールクライアントの起動
offlineimapでのメール取得の自動化をすれば、より便利になるが、とりあえずはこれでしばらく運用して、改善点を探してみることにする。
(参考)
http://www.webframp.com/2009/06/17/offlineimap-mutt-gmail-msmtp-crazy-delicious-email/
msmtpとofflineimapを使って、シンプルなメール環境を作ってみた。
必用なアプリケーションのインストール
# aptitude install mutt
# aptitude install msmtp
# aptitude install offlineimap
mutt: CUIベースのメールクライアント
msmtp: SMTPクライアント
offlineimap: OfflineIMAPは、インターネットに接続していなくてもIMAPのメールを読めるようにするツール
$ cp /usr/share/doc/offlineimap/examples/offlineimap.conf.minimal ~/.offlineimaprc
.offlineimaprcを以下のように編集する。
[general]
metadata = ~/.offlineimap
accounts = GmailMain
ui = Noninteractive.Quiet
[mbnames]
enabled = yes
filename = ~/.mutt/muttrc.mailboxes
header = "mailboxes "
peritem = =%(foldername)s
sep = " "
footer = "\n"
[Account GmailMain]
localrepository = GmailLocal
remoterepository = GmailRemote
[Repository GmailLocal]
type = Maildir
localfolders = ~/.mail/GMAIL
[Repository GmailRemote]
type = Gmail
remoteuser = yourname@gmail.com
remotepassfile = ~/.mailpass
.msmtprcをホームディレクトリに作成し、以下のように編集する。
account default
host smtp.gmail.com
port 587
from yourname@gmail.com
tls on
tls_starttls on
# you can google on how to find this
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth on
user yourname@gmail.com
password yourpassword
logfile ~/.msmtp.log
$ chmod 600 .msmtprc
.muttrcをホームディレクトリに作成し、以下のように編集する。
set mbox_type=Maildir
set hostname=gmail.com
# GMAIL+OFFLINEIMAP settings
set imap_user=yourname@gmail.com
set folder=$HOME/.mail/GMAIL
set spoolfile=+/INBOX
set postponed="+[GMAIL].Drafts"
set record="+[GMAIL].Sent Mail"
# Mailboxes via offlineimap
source $HOME/.mutt/muttrc.mailboxes
set sendmail="/usr/bin/msmtp"
ディレクトリの作成
~/.mutt
offlineimapのパスワードファイルの作成
~/.mailpass
ここまでで設定は終了
$ offlineimap メールのローカルへの同期
$ mutt メールクライアントの起動
offlineimapでのメール取得の自動化をすれば、より便利になるが、とりあえずはこれでしばらく運用して、改善点を探してみることにする。
(参考)
http://www.webframp.com/2009/06/17/offlineimap-mutt-gmail-msmtp-crazy-delicious-email/
Thinkpad 240Zをテキスト専用端末に仕立てる
Thinkpad240は、800x600のSVGAで、コンソールで使用するにはちょうど快適なサイズなので、Xを使用しない、テキスト専用の端末として再生してみた。
今回は、Debian testingのsqueezeをインストールしてみた。
いつものように、Debianの最小インストールからの設定は以下の通り。
1. RAMディスクの設定
SSDにインストールしているので、次の設定を行う。
アクセスタイムを記録しない
/etc/fstabでマウントオプションにnoatimeをつけておく
errors=remount-ro>>errors=remount-ro,noatime
ラムディスクを使う.
tmpフォルダをRAMディスクに取る。
/etc/fstabに
tmpfs /tmp tmpfs defaults,noatime 0 0
tmpfs /var/tmp tmpfs defaults,noatime 0 0
の2行を付け加える。
2. コンソール解像度の変更
GRUB2にバージョンアップされて、設定方法が変わった。
# vim /etc/default/grub
にて下記を追加
GRUB_CMDLINE_LINUX="vga=771"
#update-grub
vga=787はうまくいかない
3. apt-line設定
/etc/apt/sources.listにcontrib non-freeを追加
deb http://ftp.jp.debian.org/debian squeeze main contrib non-free
deb http://security.debian.org squeeze/updates main contrib non-free
# aptitude update
4. ロケールの追加
# dpkg-reconfigure locales
EUC-JP UTF-8を選択
5. alsaの設定
# aptitude install alsa-base
alsaconfが使えない。とりあえず、ほっておく。
6. sudoの設定
# aptitude install sudo
# visudo
user ALL=(ALL) ALL
を加える。
7. アプリケーションのインストール
# aptitude install acpi バッテリー、温度等チェック用
# aptitude install fbi 画像ビューア
# aptitude install mpg321 mp3プレーヤ
# aptitude install pmount
# aptitude install w3m w3m-img
# aptitude install lynx
8.fbterm
# aptitude install ttf-vlgothic
# aptitude install fbterm
9. FDCloneのインストール
# aptitude install fdclone
/etc/fdclone/fd2rc をコピーして.fd2rcとリネーム
以下を追加
# Launch Document Formats
launch .txt "vim %C"
launch .html "w3m %C"
launch .doc "w3m %C"
launch .htm "w3m %C"
# Launch Image Formats
launch .jpg "fbi %C"
launch .png "fbi %C"
launch .gif "fbi %C"
launch .tiff "fbi %C"
# Launch Sound Formats
launch .mp3 "mpg321 %C"
10.コンソールでの日本語入力
# aptitude install uim uim-anthy
このままでは使えないので、とりあえずオン/オフ・キーを、CTRL+Spaceに変更する
# vim /usr/share/uim/generic-key-custom-scm
>generic-on-keyとgeneric-off-keyを、" "から" "に変更
$ uim-fep -u anthy
で起動を確認
11.無線LANの設定
mini-PCIのIntel PRO/Wireless 2200BGを仕込んであるので、次の設定をする。
# aptitude install firmware-ipw2x00 wireless-tools
# modprobe -r ipw2200 ; modprobe ipw2200
# aptitude install wpasupplicant
/etc/modulesに"ipw2200"を追加
WPAの使用
/etc/network/interfaces を変更する
auto ath0
iface ath0 inet dhcp
wpa-driver madwifi
wpa-ap-scan 1
wpa-scan-ssid 1
wpa-ssid <アクセスポイントの ESSID>
wpa-psk <事前共有キー>
12.Chalice
# aptitude install vim
# aptitude install curl
# aptitude install nkf
# aptitude install bzip2
$ wget http://www.kaoriya.net/dist/chalice-1.9.012.tar.bz2
$ tar jxf chalice-1.9.012.tar.bz2
$ cd chalice-1.9.012
# ./install.sh
$ cp /etc/vim/vimrc ~/.vimrc
.vimrcに以下を追加
文字コードの自動認識
set encoding=utf-8
set fileencodings=ucs-bom,utf-8,iso-2022-jp,euc-jp,cp932
set fileformat=unix
set fileformats=unix,dos
set ambiwidth=double
Chalice設定
let chalice_previewflags = 'autoclose'
let chalice_anonyname = ''
let chalice_exbrowser = 'lynx %URL% &'
13.samba共有フォルダの自動マウント
# aptitude install smbfs
# mkdir /mnt/share
# vim /etc/fstab
次のように加える
//192.168.11.201/share /mnt/share/ smbfs username=hoge,password=hoge,uid=1000,gid=1000,rw,defaults 0 0
ここまでで一段落。
今回は、Debian testingのsqueezeをインストールしてみた。
いつものように、Debianの最小インストールからの設定は以下の通り。
1. RAMディスクの設定
SSDにインストールしているので、次の設定を行う。
アクセスタイムを記録しない
/etc/fstabでマウントオプションにnoatimeをつけておく
errors=remount-ro>>errors=remount-ro,noatime
ラムディスクを使う.
tmpフォルダをRAMディスクに取る。
/etc/fstabに
tmpfs /tmp tmpfs defaults,noatime 0 0
tmpfs /var/tmp tmpfs defaults,noatime 0 0
の2行を付け加える。
2. コンソール解像度の変更
GRUB2にバージョンアップされて、設定方法が変わった。
# vim /etc/default/grub
にて下記を追加
GRUB_CMDLINE_LINUX="vga=771"
#update-grub
vga=787はうまくいかない
3. apt-line設定
/etc/apt/sources.listにcontrib non-freeを追加
deb http://ftp.jp.debian.org/debian squeeze main contrib non-free
deb http://security.debian.org squeeze/updates main contrib non-free
# aptitude update
4. ロケールの追加
# dpkg-reconfigure locales
EUC-JP UTF-8を選択
5. alsaの設定
# aptitude install alsa-base
alsaconfが使えない。とりあえず、ほっておく。
6. sudoの設定
# aptitude install sudo
# visudo
user ALL=(ALL) ALL
を加える。
7. アプリケーションのインストール
# aptitude install acpi バッテリー、温度等チェック用
# aptitude install fbi 画像ビューア
# aptitude install mpg321 mp3プレーヤ
# aptitude install pmount
# aptitude install w3m w3m-img
# aptitude install lynx
8.fbterm
# aptitude install ttf-vlgothic
# aptitude install fbterm
9. FDCloneのインストール
# aptitude install fdclone
/etc/fdclone/fd2rc をコピーして.fd2rcとリネーム
以下を追加
# Launch Document Formats
launch .txt "vim %C"
launch .html "w3m %C"
launch .doc "w3m %C"
launch .htm "w3m %C"
# Launch Image Formats
launch .jpg "fbi %C"
launch .png "fbi %C"
launch .gif "fbi %C"
launch .tiff "fbi %C"
# Launch Sound Formats
launch .mp3 "mpg321 %C"
10.コンソールでの日本語入力
# aptitude install uim uim-anthy
このままでは使えないので、とりあえずオン/オフ・キーを、CTRL+Spaceに変更する
# vim /usr/share/uim/generic-key-custom-scm
>generic-on-keyとgeneric-off-keyを、"
$ uim-fep -u anthy
で起動を確認
11.無線LANの設定
mini-PCIのIntel PRO/Wireless 2200BGを仕込んであるので、次の設定をする。
# aptitude install firmware-ipw2x00 wireless-tools
# modprobe -r ipw2200 ; modprobe ipw2200
# aptitude install wpasupplicant
/etc/modulesに"ipw2200"を追加
WPAの使用
/etc/network/interfaces を変更する
auto ath0
iface ath0 inet dhcp
wpa-driver madwifi
wpa-ap-scan 1
wpa-scan-ssid 1
wpa-ssid <アクセスポイントの ESSID>
wpa-psk <事前共有キー>
12.Chalice
# aptitude install vim
# aptitude install curl
# aptitude install nkf
# aptitude install bzip2
$ wget http://www.kaoriya.net/dist/chalice-1.9.012.tar.bz2
$ tar jxf chalice-1.9.012.tar.bz2
$ cd chalice-1.9.012
# ./install.sh
$ cp /etc/vim/vimrc ~/.vimrc
.vimrcに以下を追加
文字コードの自動認識
set encoding=utf-8
set fileencodings=ucs-bom,utf-8,iso-2022-jp,euc-jp,cp932
set fileformat=unix
set fileformats=unix,dos
set ambiwidth=double
Chalice設定
let chalice_previewflags = 'autoclose'
let chalice_anonyname = ''
let chalice_exbrowser = 'lynx %URL% &'
13.samba共有フォルダの自動マウント
# aptitude install smbfs
# mkdir /mnt/share
# vim /etc/fstab
次のように加える
//192.168.11.201/share /mnt/share/ smbfs username=hoge,password=hoge,uid=1000,gid=1000,rw,defaults 0 0
ここまでで一段落。
2010年3月14日日曜日
Thinkpad 240Z用 xorg.conf
######################################################
Section "Device"
Identifier "Videocard0"
Driver "siliconmotion"
Option "UseBIOS" "off"
Option "AccelMethod" "EXA"
Option "PanelSize" "1024x768"
Option "mclk" "120Mhz"
EndSection
######################################################
Section "Monitor"
Identifier "Monitor0"
ModelName "LCD Panel 1024x768"
HorizSync 31.5 - 64.3
VertRefresh 50 - 90
EndSection
######################################################
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1024x768"
Virtual 1024 768
EndSubSection
EndSection
######################################################
Section "Device"
Identifier "Videocard0"
Driver "siliconmotion"
Option "UseBIOS" "off"
Option "AccelMethod" "EXA"
Option "PanelSize" "1024x768"
Option "mclk" "120Mhz"
EndSection
######################################################
Section "Monitor"
Identifier "Monitor0"
ModelName "LCD Panel 1024x768"
HorizSync 31.5 - 64.3
VertRefresh 50 - 90
EndSection
######################################################
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1024x768"
Virtual 1024 768
EndSubSection
EndSection
######################################################
登録:
投稿 (Atom)