logo
 2003年   2004年   2005年   2006年   2007年   2008年   2009年   2010年   2011年   2012年 
 9月 
 10月 
 11月 
 12月 
 1月 7月 
 2月 8月 
 3月 9月 
 4月 10月 
 5月 11月 
 6月 12月 
 1月 7月 
 2月 8月 
 3月 9月 
 4月 10月 
 5月 11月 
 6月 12月 
 1月 7月 
 2月 8月 
 3月 9月 
 4月 10月 
 5月 11月 
 6月 12月 
 1月 7月 
 2月 8月 
 3月 9月 
 4月 10月 
 5月 11月 
 6月 12月 
 1月 7月 
 2月 8月 
 3月 9月 
 4月 10月 
 5月 11月 
 6月 12月 
 1月 7月 
 2月 8月 
 3月 9月 
 4月 10月 
 5月 11月 
 6月 12月 
 1月 7月 
 2月 8月 
 3月 9月 
 4月 10月 
 5月 11月 
 6月 12月 
 1月 7月 
 2月 8月 
 3月 9月 
 4月 10月 
 5月 11月 
 6月 12月 
 1月
 2月
 3月
アイコンの説明
code:Haemophilus influenzae
ここに書かれていることは無保証です。同じことを行って問題が発生しても、龍義は責任をとりません。

 4/1
Other WWW
エイプリルフールのページでは色々と趣向を凝らしたところがあったみたいだ
けれど、日曜日だったのでイマイチ盛り上がりに欠けた感じもした。個人的には
Google Maps の RPG 風画面ぐらいしか見てなかったけど。去年の震災で自粛の
ムードから2年ぶりのエイプリルフール、ウソを笑える余裕が日本にも出たと
思って良いのだろうか。

 4/2
Other
一昨日の続き。sheeva plug を SD カードから起動させて、コンパイラぐらい
までインストールをする。u-boot の部分で、起動オプションの変更をする。

Marvell>> setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p1
Marvell>> saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
Marvell>> boot
~snip~
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "mmcblk0p1" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00       1024 mtdblock0 (driver?)
1f01       2048 mtdblock1 (driver?)
1f02     521216 mtdblock2 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

panic した。2回ほど reset ボタンを押してみたけど、結果は同じ。rootfs が
見えてないのかな。少し調べてみたら、rootdelay を入れれば起動することが
あるので、入れてみた。

Marvell>> setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p1 rootdelay=1
Marvell>> saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
Marvell>> boot

これで起動した。debian なので、OS 周りを新しくする。

sheevaplug-debian:~# apt-get update
Ign http://security.debian.org lenny/updates Release.gpg
Ign http://security.debian.org lenny/updates/main Translation-en_US
Ign http://security.debian.org lenny/updates/contrib Translation-en_US
~snip~
sheevaplug-debian:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
~snip~

一通り新しくなった。時間がかかったので、今日はここまで。

 4/3
Other
昨日の続き。sheeva plug に開発系のバイナリを apt-get で突っ込む。gcc とか
autoconf なんかを入れていって、とりあえず完了。CPU の速度は、予想していた
よりも早いし、ほとんど熱くならないし、良い感じで使えそう。

 4/4
Other Network
sheeva plug を某所に設置。DHCP で IP をもらったので、USB で接続しないと
IP がわからない。涼しい顔して一時的に貸し出しノート PC を接続して IP を
確認し、他の PC から ssh で接続できた。
色々と確認していたら、less コマンドを入れるのを忘れていたことに気がついた。
が、直接外に出られないので apt-get が使えない。一度別の PC でダウンロード
して scp(ssh) でコピーしたあと、コンパイルしてみることにした。

[toyota@dstar]$ wget http://www.greenwoodsoftware.com/less/less-444.tar.gz
[toyota@dstar]$ scp less-444.tar.gz toyota@192.168.0.2:
~コピー後、中に入って~
[toyota@splug]$ tar xfz less-444.tar.gz
[toyota@splug]$ cd less-444
[toyota@splug]$ ./configure --help
~省略~
[toyota@splug]$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for library containing strerror... none required
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc needs -traditional... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for tgoto in -ltinfo... no
checking for initscr in -lxcurses... no
checking for initscr in -lncursesw... no
checking for initscr in -lncurses... no
checking for initscr in -lcurses... no
checking for tgetent in -ltermcap... no
checking for tgetent in -ltermlib... no
checking for regcmp in -lgen... no
checking for regcmp in -lintl... no
checking for regcmp in -lPW... no
checking for working terminal libraries... Cannot find terminal libraries - con
figure failed

あー、libcurses 系が入ってないのか。

[toyota@dstar]$ wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz
[toyota@dstar]$ scp ncurses-5.9.tar.gz toyota@192.168.0.2:
~コピー後、中に入って~
[toyota@splug]$ tar xfz ncurses-5.9.tar.gz
[toyota@splug]$ cd ncurses-5.9
[toyota@splug]$ ./configure --help
~省略~
[toyota@splug]$ ./configure
~省略~
checking for egrep... grep -E
Configuring NCURSES 5.9 ABI 5 (Wed Apr  4 09:23:50 UTC 2012)
checking build system type... mkdir: cannot create directory `/tmp/cg5719-6616'
: Permission denied
mkdir: cannot create directory `/tmp/cg-5719': Permission denied
config.guess: cannot create a temporary directory in /tmp
configure: error: cannot guess build type; you must specify one

