Sunday, March 23, 2014

Ubuntu: Compile Hylafax 6.0.6 From Source

Let's do it all in the terminal.

wget ftp://ftp.hylafax.org/source/hylafax-6.0.6.tar.gz
tar -xvf hylafax-6.0.6.tar.gz
cd hylafax-6.0.6/
sudo apt-get install g++
sudo apt-get install libtiff4 libtiff4-dev libtiff-tools
./configure
make
sudo make install

Note at the configuration stage, some confirmations will pop out, such as

HylaFAX configuration parameters (part 1 of 2) are:

[ 1] Directory for applications:        /usr/local/bin
[ 2] Directory for lib data files:      /usr/local/lib/fax
[ 3] Directory for lib executables:     /usr/local/sbin
[ 4] Directory for system apps:   /usr/local/sbin
[ 5] Directory for manual pages:        /usr/local/man
[ 7] Directory for spooling:            /var/spool/hylafax
[ 8] Directory for uucp lock files:     /var/lock
[ 9] Uucp lock file scheme:             ascii
[10] PostScript imager package:         gs
[11] PostScript imager program:         /usr/bin/gs
[12] Manual page installation scheme:   bsd-source-cat
[13] Default page size:                 North American Letter
[14] Default vertical res (lpi):        98
HylaFAX configuration parameters (part 2 of 2) are:

[15] Location of getty program:         /sbin/agetty
[16] Location of voice getty program:   /bin/vgetty
[17] Location of sendmail program:      /usr/lib/sendmail
[18] Location of TIFF tools:            /usr/bin
[19] Location of SysV init scripts: /etc/init.d
[20] Location of SysV start scripts: ../rc2.d ../rc3.d ../rc4.d ../rc5.d
[21] Location of SysV stop scripts: ../rc0.d ../rc1.d ../rc6.d
[22] Name of SysV start script:  S97hylafax
[23] Name of SysV stop script:  K05hylafax
[24] Init script starts faxq:  yes
[25] Init script starts hfaxd  yes
[26] Start paging protocol:  no

Ubuntu 12.04: Change Default Chinese Font to WenQuanYi Micro Hei

sudo vi /etc/fonts/conf.avail/69-language-selector-zh-cn.conf

This is a fall-back list of font settings for zh-cn language. First two are for western characters. The bolded line shows the change.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

 <match target="pattern">
  <test qual="any" name="family">
   <string>serif</string>
  </test>
  <edit name="family" mode="prepend" binding="strong">
   <string>DejaVu Serif</string>
   <string>Bitstream Vera Serif</string>
   <string>WenQuanYi Micro Hei</string>
   <string>HYSong</string>
   <string>AR PL UMing CN</string>
   <string>AR PL UMing HK</string>
   <string>AR PL ShanHeiSun Uni</string>
   <string>AR PL New Sung</string>
   <string>WenQuanYi Bitmap Song</string>
   <string>AR PL UKai CN</string>
   <string>AR PL ZenKai Uni</string>
  </edit>
 </match> 
 <match target="pattern">
  <test qual="any" name="family">
   <string>sans-serif</string>
  </test>
  <edit name="family" mode="prepend" binding="strong">
   <string>DejaVu Sans</string>
   <string>Bitstream Vera Sans</string>
   <string>WenQuanYi Micro Hei</string>
   <string>WenQuanYi Zen Hei</string>
   <string>Droid Sans Fallback</string>
   <string>HYSong</string>
   <string>AR PL UMing CN</string>
   <string>AR PL UMing HK</string>
   <string>AR PL ShanHeiSun Uni</string>
   <string>AR PL New Sung</string>
   <string>AR PL UKai CN</string>
   <string>AR PL ZenKai Uni</string>
  </edit>
 </match> 
 <match target="pattern">
  <test qual="any" name="family">
   <string>monospace</string>
  </test>
  <edit name="family" mode="prepend" binding="strong">
   <string>DejaVu Sans Mono</string>
   <string>Bitstream Vera Sans Mono</string>
   <string>WenQuanYi Micro Hei Mono</string>
   <string>WenQuanYi Zen Hei Mono</string>
   <string>Droid Sans Fallback</string>
   <string>HYSong</string>
   <string>AR PL UMing CN</string>
   <string>AR PL UMing HK</string>
   <string>AR PL ShanHeiSun Uni</string>
   <string>AR PL New Sung</string>
   <string>AR PL UKai CN</string>
   <string>AR PL ZenKai Uni</string>
  </edit>
 </match> 

</fontconfig>