Wednesday, December 30, 2009

To Build Hanterm-xf 2.0.6 on Debian Linux

Hanterm-xf is a fast and functional X-terminal emulator. Although development of Hanterm-xf ceased long ago, I find hanterm-xf very useful because it has built-in Korean input system and displays Latin, Korean and Unicode well. Trying to find the hanterm-xf source was not so easy, but I found it here with Yahoo! search. I downloaded hanterm-xf-2.0.6-177.tar.gz Compiling Hanterm-xf requires the following development packages to be installed:



  • gcc
  • g77
  • make
  • libncursesw5-dev
  • libxft-dev
  • libxaw7-dev


Before compiling hanterm-xf, I had to make some symbolic links in /usr/include.


ln -s ncursesw /usr/include/ncurses
ln -s freetype2/freetype /usr/include


I unpacked the hanterm-xf source and entered the source directory:


tar xzvf hanterm-xf-2.0.6-177.tar.gz
cd hanterm-xf-2.0.6-177


I ran ./configure for hanterm-xf as follows:


./configure --prefix=/usr --host=i586-pc-linux-gnu --enable-doublechars --enable-freetype --enable-i18n --disable-input-method --disable-maximize --enable-pty-handshake --disable-tek4014 --enable-toolbar --disable-vt52 --enable-wide-chars --enable-chat --enable-now-chat


I had to modify the LIBS line of Makefile in order to successfully link hanterm with libncursesw5 later. Basically, I appended -lncursesw at the end of the LIBS line.



LIBS = -lXft -lfreetype -lXrender -lXrender -lXaw -lXmu -lXext -lXt -lSM -lICE -lX11 -lnsl -lncursesw


Then, I compiled hanterm-xf as follows:


make
make install


Packaging Hanterm-xf 2.0.6


I made a package of hanterm-xf with the following contents:


/usr/bin/hanterm
/usr/share/hangul_keyboard/2bul.kbd
/usr/share/hangul_keyboard/3bul_390.kbd
/usr/share/hangul_keyboard/3bul_final.kbd
/usr/share/hangul_keyboard/dvorak.map
/usr/share/hangul_keyboard/dvorak_2bul.kbd
/usr/share/hangul_keyboard/dvorak_3bul_390.kbd
/usr/share/hangul_keyboard/dvorak_3bul_final.kbd
/usr/share/man/man1/hanterm.1.gz
/etc/X11/app-defaults/Hanterm
/etc/X11/app-defaults/Hanterm-color

You can download my hanterm-xf packages here.




My .Xresources Setting for Hanterm-xf


To run hanterm-xf, you need a monospace Latin font and a Korean font. Before running hanterm-xf, put hanterm settings in your .Xresources file. The following is my hanterm settings in .Xresrources.