どうやら、/tmp のパーミッションがおかしいみたい。そのままコピーしたので、
何か問題があったのかな。確認してみた。

drwxr-xr-t root/root tmp

よく考えたことがないけど、w のパーミッションを付けないと駄目な気がする
ので。

[toyota@splug]$ su
[root@splug]# chmod a+w /tmp

これで戻って続きをする。

[toyota@splug]$ ./configure
~省略~
Appending rules for normal model (c++: ticlib+termlib+ext_tinfo+base+ext_funcs)
Appending rules for debug model (c++: ticlib+termlib+ext_tinfo+base+ext_funcs)
creating headers.sh

** Configuration summary for NCURSES 5.9 20110404:

    extended funcs: yes
    xterm terminfo: xterm-new

     bin directory: /usr/bin
     lib directory: /usr/lib
 include directory: /usr/include
     man directory: /usr/man
 terminfo directory: /usr/share/terminfo

通った。インストールする。

[toyota@splug]$ make
~省略~
[toyota@splug]$ su
[root@splug]# make install
~省略~

これで、less のインストールの続き。

[toyota@splug]$ ./configure
~省略~
[toyota@splug]$ make
~省略~
[toyota@splug]$ su
[root@splug]# make install
~省略~
[root@splug]# exit
[toyota@splug]$ less --version
less 444
Copyright (C) 1984-2009 Mark Nudelman

less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Homepage: http://www.greenwoodsoftware.com/less

やっと入ったな。とっとと PingTunnel を作らないと、ダウンロードが面倒で
しょうがない。

 4/5
Other Network
sheeva plug で PingTunnel のコンパイル。昨日の less で結構面倒だったので、
PingTunnel は設置する前に家で入れておけばよかった。とりあえず、ダウンロード
して、コンパイルしてみる。

[toyota@dstar]$ wget http://www.cs.uit.no/~daniels/PingTunnel/PingTunnel-0.72.t
ar.gz
[toyota@dstar]$ scp PingTunnel-0.72.tar.gz toyota@192.168.0.2:
~コピー後、中に入って~
[toyota@splug]$ tar xfz PingTunnel-0.72.tar.gz
[toyota@splug]$ cd PingTunnel

どうやら configure なんてなくて、Makefile があるのでそのまま make すれば
良いみたい。

[toyota@splug]$ make
gcc -Wall -g -MM *.c > .depend
gcc -Wall -g `[ -e /usr/include/selinux/selinux.h ] && echo -DHAVE_SELINUX` -c 
-o ptunnel.o ptunnel.c
In file included from ptunnel.c:43:
ptunnel.h:70:21: error: pcap.h: No such file or directory
In file included from ptunnel.c:43:
ptunnel.h:379: error: expected specifier-qualifier-list before ‘pcap_t’
ptunnel.h:392: warning: ‘struct pcap_pkthdr’ declared inside parameter list
ptunnel.h:392: warning: its scope is only this definition or declaration, which
 is probably not what you want
