でも、単にインストールだけじゃ
ということで、ちょっと日本語が出るようにしてインストールしてみます。
注意してほしいのは、このような変更は私が勝手にするものであり、何か不都 合があっても、無保証であることです。つまりここで記述する方法は各自の責 任において行なってください。
なお、完全に国際化や日本語化するわけではありません。あくまで日本語が表 示できるようにするだけです。
それともう一つ、この修正は font について深く考えてません。新た に -fontset というオプションを付けてはいますが、従来の -font および -msgfont というオプションが使用できなくなっ ています。
というか、指定してもエラーではありませんが、無視されます。
いやぁ、まったくもって
さて、この修正のための パッチ を用意しました。もし試したい人はこの パッチ をどうぞ使ってみてくだ さい。
なおこのパッチですが、使用や紹介はもちろん自由なんですが、二次配布は一 応禁止させていただきます。理由は上記の通りあまりにも手抜きで、世に出回 るにはちょっと恥ずかしからです。
というわけで、xlockmore-4.00BETA.tar.gz をインストールします。 まずは展開
cipher:~# ls -l xlockmore-4.00BETA.tar.gz PATCH.xlockmode-4.00BETA-jp -r--r--r-- 1 yokota users 4950 Feb 8 11:22 PATCH.xlockmode-4.00BETA-jp -r--r--r-- 1 yokota users 672507 Feb 8 09:52 xlockmore-4.00BETA.tar.gz cipher:~# tar xfz xlockmore-4.00BETA.tar.gz cipher:~# cd xlockmore-4.00BETA cipher:~# ls Imakefile config.h.in hop.c nose.c sphere.c Makefile.in config.sub hyper.c option.c spiral.c README configure image.c pacman.c spline.c XLock.ad configure.in install-sh passwd.c star.c XmLock.ad daisy.c julia.c penrose.c swarm.c ant.c dclock.c kaleid.c petal.c swirl.c ball.c demon.c laser.c pixmaps tri.c bat.c descrip.mms life.c puzzle.c triangle.c bitmaps docs life1d.c pyro.c turtle.c blank.c drift.c life3d.c qix.c utils.c blot.c eyes.c lightning.c random.c version.h bomb.c flag.c lissie.c ras.c vroot.h bouboule.c flags logout.c ras.h wator.c bounce.c flame.c loop.c raster wire.c braid.c forest.c make.com resource.c world.c bug.c galaxy.c marquee.c roll.c worm.c cartoon.c gear.c maze.c rotor.c xbm.c clock.c geometry.c mkinstalldirs shape.c xlock.c color.c grav.c mode.c slip.c xlock.h config hackers mode.h sound.c xlock.man config.guess helix.c mountain.c sounds xmlock.c次に日本語を出るようにするためのパッチをあてます。
cipher:~# patch -s < ../PATCH.xlockmode-4.00BETA-jp cipher:~# ls Imakefile descrip.mms make.com sound.c Makefile.in docs marquee.c sounds README drift.c marquee.c.orig sphere.c XLock.ad eyes.c maze.c spiral.c XmLock.ad flag.c mkinstalldirs spline.c ant.c flags mode.c star.c ball.c flame.c mode.h swarm.c bat.c forest.c mountain.c swirl.c bitmaps galaxy.c nose.c tri.c blank.c gear.c option.c triangle.c blot.c geometry.c pacman.c turtle.c bomb.c grav.c passwd.c utils.c bouboule.c hackers penrose.c version.h bounce.c helix.c petal.c vroot.h braid.c hop.c pixmaps wator.c bug.c hyper.c puzzle.c wire.c cartoon.c image.c pyro.c world.c clock.c install-sh qix.c worm.c color.c julia.c random.c xbm.c config kaleid.c ras.c xlock.c config.guess laser.c ras.h xlock.c.orig config.h.in life.c raster xlock.h config.sub life1d.c resource.c xlock.h.orig configure life3d.c resource.c.orig xlock.man configure.in lightning.c roll.c xmlock.c daisy.c lissie.c rotor.c dclock.c logout.c shape.c demon.c loop.c slip.c次に configure の実行。
cipher:~# ./configure --prefix=/usr/X11 creating cache ./config.cache checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking whether ln -s works... yes checking how to run the C preprocessor... gcc -E checking for AIX... no checking for a BSD compatible install... /usr/bin/ginstall -c checking for fcntl.h... yes checking for limits.h... yes checking for sys/select.h... no checking for sys/time.h... yes checking for syslog.h... yes checking for unistd.h... yes checking for memory.h... yes checking for working const... yes checking for uid_t in sys/types.h... yes checking for ANSI C header files... yes checking for pid_t... yes checking for size_t... yes checking whether time.h and sys/time.h may both be included... yes checking whether struct tm is in sys/time.h or time.h... time.h checking for gethostname... yes checking for gettimeofday... yes checking for select... yes checking for strdup... yes checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include checking for dnet_ntoa in -ldnet... no checking for dnet_ntoa in -ldnet_stub... no checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... yes checking for XPM... libraries /usr/X11R6/lib, headers /usr/X11R6/include/X11 checking for Motif... no checking for Editres... libraries /usr/X11R6/lib, headers /usr/X11R6/include checking for GL... libraries /usr/X11R6/lib, headers /usr/X11R6/include checking for DtSaver... no checking for RPLAY... no checking for NAS... no checking host system type... i586-pc-linux-gnu checking for elf.h... yes checking for dirent.h that defines DIR... yes checking for opendir in -ldir... no checking for nanosleep... yes checking for srand48... yes defining option USE_VROOT defining option ALWAYS_ALLOW_ROOT defining option USE_BOMB updating cache ./config.cache creating ./config.status creating Makefile creating config.hそしてコンパイルの実行
cipher:~# make CFLAGS=-O2 LDFLAGS='-O2 -s'これで xlock が作成されているハズです。確認してみましょう。
cipher:~# ls -l ./xlock -rwxr-xr-x 1 yokota users 785436 Feb 8 16:16 ./xlock cipher:~# file ./xlock ./xlock: ELF 32-bit LSB executable, Intel 386, version 1, stripped cipher:~# size ./xlock text data bss dec hex filename 271636 508973 86360 866969 d3a99 ./xlock最後にインストール
cipher:~# make install xapploaddir=/usr/X11/lib/X11/app-defaults ./mkinstalldirs /usr/X11/bin ./mkinstalldirs /usr/X11/man/man1 ./mkinstalldirs /usr/X11/lib/X11/app-defaults /usr/bin/ginstall -c xlock /usr/X11/bin /usr/bin/ginstall -c -m 644 xlock.man /usr/X11/man/man1/xlock.1 /usr/bin/ginstall -c -m 644 XLock.ad /usr/X11/lib/X11/app-defaults/XLock install_xlock COMPLETE cipher:~#これで終了。では早速日本語が出るが確認してみましょう。自分の ~/.Xdefaults に以下の三行を追加します。
注意してほしいのは、この記述は EUC で書いてください。漢字コード を変換する関数等を組み込んだわけではないので JIS では(たぶん) 無理です。XLock.username: あなたの名前: XLock.password: パスワードをどうぞ: XLock.info: パスワードを入力すれば抜けるし、icon をクリックすればロックだよん
では実際に xlock を起動します。環境変数 LANG を確認して おきましょう。
cipher 503# echo $LANG ja_JP.ujis cipher 506# xlockどうですか。日本語は出ましたか?
ところで xlock にはたくさんのモードがあります。
cipher 507# xlock -hとして、オプションやどのようなモードがあるのか確認してみましょう。各モー ドについて簡単な説明が出てきますが、実際にやってみるとよいです。
是非、全部かたっぱしから実行してみてください。
今日はルンルンのスィッチオフ。