Korean 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 Korean 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 Korean Solaris Software

To explicitly configure the STREAMS module for EUC (Completion code) terminal type:


system% setterm -x EUC

For some more examples, consider using a Packed (Combination) code terminal, which uses either the Packed or Johap module.

To explicitly initialize the Packed STREAMS module, which supports a Combination code of KS C 5601-1987:


system% setterm -x PACK

To explicitly initialize the Johap STREAMS module, which supports a Combination code of KS C 5601-1992:


system% setterm -x JOHAP

This usage is independent of terminfo.

Further consider using a FAST-15 Packed code terminal on a system with an entry like the following (which is appropriate for such a terminal) in the terminfo database:


fast-15 | fast-pack | korean terminal packed mode,
devt=PACK,
use=vt100-w,

A configuring command that references this entry would be:


system% setterm -t fast-15

For setterm to work properly in this application, /usr/share/lib/setterm/ko/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:


#
KoreanPACK|PACKthrow \
							popto zs|mcp|mti|ptem \
							push kpack \
							push ldterm \
							push ttcompat \
							run {stty defeucw} \
							catch
#
KoreanJOHAP|JOHAP	throw \
							popto zs|mcp|mti|ptem \
							push kjohap \
							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.

Configuring STREAMS for the ko.UTF-8 Locale

To explicitly configure the STREAMS module for the ko.UTF-8 locale:


system% setterm -x u8

To explicitly initialize the STREAMS module for an EUC terminal to use the ko.UTF-8 locale:


system% setterm -x ku8euc

To explicitly initialize the Johap STREAMS module, which supports a Combination code of KS C 5601-1992 terminal, to use the ko.UTF-8 locale:


system% setterm -x ku8johap
system% stty defeucw cs8 -istrip

For setterm to work properly in this application, /usr/share/lib/setterm/ko.UTF-8/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


# Korean specific entries:
#
# Completion/Wansung/EUC code terminal support (KS C 5601-1992)
KoreanU8EUC|KU8EUCthrow			\
			popto zs|mcp|mti|ptem   \
			push ku8euc		\
			push eucu8		\
			push ldterm		\
			push ttcompat		\
			push u8euc		\
			run {stty defeucw}	\
			catch
#
# Combination code terminal support (KS C 5601-1992 Annex 3)
KoreanU8JOHAP|KU8JOHAPthrow			\
			popto zs|mcp|mti|ptem   \
			push ku8johap		\
			push eucu8		\
			push ldterm		\
			push ttcompat		\
			push u8euc		\
			run {stty defeucw}	\
			catch
#

For more information, refer to the setterm(1) man page.