ptunnel.c: In function ‘pt_proxy’:
ptunnel.c:638: error: ‘pcap_info_t’ has no member named ‘pcap_err_buf’
ptunnel.c:638: error: ‘PCAP_ERRBUF_SIZE’ undeclared (first use in this functi
on)
ptunnel.c:638: error: (Each undeclared identifier is reported only once
ptunnel.c:638: error: for each function it appears in.)
ptunnel.c:639: error: ‘pcap_info_t’ has no member named ‘pcap_data_buf’
ptunnel.c:640: error: ‘pcap_info_t’ has no member named ‘pcap_desc’
ptunnel.c:640: warning: implicit declaration of function ‘pcap_open_live’
ptunnel.c:640: error: ‘pcap_info_t’ has no member named ‘pcap_err_buf’
ptunnel.c:641: error: ‘pcap_info_t’ has no member named ‘pcap_desc’
ptunnel.c:642: warning: implicit declaration of function ‘pcap_lookupnet’
ptunnel.c:642: error: ‘pcap_info_t’ has no member named ‘netp’
ptunnel.c:642: error: ‘pcap_info_t’ has no member named ‘netmask’
ptunnel.c:642: error: ‘pcap_info_t’ has no member named ‘pcap_err_buf’
ptunnel.c:644: error: ‘pcap_info_t’ has no member named ‘pcap_err_buf’
ptunnel.c:647: error: ‘pcap_info_t’ has no member named ‘netp’
ptunnel.c:648: error: ‘pcap_info_t’ has no member named ‘netmask’
ptunnel.c:649: warning: implicit declaration of function ‘pcap_compile’
ptunnel.c:649: error: ‘pcap_info_t’ has no member named ‘pcap_desc’
ptunnel.c:649: error: ‘pcap_info_t’ has no member named ‘fp’
ptunnel.c:649: error: ‘pcap_info_t’ has no member named ‘netp’
ptunnel.c:651: warning: implicit declaration of function ‘pcap_close’
ptunnel.c:651: error: ‘pcap_info_t’ has no member named ‘pcap_desc’
ptunnel.c:654: warning: implicit declaration of function ‘pcap_setfilter’
ptunnel.c:654: error: ‘pcap_info_t’ has no member named ‘pcap_desc’
ptunnel.c:654: error: ‘pcap_info_t’ has no member named ‘fp’
ptunnel.c:656: error: ‘pcap_info_t’ has no member named ‘pcap_desc’
ptunnel.c:661: error: ‘pcap_info_t’ has no member named ‘pcap_err_buf’
ptunnel.c:664: error: ‘pcap_info_t’ has no member named ‘pkt_q’
ptunnel.c:665: error: ‘pcap_info_t’ has no member named ‘pkt_q’
ptunnel.c:666: error: ‘pcap_info_t’ has no member named ‘pkt_q’
ptunnel.c:670: error: ‘pcap_info_t’ has no member named ‘pcap_err_buf’
ptunnel.c:671: error: ‘pcap_info_t’ has no member named ‘pcap_data_buf’
ptunnel.c:812: warning: implicit declaration of function ‘pcap_dispatch’
ptunnel.c:812: error: ‘pcap_info_t’ has no member named ‘pcap_desc’
ptunnel.c:812: error: ‘pcap_info_t’ has no member named ‘pkt_q’
ptunnel.c:815: error: ‘pcap_info_t’ has no member named ‘pkt_q’
ptunnel.c:816: error: ‘pcap_info_t’ has no member named ‘pkt_q’
ptunnel.c:821: error: ‘pcap_info_t’ has no member named ‘pkt_q’
ptunnel.c:823: error: ‘pcap_info_t’ has no member named ‘pkt_q’
ptunnel.c:825: error: ‘pcap_info_t’ has no member named ‘pkt_q’
ptunnel.c:826: error: ‘pcap_info_t’ has no member named ‘pkt_q’
ptunnel.c: At top level:
ptunnel.c:892: warning: ‘struct pcap_pkthdr’ declared inside parameter list
ptunnel.c:892: error: conflicting types for ‘pcap_packet_handler’
ptunnel.h:392: note: previous declaration of ‘pcap_packet_handler’ was here
ptunnel.c: In function ‘pcap_packet_handler’:
ptunnel.c:899: error: dereferencing pointer to incomplete type
ptunnel.c:900: error: dereferencing pointer to incomplete type
ptunnel.c:904: error: dereferencing pointer to incomplete type
make: *** [ptunnel.o] Error 1

あー、そう言えば、どこかに libpcap を使うって書いてあったな。インストール
する。

[toyota@dstar]$ wget http://www.tcpdump.org/release/libpcap-1.2.1.tar.gz
[toyota@dstar]$ scp libpcap-1.2.1.tar.gz toyota@192.168.0.2:
~コピー後、中に入って~
[toyota@splug]$ tar xfz libpcap-1.2.1.tar.gz
[toyota@splug]$ cd libpcap-1.2.1
[toyota@splug]$ ./configure --help
~snip~
[toyota@splug]$ ./configure
~snip~
[toyota@splug]$ make
~snip~
checking for flex... no
checking for bison... no
checking for capable lex... insufficient
configure: error: Your operating system's lex is insufficient to compile
 libpcap.  flex is a lex replacement that has many advantages, including
 being able to compile libpcap.  For more information, see
 http://www.gnu.org/software/flex/flex.html .

libpcap をコンパイルするには、lex というか flex が必要みたい。仕方ない、
入れることに。

[toyota@dstar]$ wget http://jaist.dl.sourceforge.net/project/flex/flex/flex-2.5
.35/flex-2.5.35.tar.gz
[toyota@dstar]$ scp flex-2.5.35.tar.gz toyota@192.168.0.2:
~コピー後、中に入って~
[toyota@splug]$ tar xfz flex-2.5.35.tar.gz
[toyota@splug]$ cd flex-2.5.35
[toyota@splug]$ ./configure --help
~snip~
[toyota@splug]$ ./configure
~snip~
checking for gm4... no
checking for gnum4... no
checking for m4... no
checking for GNU m4... no
configure: error: GNU M4 1.4 is required

m4 が必要なのか。ちょっと時間が取れないので、続きは明日。

 4/6
Other Network
sheeva plug で PingTunnel のコンパイルの続き。m4 をインストールするところ
から。

[toyota@dstar]$ wget http://ftp.gnu.org/gnu/m4/m4-1.4.16.tar.gz
[toyota@dstar]$ scp m4-1.4.16.tar.gz toyota@192.168.0.2:
~コピー後、中に入って~
[toyota@splug]$ tar xfz m4-1.4.16.tar.gz
[toyota@splug]$ cd m4-1.4.16
[toyota@splug]$ ./configure --help
~snip~
[toyota@splug]$ ./configure
~snip~
[toyota@splug]$ make
~snip~
[toyota@splug]$ su
[root@splug]# make install
~snip~

