Traditional Chinese Solaris System Administrator's Guide

TTY Setup Examples

The system administrator can add setterm in the startup script in /etc/rcn.d directory (where n is the run level), to run at the system boot time. Also, users can run the setterm command at login to configure the stream for their terminal, including the appropriate modules for Traditional Chinese input code conversion. The following examples using setterm work as commands typed at a system prompt or included in system files such as .cshrc, .login, and the startup script. Such commands can either explicitly set the device type or use the terminfo database.

Configuring STREAMS for Traditional Chinese Solaris Software

To explicitly configure the STREAMS module for a Big5 terminal use:


setterm -x big5

This usage is independent of terminfo.

Further consider using a VT-100 terminal (which is Big5 compatible) on a system with an entry like the following (which is appropriate for such a terminal) in the terminfo database:


vt100-b|VT-100-compatible with Big-5 chars,
lines#40, .csin=E(BE)IE[?1h, csin=E(BE)I, devt=PACKBig5,
s0ds=E(H, s1ds=E$@, s2ds=E(H, use=cit600,

A configuring command that references this entry would be:


setterm -t vt100-b

For setterm to work properly in this application, /usr/share/lib/setterm/zh_TW/conf.file must contain an entry that corresponds to the device type. This entry gives setterm instructions for placing appropriate conversion modules in the TTY stream; for example:


#
big5throw \
			popto zs|mcp|mti|ptem \
			push big5euc \
			push ldterm \
			push ttcompat \
			run {stty defeucw} \
			catch
#
GenericEUC|EUCthrow \
			popto zs|mcp|mti|ptem \
			push ldterm \
			push ttcompat \
			run {stty defeucw} \
			catch
#
ASCIIthrow \
			popto zs|mcp|mti|ptem \
			push ldterm \
			push ttcompat \
			catch
# 

For more information, refer to the setterm(1) man page. Once configured, conversion is enabled by default. Applications can also set features through ioctl() function calls.