How to read and write Chinese on Slackware

Here are the instructions for using SCIM on Slackware.

  • Install the following packages:
    • scim
    • scim-pinyin
    • skim (scim frontend for KDE)
  • Insert the following lines in ~/.profile:

export XMODIFIERS=@im=SCIM
export LC_CTYPE=”zh_CN.UTF-8″
export GTK_IM_MODULE=scim

In order to use the Chinese characters, you need to install the Chinese fonts:

Send bytes to serial port

In order to send bytes to the serial port, in Linux use the following commands.

To check the current serial port configuration:

# stty -F /dev/ttyS0 -a

To set the serial port to 9600,8,N,1:

# stty -F /dev/ttyS0 9600 -parenb cs8 -cstopb -crtscts

To send a byte (ex. 0x20 = 20 hexadecimal):

$ printf \x20 > /dev/ttyS0