問題なくインストールまでできた。1つ戻って、flex をコンパイルする。

[toyota@splug]$ ./configure
~snip~
[toyota@splug]$ make
~snip~
[toyota@splug]$ su
[root@splug]# make install
~snip~

これも問題なくなった。また戻って、libpcap のコンパイルの続き。

[toyota@splug]$ ./configure
~snip~
checking whether we have Myricom Sniffer API... no (/opt/snf)
checking for flex... flex
checking for flex 2.4 or higher... yes
checking for bison... no
configure: WARNING: don't have both flex and bison; reverting to lex/yacc
checking for capable lex... insufficient
configure: error: Your operating system's lex is insufficient to compile
 libpcap.  flex is a lex replacement that has many advantages, including
 being able to compile libpcap.  For more information, see
 http://www.gnu.org/software/flex/flex.html .

bison がいるみたい。インストールする。

[toyota@dstar]$ wget http://ftp.gnu.org/gnu/bison/bison-2.5.tar.gz
[toyota@dstar]$ scp bison-2.5.tar.gz toyota@192.168.0.2:
~コピー後、中に入って~
[toyota@splug]$ tar xfz bison-2.5.tar.gz
[toyota@splug]$ cd bison-2.5
[toyota@splug]$ ./configure --help
~snip~
[toyota@splug]$ ./configure
~snip~
[toyota@splug]$ make
~snip~
[toyota@splug]$ su
[root@splug]# make install
~snip~

問題なく、インストールできた。libpcap に戻る。

[toyota@splug]$ ./configure
~snip~
[toyota@splug]$ make
~snip~
[toyota@splug]$ su
[root@splug]# make install
~snip~

やっとできあがった。何を作っていたか忘れるぐらいだけど、元の PingTunnel を
コンパイルして、インストールする。

[toyota@splug]$ make
gcc -Wall -g `[ -e /usr/include/selinux/selinux.h ] && echo -DHAVE_SELINUX` -c 
-o ptunnel.o ptunnel.c
gcc -Wall -g `[ -e /usr/include/selinux/selinux.h ] && echo -DHAVE_SELINUX` -c 
-o md5.o md5.c
gcc -o ptunnel ptunnel.o md5.o -lpthread -lpcap `[ -e /usr/include/selinux/seli
nux.h ] && echo -lselinux`
[toyota@splug]$ su
[root@splug]# make install
install -d /usr/bin/
install -d /usr/share/man/man8/
install ./ptunnel /usr/bin/ptunnel
install ./ptunnel.8 /usr/share/man/man8/ptunnel.8
[root@splug]# ptunnel -h
ptunnel: error while loading shared libraries: libpcap.so.1: cannot open shared
 object file: No such file or directory

libpcap が見えないみたい。/usr/local/lib には libpcap.so.1 はあるので、
設定の問題なんだろうけど。ちょっと確認してみた。

[toyota@splug]$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf

[toyota@splug]$ ls -l /etc/ld.so.conf.d
total 8
-rw-r--r-- 1 root root 70 2011-05-31 10:17 arm-linux-gnueabi.conf
-rw-r--r-- 1 root root 44 2011-05-31 10:17 libc.conf
[toyota@splug]$ cat /etc/ld.so.conf.d/arm-linux-gnueabi.conf
# Multiarch support
/lib/arm-linux-gnueabi
/usr/lib/arm-linux-gnueabi
[toyota@splug]$ /etc/ld.so.conf.d/libc.conf
# libc default configuration
/usr/local/lib

なんか、/usr/local/lib は読みに行ってそうなんだけどな。LD_LIBRARY_PATH
で誤魔化すことに。

[root@splug]# export LD_LIBRARY_PATH=/usr/local/lib
[root@splug]# ptunnel -h
ptunnel v 0.72.
Usage:   ptunnel -p <addr> -lp <port> -da <dest_addr> -dp <dest_port> [-m max_t
unnels] [-v verbosity] [-f logfile]
        ptunnel [-m max_threads] [-v verbosity] [-c <device>]
    -p: Set address of peer running packet forwarder. This causes
        ptunnel to operate in forwarding mode - the absence of this
        option causes ptunnel to operate in proxy mode.
~snip~

大丈夫そう。あとは、サーバ側も PingTunnel を入れないと。

 4/7
Other Network
sheeva plug の PingTunnel の相手のサーバに PingTunnel を入れる。まずは、
libpcap を探すが、入っていないようなので、昨日一昨日の苦労を考えて yum
でインストールすることにした。

[root@vjun]# yum install libpcap
~snip~
[root@vjun]# exit
[toyota@vjun]$ make
gcc -Wall -g -MM *.c > .depend
gcc -Wall -g `[ -e /usr/include/selinux/selinux.h ] && echo -DHAVE_SELINUX` -c 
-o ptunnel.o ptunnel.c
In file included from ptunnel.c:43:
ptunnel.h:70:21: error: pcap.h: No such file or directory
In file included from ptunnel.c:43:
~snip~

見覚えのあるエラーが出た。yum search pcap で探してみると、libpcap-devel
があるので、こっちも入れないといけないみたい。