Hanterm*title: Hanterm
Hanterm*iconName: Hanterm
Hanterm*statusHangulLabel: [KO]
Hanterm*statusEnglishLabel: [EN]
Hanterm*statusWansungLabel: [WANS]
Hanterm*statusJohabLabel: [JHAB]
Hanterm*statusSebyolLabel: [3B]
Hanterm*statusDubyolLabel: [2B]
Hanterm*hangulKeyboard: 2
Hanterm*saveLines: 1024
Hanterm*VT100*color0: black
Hanterm*VT100*color1: red
Hanterm*VT100*color2: green3
Hanterm*VT100*color3: orange
Hanterm*VT100*color4: blue
Hanterm*VT100*color5: purple1
Hanterm*VT100*color6: DarkTurquoise
Hanterm*VT100*color7: grey90
Hanterm*VT100*color8: grey60
Hanterm*VT100*color9: salmon
Hanterm*VT100*color10: PaleGreen1
Hanterm*VT100*color11: khaki1
Hanterm*VT100*color12: DeepSkyBlue
Hanterm*VT100*color13: orchid1
Hanterm*VT100*color14: cyan
Hanterm*VT100*color15: white
Hanterm*background: black
Hanterm*foreground: gray90
Hanterm*rightScrollBar: on
Hanterm*Scrollbar*width: 16
Hanterm*Scrollbar*background: grey75
Hanterm*Scrollbar*foreground: grey30
Hanterm*SimpleMenu*background: DeepSkyBlue
Hanterm*SimpleMenu*foreground: black
Hanterm*VT100.cursorBlink: true
Hanterm*VT100.cursorColor: orange
Hanterm*VT100.hanCursorColor: DarkTurquoise
Hanterm*VT100.cutNewline: false
Hanterm*VT100.cutToBeginningOfLine: false
Hanterm*VT100.Translations: #override \n\
~Shift ~Ctrl ~Meta BackSpace: string(0x7F)\n\
~Shift ~Ctrl ~Meta Delete: string(0x1b) string("[3~")\n\
~Shift ~Ctrl ~Meta Home: string(0x1b) string("[1~")\n\
~Shift ~Ctrl ~Meta End: string(0x1b) string("[4~")\n\
Shift ~Ctrl ~Meta space: toggle-hangul()\n\
~Shift Ctrl ~Meta space: hanja-input()\n\
~Shift Ctrl ~Meta BackSpace: code-input()\n\
~Shift Ctrl ~Meta Return: toggle-chat()\n\
~Shift ~Ctrl Meta Up: change-code()\n\
~Shift ~Ctrl Meta Left: change-keyboard()\n\
~Shift ~Ctrl ~Meta : scroll-back(5,line)\n\
~Shift ~Ctrl ~Meta : scroll-forw(5,line)\n\
Shift ~Ctrl ~Meta : scroll-back(1,line)\n\
Shift ~Ctrl ~Meta : scroll-forw(1,line)\n\
~Shift Ctrl ~Meta : scroll-back(1,halfpage)\n\
~Shift Ctrl ~Meta : scroll-forw(1,halfpage)\n\
~Shift ~Ctrl Meta : scroll-back(1,page)\n\
~Shift ~Ctrl Meta : scroll-forw(1,page)
Hanterm*Font: -*-dejavu sans mono-medium-r-normal-*-*-110-*-*-*-*-iso8859-1
Hanterm*hangulFont: -*-hysinmyeongjo-medium-r-normal--*-130-*-*-*-*-ksc5601.1987-0
Hanterm*SimpleMenu*fontSet: -urw-Nimbus Sans L-regular-r-normal-*-*-110-*-*-p-*-iso8859-1,-hanyang-hygothic-medium-r-normal-*-*-110-*-*-*-*-ksc5601.1987-0
Hanterm*VT100*colorULMode: off
Hanterm*VT100*colorBDMode: off
Hanterm*VT100*colorBD: blue
Hanterm*VT100*colorUL: red
Hanterm*charClass: 37-38:48,42-43:48,45-47:48,63-64:48
Hanterm*pointerColor: DeepSkyBlue
Hanterm*pointerColorBackground: grey40
Hanterm*pointerShape: right_ptr
Hanterm*beNiceToColormap: false

Linux: To Build IceWM 1.2.37

IceWM is my favorite window manager. Though most distros provide icewm packages, I like to build IceWM on my own. The following packages are needed to build IceWM.




  • g++
  • make
  • libjpeg62-dev
  • libpng12-dev
  • libtiff4-dev
  • libungif4-dev
  • libxft-dev
  • libice-dev


IceWM 1.2.37 depends on Imlib11 which is an obsolete library. I couldn't find imlib11 in Debian Sid any longer. In order to build IceWM that will work on many systems ranging from Debian Sarge to Debian Sid, I wanted to compile Imlib11 statically and integrate imlib11 into the IceWM binaries. So I downloaded Imlib11 source (imlib-1.9.15.tar.gz) from ftp.gnome.org and compiled static imlib11.



tar xzvf imlib-1.9.15.tar.gz

cd imlib-1.9.15

./configure --build=i586-pc-linux-gnu --sysconfdir=/etc --enable-static --disable-shared --disable-modules

make

make install


Then, I downloaded the source of IceWM 1.2.37 (icewm-1.2.37.tar.gz) from icewm.sf.net. I unpacked the tarball into my home directory and compile IceWM.



tar xzvf icewm-1.2.37.tar.gz

cd icewm-1.2.37

./configure --build=i586-pc-linux-gnu --enable-gradients --disable-sm --disable-shaped-decorations --disable-xrandr --disable-xinerama --disable-x86-asm

make

cp src/icewm src/icewmtray /usr/local/bin

strip /usr/local/bin/ice*


I am setting up IceWM in a minimal package. The following set of files are to be copied to a new system.



/etc/im_palette-small.pal
/etc/im_palette-tiny.pal
/etc/im_palette.pal
/etc/imrc
/usr/local/bin/icewm
/usr/local/bin/icewmtray


To customize IceWM, settings and themes should be saved in /etc/icewm and /usr/local/share/icewm.

Monday, December 28, 2009

Linux: To Compile wpa_supplicant on Debian 3.1 Sarge

I was using good old Debian Linux 3.1 Sarge when I found out Sarge's wpasupplicant couldn't work well with ndiswrapper-supported Windows network drivers. So I set out to compile wpa_supplicant on my own. First, I installed the following development packages.



  • gcc-3.4
  • libssl0.9.7
  • make


Then, I downloaded the wpa_supplicant source (wpa_supplicant-0.6.9.tar.gz) from http://hostap.epitest.fi/wpa_supplicant. I unpacked the source and read the README files.



tar xzvf wpa_supplicant-0.6.9.tar.gz
cd wpa_supplicant-0.6.9/wpa_supplicant


