Installation procedure
======================
# Decompress files from tar package
tar xfz unicon-3.0.3-release.tar.gz
cd unicon-3.0.3

# Patch kernel source

1. How to patch Linux source:
   copy proper patch from unicon-3.0.3/kernel-patches directory to your
   linux source directory (example: /usr/src/linux).
   cp kernel-patches/unicon-kernel-2.2.19.patch.gz /usr/src/linux
#Use unicon kernel patch to patch kernel source. for example: 
   cd /usr/src/linux
   gzip -dc unicon-kernel-2.2.19.patch.gz | patch -p1

2. Configuration
   cd /usr/src/linux
   make menuconfig
   select "Code maturity level options"
   select "Prompt for development and/or incomplete code/drivers"
   press "Exit"
   select "Console Driver"
   select "Support Frame Buffer Devices"
   select "Unicon Support"
   select "VESA VGA Graphics Console"
   press "Exit"

   select other options that you want.
   save configuration and exit.

3. Rebuild and install new kernel, then reboot with 
   the new kernel.

   ...See KERNEL-HOWTO or /usr/src/linux/README...

4. Download and install pth library, pth library is required
   for compiling unicon.

   get pth library from ftp://ftp.gnu.org/pub/gnu/pth, then:

   tar xfz pth-1.3.7.tar.gz
   cd pth-1.3.7
   ./configure --prefix=/usr
   make 
   make install

5. Install unicon step by step
   cd unicon-3.0.3
   ./configure --prefix=/usr 
   make
   make install
   make data   ; this may take a long time... 
   make data-install

#Restart your computer in framebuffer mode.
reboot

LILO:linux vga=771

; 771 for 800x600x8bit video mode
; 791 for 1024x768x16bit video mode
;please see /usr/src/linux/Documentation/fb/vesafb.txt for details.

Usage
=====
There are some scripts in unicon package for start unicon automatically.
Please check them in scripts directory, run following command to install
these scripts into system start directory.

cd scrpits
sh install.sh

reboot your computer to start unicon.
if you don't want to start unicon at system startup time, run this:

chkconfig unicon off

---------------------------------------------------------------------------
If you want to run and config unicon manually, please read the following
instruction.

# install unikey module
insmod unikey

# if gb support 
insmod encode-gbk       
#insmod encode-gb for GB2312

#if big5 support
insmod encode-big5       

#loadunimap direct for unicon, run this for every tty.
loadunimap /usr/lib/unicon/direct.uni

#run unicon to enable input method.
unicon --gb

# you can add these lines to /etc/rc.d/rc.local
# to enable unicon at boot time.
#---------------------------------------
  insmod unikey
  insmod encode-gb
  loadunimap /usr/lib/unicon/direct.uni
# following lines for other fonts
#  insmod encode-gbk	
#  insmod encode-big5	
#  insmod encode-jis	
#  insmod encode-kscm	
  if [ -x /usr/bin/unicon ]; then
     echo "Starting Unicon3..."
     /usr/bin/unicon --gb >/dev/null 2>&1
  fi
#----------------------------------------

If you can not input multi-byte charater in bash
commandline, please edit ~/.inputrc and add following 
3 lines, and then login again.

set input-meta on
set convert-meta off
set output-meta on

If you don't need any input method, use unicon for display
only, you need not have to run unicon command. Just insmod
the unikey.o and encode-*.o then use uniconctrl to switch 
to proper encode, it's ok.

example:

  insmod unikey
  insmod encode-gbk
  loadunimap /usr/lib/unicon/direct.uni
  uniconctrl --gbk

above lines for GBK display.

uniconctrl is a commandline mode encode switch utility.
uniconcfg is a menu-driven mode encode swith utility.

# any question, please send email to unicon@turbolinux.com.cn

Good Luck!