[root@vjun]# yum install libpcap-devel
~snip~
[root@vjun]# exit
[toyota@vjun]$ make
gcc -Wall -g `[ -e /usr/include/selinux/selinux.h ] && echo -DHAVE_SELINUX` -c 
-o ptunnel.o ptunnel.c
gcc -Wall -g `[ -e /usr/include/selinux/selinux.h ] && echo -DHAVE_SELINUX` -c 
-o md5.o md5.c
gcc -o ptunnel ptunnel.o md5.o -lpthread -lpcap `[ -e /usr/include/selinux/seli
nux.h ] && echo -lselinux`
[toyota@vjun]$ su
[root@vjun]# make install
install -d /usr/bin/
install -d /usr/share/man/man8/
install ./ptunnel /usr/bin/ptunnel
install ./ptunnel.8 /usr/share/man/man8/ptunnel.8
[root@vjun]# exit
[toyota@vjun]$ ptunnel -h
ptunnel v 0.72.
Usage:   ptunnel -p <addr> -lp <port> -da <dest_addr> -dp <dest_port> [-m max_t
unnels] [-v verbosity] [-f logfile]
        ptunnel [-m max_threads] [-v verbosity] [-c <device>]
    -p: Set address of peer running packet forwarder. This causes
        ptunnel to operate in forwarding mode - the absence of this
        option causes ptunnel to operate in proxy mode.
~snip~

完了。思ったより疲れたので、設定は明日以降に。

 4/8
Other Network
ptunnel のサーバ側というか proxy 側の起動について調べてみたけど、オプション
なしでも起動できるみたい。さすがにパスワードぐらい付けよう、ということで
パスワード付きで起動させた。

[root@vjun]# ptunnel -x 12345678 &
[inf]: (c) 2004-2011 Daniel Stoedle, <daniels@cs.uit.no>
[inf]: Security features by Sebastien Raveau, <sebastien.raveau@epita.fr>
[inf]: Forwarding incoming ping packets over TCP.
[inf]: Ping proxy is listening in privileged mode.

あっさり起動した。明日、現場からテストしてみるけど、時間があるかどうか。

 4/9
Other Network
Dovecot v2.1.4 と v2.0.20 が出た。1ヶ月ぶりなので、少し落ち着いてきた
感じかな。色々と触ってみたいけど、落ち着いた時間が取れなくて、しばらく
無理だなぁ。dovecot.jp だけ更新しておいた。

 4/10
Other Network
一昨日の続き。クライアント側で実行させてみようと、コマンドを見ていたら。

Client: ./ptunnel -p <proxy address> -lp <listen port> 
                  -da <destination address> -dp <destination port>
                  [-c <network device>] [-v <verbosity>] [-f <logfile>]
                  [-u] [-x password]

こんな感じの説明。使用例では。

sudo ./ptunnel -p proxy.pingtunnel.com -lp 8000 -da login.domain.com -dp 22

-lp を 80 にして、ちょっとテストしてみたけど、うまくいかなかった。時間も
そんなに取れないし、続きはいつになることやら。

 4/11
WWW
Google の検索結果がいつの間にか10件になってしまって、かなりイラっとして
いる。どの設定を変更すれば良いのか見ていたら、検索結果の「検索オプション」
から「検索設定をカスタマイズ」でやっと見つけた。「インスタント検索の予測」
を「インスタント検索の結果は表示しない」としてから、やっと検索結果の件数を
100にできた。こんなことに15以上も費やしてしまった。もっとなんとかなって
欲しいもんだ。

 4/12
WWW
ちょっと web ページを作っていて、かなりの割合で携帯電話でアクセスしてくる。
ちょっと心配だったけど utf-8 で書いてみて様子を見たら、特に見られないと
報告は来ていたので一安心していた。入力項目がある cgi を作っていて、また
心配になったので調べてみたら、AU だと utf-8 の対応が微妙みたい。後で直す
のも面倒なので、Shift-JIS で作っておいた。なんだか、21世紀に入って10年も
経っているのに、文字コードで悩むことになるとは。さらに10年後は、どうなって
いるのか予想してみるのも面白いかも。

 4/13
Other Network
なかなか時間がとれなくて進めない、10日の続き。とりあえず、ptunnel を起動
して、ssh で接続してみた。応答がないので、1分ぐらい待ってからあきらめ、
このときの ptunnel の表示を見てみた。

[toyota@vjun]$ ptunnel -p login.195.jp -lp 80 -da localhost -dp 4238
[inf]: Starting ptunnel v 0.72.
[inf]: (c) 2004-2011 Daniel Stoedle, >daniels@cs.uit.no<
[inf]: Security features by Sebastien Raveau, >sebastien.raveau@epita.fr<
[inf]: Relaying packets from incoming TCP streams.
[inf]: Incoming connection.
[evt]: No running proxy thread - starting it.
[inf]: Ping proxy is listening in privileged mode.
[inf]: Connection closed or lost.
[inf]: Session statistics:
[inf]: I/O:   0.00/  0.00 mb ICMP I/O/R:       55/       3/      23 Loss:  7.7%