I went into the wpa_supplicant subfolder and created .config to customize my build. The following is the contents of my .config:



CONFIG_WIRELESS_EXTENSION=y
CONFIG_DRIVER_HOSTAP=y
CONFIG_DRIVER_ATMEL=y
CONFIG_DRIVER_WEXT=y
CONFIG_DRIVER_RALINK=y
CONFIG_DRIVER_NDISWRAPPER=y
CONFIG_DRIVER_IPW=y
CONFIG_IEEE8021X_EAPOL=y
CONFIG_EAP_MD5=y
CONFIG_EAP_MSCHAPV2=y
CONFIG_EAP_TLS=y
CONFIG_EAP_PEAP=y
CONFIG_EAP_TTLS=y
CONFIG_EAP_GTC=y
CONFIG_EAP_OTP=y
CONFIG_EAP_SIM=y
CONFIG_EAP_AKA=y
CONFIG_EAP_PSK=y
CONFIG_EAP_SAKE=y
CONFIG_EAP_GPSK=y
CONFIG_EAP_PAX=y
CONFIG_EAP_LEAP=y
CONFIG_EAP_IKEV2=y
CONFIG_EAP=y
CONFIG_WPS=y


Then, I began compilation by running make.


make


The compilation was successful. I installed wpa_supplicant with the following command.



make install


The following files are copied to the system.



/usr/local/sbin/wpa_supplicant
/usr/local/sbin/wpa_passphrase
/usr/local/sbin/wpa_cli

Friday, December 18, 2009

Linux: To build WDM

WDM is a display login manager for Linux. I am building WDM as replacement for xdm and slim. Before compilation, I installed the following packages in addition to the compiler toolchain:


  • libwraster3-dev
  • libwings-dev
  • libpam0g-dev
  • libxinerama-dev
  • gettext

I configured wdm like this:


./configure --x-includes=/usr/local/include --x-libraries=/usr/local/lib --sysconfdir=/etc/X11 --localstatedir=/var --with-nlsdir=/usr/share/locale --with-wdmdir=/etc/X11/wdm --with-gfxdir=/usr/share/pixmaps/wdm --enable-aafont --with-wmlist=icewm:openbox:pekwm:gnome-session

Then I built WDM:


make
make install

The following files are installed.


/etc/X11/wdm/Xclients
/etc/X11/wdm/Xservers
/etc/X11/wdm/Xservers.ws
/etc/X11/wdm/Xsession
/etc/X11/wdm/Xsetup_0
/etc/X11/wdm/wdm-config
/etc/X11/wdm/wdmReconfig
/usr/local/bin/wdm
/usr/local/bin/wdmLogin
/usr/local/man/man1/wdm.1
/usr/share/locale/de/LC_MESSAGES/wdm.mo
/usr/share/locale/cs/LC_MESSAGES/wdm.mo
/usr/share/locale/cy/LC_MESSAGES/wdm.mo
/usr/share/locale/en/LC_MESSAGES/wdm.mo
/usr/share/locale/es/LC_MESSAGES/wdm.mo
/usr/share/locale/ja/LC_MESSAGES/wdm.mo
/usr/share/locale/ru/LC_MESSAGES/wdm.mo
/usr/share/locale/fr_FR/LC_MESSAGES/wdm.mo
/var/run/wdm

I created a script as /etc/init.d/wdm:


#!/bin/sh

set -e

test -x /usr/local/bin/wdm || exit 0

case "$1" in
start)
echo "Starting wdm..."
start-stop-daemon --start --quiet --pidfile /var/run/wdm.pid --name wdm --startas /usr/local/bin/wdm
;;

restart)
/etc/init.d/wdm stop
/etc/init.d/wdm start
;;

stop)
echo "Stopping wdm..."
if ! [ -f /var/run/wdm.pid ]; then
echo "/var/run/wdm.pid not found"
else
start-stop-daemon --stop --quiet --pidfile /var/run/wdm.pid --name wdm --retry TERM/5/TERM/5
fi
;;
esac

exit 0

Upon reboot, wdm started but wouldn't respond to the Return key after I typed my login name. I wasn't able to fix this problem yet.

Download X.org Server 1.6.5 for Linux

Here you can download my build of X.org 1.6.5 for Linux. I didn't bother to pack it in a RPM or DEB package. However, the installation is simple. Just use tar and bzip2 to extract it at /.


cd /
bzip2 -dc xorg165.tar.bz2 | tar xf -

Everything will be extracted into /usr/local. This package contains X.org core server plus Intel, kbd and mouse driver along with pixman, libdrm2, Mesa OpenGL libraries. After installation, remember to run ldconfig as root.


Download X.org server 1.6.5

Tuesday, December 1, 2009

About This Blog

KBlog logo This blog seeks to provide a collection of interesting pictures found on the Web. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Followers

Total Pageviews

Powered By Blogger