ロスが多いのは無視して、なんだか通信しているような気もするような。tcpdump
で見てみないと駄目かな。そんな余裕があるかどうか。

 4/14
Other
Perl でカタカタとプログラムを書いていた。で、C言語で言う switch 文って
どうやって書くのだっけ、と調べてみたけど見つからない。どうやら、if 文で
誤魔化すしかないみたい。不便だな、と思って少し調べてみたら、5.8 以降では
switch モジュールが標準であるみたい。全く実行時間を気にするようなコード
じゃないけど、気分的に use Switch すると遅くなりそうな気がして、素直に
使う気になれないのは、古い人間なんだろうな。そんなことを考えながら、if
文の連続を書いた。

 4/15
Other
久しぶりに EeePC 900A を引っ張り出してきた。旅行中にビールをこぼして、
キーボードが駄目になり、怪しげなキーボードに交換したは良いが、「|」キーが
打てない感じで、どうしたものかと。xev で、打ったときに反応があるのかを
確認しようとしたが、xev が入っていない。インストールしたいけど、どこにも
見つからないので、xmodconfig というのを入れてみることにした。
sourceforge から xmodconfig-0.2.0-beta.tar.gz をダウンロード。

[toyota@felucia]% tar xfz xmodconfig-0.2.0-beta.tar.gz
[toyota@felucia]% cd xmodconfig-0.2.0-beta
[toyota@felucia]% ls
COPYING  defaults  man   po         src  xml
README   doc       menu  resources  ui   xmodconfig.pro

何をすれば良いのか、ピンと来ない。src ディレクトリに行ってみる。

[toyota@felucia]% cd src
[toyota@felucia]% ls
aboutdialog.cpp  helpbrowser.cpp  main.cpp           tooltips.h
aboutdialog.h    helpbrowser.h    mainwindow.cpp     xmlreader.cpp
commandline.cpp  hexdialog.cpp    mainwindow.h       xmlreader.h
commandline.h    hexdialog.h      prefdialog.cpp     xmodprocess.cpp
definitions.h    keymappings.cpp  prefdialog.h       xmodprocess.h
definitions.h~   keymappings.h    replacedialog.cpp
finddialog.cpp   listener.cpp     replacedialog.h
finddialog.h     listener.h       tooltips.cpp

Makefile がないので、README を読んでみる。

[toyota@felucia]% cd ..
[toyota@felucia]% less README 

どうやら、qmake を実行するみたい。実行してみた。

[toyota@felucia]% qmake
[toyota@felucia]% ls
COPYING   README    doc  menu  resources  ui   xmodconfig.pro
Makefile  defaults  man  po    src        xml
[toyota@felucia]% make
/opt/qt4/bin/uic ui/replacedialog.ui -o ui_replacedialog.h
/opt/qt4/bin/uic ui/finddialog.ui -o ui_finddialog.h
/opt/qt4/bin/uic ui/prefdialog.ui -o ui_prefdialog.h
~snip~
In file included from src/mainwindow.h:21,
                 from src/main.cpp:18:
./ui_mainwindow.h:29:28: error: qplaintextedit.h: No such file or directory
In file included from src/mainwindow.h:21,
                 from src/main.cpp:18:
./ui_mainwindow.h:66: error: ISO C++ forbids declaration of 'QPlainTextEdit' wi
th no type
./ui_mainwindow.h:66: error: expected ';' before '*' token
./ui_mainwindow.h: In member function 'void Ui_MainWindow::setupUi(QMainWindow*
)':
./ui_mainwindow.h:175: error: 'plainTextEdit' was not declared in this scope
./ui_mainwindow.h:175: error: expected type-specifier before 'QPlainTextEdit'
./ui_mainwindow.h:175: error: expected `;' before 'QPlainTextEdit'
make: *** [main.o] Error 1

Qt 周りのファイルがないんだろうな。ちょっとの変更じゃ、直りそうにない気が
してきたので、xev を本格的に探すことに。x.org の下に、xev.c というソース
ファイルがあったので、ちょっと引っ張ってみることに。

[toyota@felucia]% wget ftp://ftp.x.org/pub/unsupported/programs/xev/xev.c
[toyota@felucia]% gcc xev.c
xev.c:37:21: error: X11/Xos.h: No such file or directory
xev.c:38:22: error: X11/Xlib.h: No such file or directory
xev.c:39:23: error: X11/Xutil.h: No such file or directory
xev.c:40:24: error: X11/Xproto.h: No such file or directory

X 周りの開発環境って、入れてないんだっけ。困ったな。

 4/16
Other
昨日の続き。X を使わない showkey というコマンドがあるらしいので、少し検索
してみて、console-tools に入っていることがわかったので、ダウンロードして
くることに。
[toyota@felucia]% tar xfz  console-tools-0.3.2.tar.gz
[toyota@felucia]% cd console-tools-0.3.2
[toyota@felucia]% configure
~snip~
[toyota@felucia]% make
~snip~
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -DDATADIR=\"/usr/share\" -DKEYMAP
DIR=\"keymaps\"    -g -O2 -c showkey.c
showkey.c: In function ‘main’:
showkey.c:268: error: label at end of compound statement
make[2]: *** [showkey.o] Error 1
make[2]: Leaving directory `/tmp/xmm/console-tools-0.3.2/kbdtools'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/xmm/console-tools-0.3.2'
make: *** [all-recursive-am] Error 2

こけたな。それも、目的の showkey で。showkey.c の中を見てみる。

      switch (command)
        {
        case cmd_scancodes:
        case cmd_unicode:
          putchar('\n');
          break;
        case cmd_keymap:
          printf(")\n");
        default:

        }

この switch 文の default が気に食わないらしいから、そこをコメントにして、
再度実行。

[toyota@felucia]% make
~snip~
codepage.c: In function 'handle_codepage':
codepage.c:231: error: missing terminating " character
codepage.c:233: error: 'The' undeclared (first use in this function)
codepage.c:233: error: (Each undeclared identifier is reported only once
codepage.c:233: error: for each function it appears in.)
codepage.c:233: error: expected ')' before 'files'
codepage.c:233: error: stray '\' in program
codepage.c:233:56: warning: missing terminating " character
codepage.c:233: error: missing terminating " character
codepage.c:287: error: expected ';' before '}' token
codepage.c:208: error: label 'next' used but not defined
make[2]: *** [codepage.o] Error 1
make[2]: Leaving directory `/tmp/xmm/console-tools-0.3.2/contrib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/xmm/console-tools-0.3.2'
make: *** [all-recursive-am] Error 2

コケたけど、目的の showkey はできたっぽいので、実行してみた。

[toyota@felucia]% cd kbdtools/
[toyota@felucia]% ls
Makefile     dumpkeys       kbd_mode    loadkeys.o     setleds        showkey
Makefile.am  dumpkeys.c     kbd_mode.c  loadkeys.y     setleds.c      showkey.c
Makefile.in  dumpkeys.o     kbd_mode.o  mk_modmap      setleds.o      showkey.o
analyze.c    getkeycodes    loadkeys    setkeycodes    setmetamode
analyze.l    getkeycodes.c  loadkeys.c  setkeycodes.c  setmetamode.c
analyze.o    getkeycodes.o  loadkeys.h  setkeycodes.o  setmetamode.o
[toyota@felucia]% ./showkey
lt-showkey: error while loading shared libraries: libconsole.so.0: cannot open 
shared object file: No such file or directory

ライブラリが無いみたいなので、探してみる。

[toyota@felucia]% find ../ -name libconsole.so.0
../lib/console/.libs/libconsole.so.0

一時的に LD_LIBRARY_PATH をいじって、再実行。

[toyota@felucia]% ./showkey
lt-showkey: error while loading shared libraries: libcfont.so.0: cannot open sh
ared object file: No such file or directory

LD_LIBRARY_PATH に追加していくけど、同じ感じで。

[toyota@felucia]% ./showkey
lt-showkey: error while loading shared libraries: libctutils.so.0: cannot open 
shared object file: No such file or directory

[toyota@felucia]% ./showkey
lt-showkey: error while loading shared libraries: libctgeneric.so.0: cannot ope
n shared object file: No such file or directory

LD_LIBRARY_PATH を追加していって、やっと動いた。しかし、問題の「|」キーを
押しても、何の反応もない。ハードウェア的に駄目みたい。がっかり。

 4/17
Other
いつ頃からか、Poderosa で Cygwin を起動していると、起動した直後のホーム
ディレクトリが。
C:\Program Files\Poderosa\・\home\toyota
になっている。Poderosa というよりも、Cygwin が仕様変更したのだろうけど、
ちょっと解決方法が見つからない。私だけの問題かな。時間があったら、もう
少し調べてみよう。

 4/18
Other
ちょっと点字を打ちたいと思って、点字プリンターはいくらぐらいするものか
調べてみたら、うん百万円から、30万円ぐらいまで色々。30万円でも結構高い
値段だな、なんて思いながら、wikipedia の点字ページを読んでみると、漢字が
打てないことに気が付いた。6ビットなので、平仮名とアルファベットの切り替え
なんかも発生するみたいだし。Unicode にあるような8ビットにすれば、PC との
融和性も高いだろうし、そのまま utf-8 で書けて漢字も表せる、なんて安易に
考えてしまった。よく考えたら、漢字コードを全部覚えるなんて無理だよね。
ちょっと缶ビールの点字を指でなぞったけど、どこに点があるなんて全く読み
取れなかった。色々難しいことばかりだな。

 4/19
Network WWW
昨日だかに Skype を起動したら、新しいのが出たとかで。念のためバージョンを
確認すると、今は 5.5.59.124 だった。アップデートしたら、5.8.59.158 になる。
起動した感じは大きく変わった感じはなく。確認のため、エモーティコンを確認
してみると、(oliver) が増えていた。多分、バージョン 5.7 からだろうな。
エモーティコンのページを更新しないと。

 4/20
Other WWW
久しぶりにとあるメールを読んでいたら、cron から大量のメールが届いていた。
中を見ると、IP アドレスが変わったとき検知してメールを送るスクリプトからの
メールだった。wget で外の cgi にアクセスして、その cgi の応答が変わったら
IP アドレスが変わっていると判断しているスクリプト。cgi 自体は、単純に、
接続元アドレスを返すものだったのだけど、急に応答が変わってしまって、cron
で大量にメールが飛んでしまったようである。で、cgi を見てみると、昔使って
いた infoseek というか isweb のサービスを使っていた。isweb ってかなり前に
サービスを終了してしまっているのに。今までなんとか cgi が動いていたのかな、
それとも isweb の応答が毎回変わるようになったのか。ちょっとわからないけど、
とりあえず cron の設定を変えておいた。

 4/21
Other WWW
web に使う写真で、文字も入っているので jpg にしようか gif にしようかと、
しばらく悩んで、gif の滅色の具合を確かめたりしていたけど、滅色してしまうと
どうも白が出なくて、変な背景色になってしまう。これさえなんとかなればな、
と思って jpg にしてみたけど、文字がぼやけてしまう。しばらく悩んで、gif に
することにした。そう言えば、最近のブラウザとか携帯電話のブラウザは png の
対応ってどうなんだろう。今度時間があったら、調べてみよう。

 4/22
Other WWW
昨日の続き。携帯電話で png 画像の表示について、少し調べてみた。最近の機種は
png 形式の画像表示に対応しているみたいで、よっぽど古い端末じゃなければ、
表示はできるみたい。今やスマートフォンの時代で、売られている端末の7割
だかがスマートフォンらしいので、png 表示について気を留めないでも良いの
かもしれないな。あとは、ファイルサイズと相談だな。

 4/23
Network Other
Dovecot v2.1.5 がリリースされた。リリースノートを見ると、いつもと違って
なにやらたくさん書いてる。質問なんかのメールは、有料サポートのを優先する
とかなんとからしく。open source だと色々と思惑があって、バランスが難しい
のだろうけど、開発のペースはこのままでいてもらいたいところ。

 4/24
Other
2、3日前、HDD の整理をした。久しぶりに chrome を起動したら、全く応答が
ない。どうしたものかと、ショートカットを見てみたら。
C:\Documents and Settings\toyota\Local Settings\Application Data
フォルダの下の
Google\Chrome\Application\chrome.exe
を呼び出していた。そう言えば、Application Data の下が妙に大きかったので
ごっそり消したのを思い出した。そうか、消しちゃ駄目だったんだ。Windows の
標準である C:\Program Files 下にインストールして欲しいよな。Google も何だか
尖がっている気もするし。仕方ない、再インストール。

 4/25
Network Other
eメールを utf-8 で出そうかと考えていた。最近は web メールで読む人が多い
ので大丈夫かと思ったけど、携帯電話のことを忘れていた。手元に届いたメールで
携帯電話から届いたメールを見てみると、全て。
Content-Type: text/plain; charset="iso-2022-jp"
だった。utf-8 で送るのは微妙だな、おとなしく iso-2022-jp で送ることにし
ようかな。

 4/26
Other
あんまり Office に慣れてない人達にプレゼンの PowerPoint ファイルを作って
もらったの。完成度がどうなるのか心配していたけど、どうにかなるもんだね。
その代わりと言っては変だけど、発表の方が難がある感じ。ま、これからに期待を
することにしよう。

 4/27
Other
ホンダが家庭用の発電機を出した。
http://kaden.watch.impress.co.jp/docs/news/20120426_529516.html
これがガソリンで動くのではなく、なんとLPガスで動作するのである。できれば、
カセットコンロ用のガスに対応して欲しかったけど、それだと数分ぐらいしか
もたないのだろうね。そのうち、プロパンガスの自動二輪車も出てくるかな。
少しだけ期待してみることにしよう。

 4/28
Other
セールをやっているらしいので、帰りに最寄り駅の電気屋に寄ってきた。気に
なる商品もなく、帰ろうかと思ったら willcom の端末も安く売っているような
ので見てみた。なんか端末の数は少ないし、値段もそんなに安くないし。少し
気になる端末は安かったけど、今の端末と大きく変わっている感じもないし。
willcom からスーマートフォンが出るのを首を長くして待つことにしよう。

 4/29
Other
ちょっと土を作ろうかと、前から気になっていた「EM菌」について調べてみたら、
どうもマイナスイオンぐらいの怪しいものみたい。確かに、よく考えてみると、
微生物数はそれこそ微々たるものか。ニセ科学とまで言い切っているところも
あるし、EM菌を使った土作りはやめることにした。

 4/30
Other
弥生会計を起動したのだけど、どうも駄目駄目な感じ。問題は勝手にバージョン
アップデートを始めてしまうこと。こっちとら、そんなこと望んでないのに。
問題は、アップデートに必要なサービスがいくつかあって、そのチェックすら
せずに始めるので不明なエラーだ何だとゴチャゴチャ言ってくる。勝手にやる
なら、チェックも勝手にやって適切なメッセージを出すべきでしょう。世の人は
どう使っているか知らないけど、私にとっては不便で仕方がない。

21st projects Tatsuyoshi Networks Prompt Works
by Tatsuyoshi since 2003