\documentclass[letterpaper]{article}
\nonstopmode
\akai
\usepackage{linuxdoc-sgml}
\usepackage{qwertz}
\usepackage{url}
\usepackage[latin1]{inputenc}
\usepackage{t1enc}
\usepackage[english]{babel}
\usepackage{epsfig}
\usepackage{null}
\def\addbibtoc{
\addcontentsline{toc}{section}{\numberline{\mbox{}}\relax\bibname}
}%end-preamble
\setcounter{page}{1}
\title{°{¥úÄµ§i mini-Howto}
\author{Alessandro Rubini, {\ttfamily rubini@linux.it}}
\date{v2.2, 11¤Q¤@¤ë 1997}
\abstract{¤å¥ó¸ÑÄÀ¦b¤@­Ó¨t²Î¤W¦p¦ó¨Ï¥Î termcap ³]©w¤@­Ó°{¥úÄµ§i©M´y­z¦p¦ó¨Ì»Ý¨D¨Ï³â¥zÁnµL®Ä.}


\begin{document}
\maketitle
\tableofcontents

\section{¤¶²Ð}

¨C·í¤@­Ó BEL ¦r¤¸(ASCII ¥N½X 7)¿é¥X®É Linux console µo¥X³â¥zÁn
.ÁöµM¹w³]¦æ¬°¬O¤@­Ó¥¿½Tªº¿ï¾Ü
,³\¦h¥Î¤á¤£³ßÅw¥L­Ìªº¹q¸£µo¥Xµo¥X¹Í¹ÍÁn.³o¥÷
mini-Howto ·N¸q¥Î¨Ó¸ÑÄÀ¦p¦ó§i¶DÀ³¥Îµ{¦¡»¡¤£­n²£¥Í
BEL ¥N½X.¥¦¤]¸ÑÄÀ¦p¦ó±Ð¾É®Ö¤ß©M X
µøµ¡¨t²Î·í¤@­Ó BEL ²£¥Í®ÉÁ×§Kµo¥X¹Í¹ÍÁn.ª`·N¤å¥ó¤j³¡¤À
½Í¤Î¤å¦r console ,·í³]©w X ¦øªA¾¹
¬O®e©öªº catch-all °w¹ï¦b¤@­Ó¹Ï§ÎªºÀô¹Ò¤u§@ªº¥ô¦ó¨Ï¥ÎªÌ.

­±¹ï¤@­Ó·R¬D­çªº¹q¸£¥H§Úªº·N¨£³Ì¦nªº¤èªk¬O­×¥¿
µwÅé,§Ú¦Û¤vªº¹q¸£¬Æ¦Ü¨S¦³°t¸m¤@­ÓÂX­µ¾¹.




\section{Spekearectomy}

Speakerectomy °w¹ï³â¥zÁnªº°ÝÃD
³Ìª½±µªº¸Ñ¨M¤èªk´N¬O§â³â¥z®³(©Þ)±¼, ³o¼Ë´NÅ¥¤£¨ì³â¥zªºÁn­µ¤F.
.³o­Ó¹B§@¬Oª½±µªº©M§A
¬Æ¦Ü¤£»Ý­n¥ô¦ó¨ä¥Lªº°µªk,¦pªG§A­nªº¸Ü¥¦¤´¦³§ï¶iªºªÅ¶¡.

PC ¬O³q±`¸Ë³Æ¤@­Ó²Â©åªº¤Á´«¸û§Cªº CPU ®É¯ßªº¶}Ãö.
·í§A¦b¤@­Ó¦h¤uÀô¹Ò¤¤¤u§@®É³o¶}Ãö¬O±q¥¼¨Ï¥Î,·í
§A¬Æ¦Ü¤£»Ý­n§â¹q¸£ºC¤U¨Ó°õ¦æ¹CÀ¸°òÂ¦¦b
³nÅé loops ¤W.¤£©¯ªº¬O§Ú­Ì¤£¯à¨Ï¥Î¤Á´«¼W¥[
³B²z¾¹³t«×,¦ý¬O§Ú­Ì¥i¥H¨Ï¥Î¥¦¨ÏÂX­µ¾¹ ±Ò°Ê/µL®Ä
.¦³®ÉÂX­µ¾¹¬O¦³¥Îªº°²¨Ï§A¨É¨ü¤@­Ó
silent number cruncher cruncher,¨Ò¦p«H¸¹µ²§ôªº¤@­Ó lenghty
½s¿è.­×§ï¶}Ãö¥\¯à©Ê,¥u­n±q¥D­nªº¹q¸ôª©©M¥¦¨Ì§Ç³s±µÂX­µ¾¹ªº½u¤À¶}¨Ó
.

½¥¤W«¬¹q¸£ªº¾Ö¦³¤H,¤£©¯ªº¤£®e©öªº¨Ï¥Î
ÂX­µ¾¹,¥L­Ì¨ä¤¤¨S¦³¤@­Ó³Ñ¾lªº¤Á´«¶}Ãö¥hÂàÅÜ¦¨¥t¤@­Ó
¤£¦Pªº¤u§@.°w¹ï³o¼Ëªº¥Î¤á¸û¦nªº¸Ñ¨M¤è®×¬O³]©w
¥L­Ìªº³nÅéÁ×§Kµo¥X¹Í¹ÍÁn,¦p¥H¤Uªº´y­z.




\section{¨C¤@­Ó console µo¥X¹Í¹ÍÁn³]©w}

¦b Linux 1.3.43 ®É­Ô, Martin Mares ¥[¤J³]©wµo¥X¹Í¹ÍÁn
µ{«×©M«ùÄòªº¯à¤O,¾a­×§ï {\ttfamily  console.c}.¨C¤@­Ó
console ¥i¥H¬O³Q³]©w¯S¦â¤@­Ó¤£¦Pªº«ùÄò ©M/©ÎªÌ ³â¥zÁn­µªºµ{«×
;¥ô°È³Q§¹¦¨¾a¨Ï¥Î escape ¶¶§Ç¿é¥X
¨ì console ³]³Æ.§A¥i¥H³]©w§A¦Û¤vªº {\ttfamily \~{}/.profile}
©ÎªÌ {\ttfamily \~{}/.login}ÀÉ®×¿ï¾Ü¤@­Ó¤£¦Pªº¹ÍÁn³]©wÁp±µ¨ì
¦U console  (©ÎªÌ§¹¥þ¤@ÂI¤]¤£µo¥X¹Í¹ÍÁn,¦pªG»Ý­nªº¸Ü).

escape ¶¶§Ç¦p¥H¤U¹B§@:
\begin{itemize}
\item ESC-{\ttfamily [10;}xx{\ttfamily ]} ¿ï¾Ü³â¥zÁnÀW²v¥Î»®ªÛ.³o­Ó­È
À³¦b½d³ò 21-32766,§_«h³o­Ó­È¬O¨S¦³³Q©w¸q.
¦pªG `xx' °Ñ¼Æ­È¿ò¥¢¤F,¹w³]­È¬O (750»®¯÷) ±N·|¹B§@,
·í¦b `ESC-{\ttfamily [10]}.
\item ESC-{\ttfamily [11;}xx{\ttfamily ]} ¿ï¾Ü³â¥zÁn«ùÄò,¦b milli-seconds (²@¬í).
¦pªG§A«ü©w¶W¹L 2¬í,¹w³]¨Ï¥Î (125ms).µM«á¦A¤@¦¸
,¦pªG `xx' °Ñ¼Æ­È¿ò¥¢¤F (ESC-{\ttfamily [11]}) ¹w³]­È
±N·|³Q¨Ï¥Î.
\end{itemize}


¿ï¾Ü,¨Ò¦p,¤@­Ó 50Hz µ{«×¥i¥H«ùÄò¤@¬íÄÁ,§A¥i¥H¨Ï¥Î
"{\ttfamily echo -e "$\backslash$$\backslash$33[10;50]$\backslash$$\backslash$33[11;1000]"}" with {\ttfamily bash} (where "-e"
·N«ä¬O `¤F¸Ñ Escape ¶¶§Ç'.¦pªG§A¨Ï¥Î {\ttfamily tcsh} ¬Û¦Pªº
©R¥O«÷¼g¦p "{\ttfamily echo "$\backslash$$\backslash$033[10;50]$\backslash$$\backslash$033[11;1000]"}".

ºÉºÞ§Ú¤£ª¾¹D {\ttfamily setterm} ©R¥Oªº¥ô¦óª©¥»¦ý¥¦
¤ä«ù³o¼Ëªº³]©w,³o©R¥Oªº±N¨Óªºª©¥»¤]³\¦n¦n
¤ä«ù©R¥O¦æ¿ï¶µ¨Ó³]©w³â¥zÁnÁn­µ.

¦pªG§A°õ¦æ Linux-1.3.43 ©ÎªÌ¸û·sªº,§A¤]³\º¡·N escape
¶¶§Ç©MÁ×§K¾\Åª§ó¦hªº.¦pªG§A°õ¦æ¸ûÂÂªº®Ö¤ß,©ÎªÌ¦pªG
§A­n°{¥úÄµ§i,§A­n¾\Åª¤å¥ó¨ä¾lªº³¡¤À.




\section{°ò¥»·§©ÀÃö©ó Termcap ©M Terminfo}

ÀÉ®× {\ttfamily /etc/termcap}¬O¤@­Ó¤å¦rÀÉ®×¥¦¦C¥X
{\ttfamily term}inal {\ttfamily cap}abilities. ¼Æ­ÓÀ³¥Îµ{¦¡¨Ï¥Î
{\ttfamily termcap} ¸ê®Æ¦b¿Ã¹õ©P³ò²¾°Ê«ü¼Ð©M°µ
§Oªº¿Ã¹õ¾É¦Vªº¤u§@.  {\ttfamily tcsh}, {\ttfamily bash}, {\ttfamily vi} ¥H¤Î¨ä¥L
{\ttfamily curses}-°òÂ¦À³¥Îµ{¦¡¨Ï¥Î {\ttfamily termcap} ¸ê®Æ®w.

¸ê®Æ®w´y­z¼Æ­Ó²×ºÝ¾÷ªºÃþ«¬. 
{\ttfamily TERM} Àô¹ÒÅÜ¼Æ¦b¹B¦æ®É¿ï¾Ü¥¿½Tªº¦æ¬°
,¾a©R¦W¤@­Ó {\ttfamily termcap} Äæ¦ì¬O³Q
À³¥Îµ{¦¡©Ò¨Ï¥Î.

¦b¸ê®Æ®w¤º³¡,¨C¤@­Ó²×ºÝ¾÷ªº¯à¤OÅã¥Ü·í¤@­Ó
two-letter ¥N½X©M¤@­Ó¹ê»Úªº escape ¶¶§Çªºªí¥Ü
³Q¨Ï¥Î¨Ó¨ú±o·Q­nªº®ÄªG.¦b¤£¦Pªº¯à¤O¤§¶¡ªº¤À¹j²Å¦r¤¸
¬O¨Ï¥Î«_¸¹ (":").Á|¤@¹ê¨Ò,Å¥±o¨£ªº
³â¥zÁn,¥¦ªº¥N½X "bl",³q±`¥X²{·í "{\ttfamily bl=\^{}G}".¶¶§Ç
§i¶D¥¦³â¥zÁnÁn­µ¬OÀò±o¾a¦C¦L control-G
¦r¤¸, ASCII BEL .

°£ {\ttfamily bl} ¯à¤O¥~, {\ttfamily vb} ¯à¤O¬O³Q
­«·s²ÕÂ´.¥¦¬O³Q¨Ï¥Î¨Óªí²{ "°{¥úÄµ§i". {\ttfamily vb} 
³q±`¦b {\ttfamily termcap} ÀÉ®× {\ttfamily linux} ªºÄæ¦ì¦³¿ò¥¢.



¤j³¡¤Àªº²{¥NÀ³¥Îµ{¦¡©Mµ{¦¡®w¨Ï¥Î {\ttfamily terminfo} ¸ê®Æ®w
¥N´À {\ttfamily termcap}. ¸ê®Æ®w¤¤¨C¤@­Ó²×ºÝ¾÷«¬ºA¨Ï¥Î¤@­ÓÀÉ®×
©M¦ì©ó {\ttfamily /usr/lib/terminfo};Á×§K¨Ï¥Î·¥¤jªº
¥Ø¿ý,¨C¤@­Ó²×ºÝ¾÷ªºÃþ«¬ªº´y­z¬OÀx¦s¦b¥Ñ¥¦ªº­º¦r¥À¨M©wªº¤@­Ó
¥Ø¿ý¤¤; ¨º­Ó {\ttfamily linux} Äæ¦ì,
¦]¦¹,¬O {\ttfamily /usr/lib/terminfo/l/linux}.«Ø¥ß¤@­Ó
{\ttfamily terminfo} Äæ¦ì§A±N ``½sÄ¶'' {\ttfamily termcap} ´y­z;
½Í¤Î {\ttfamily tic} µ{¦¡©M¥¦ªº»¡©ú­¶.




\section{©w¸q¤@­Ó°{¥úÄµ§i}

§A¥i¥H¥[Äæ¦ì°w¹ï {\ttfamily vb} ¯à¤O¦b§Aªº¦Û¤vªº termcap
ÀÉ®×¤¤,¦pªG¨S¦³¤w¸g©w¸q¤@­Ó.  Dennis Henriksen
(duke@diku.dk) «ØÄ³´¡¤J¤U¦C¦U¦æ¦b
{\ttfamily termcap} Äæ¦ì¤¤°w¹ï {\ttfamily linux} (ª`·N¦bÂÂªº distributions ¤¤Äæ¦ì¬O¥s°µ
{\ttfamily console}  ):
\begin{tscreen}
\begin{verbatim}
:vb=\E7\E[?5h\E[?5l\E[?5h\E[?5l\E[?5h\E[?5l\E[?5h\E[?5l\E8:\
\end{verbatim}
\end{tscreen}

´M¸ñ backslash ¦b¸ê®Æ®w¬O³Q¨Ï¥Î°µ escape newline.
Dennis' ªº½X°µ¤U¦C¦U¶µ (¥L¦Û¤v»¡ªº):
\begin{itemize}
\item Àx¦s«ü¼Ð¦ì¸m (uust¤@­Ó¦w¥þÂÔ·V).
\item §ïÅÜ­I´ºÃC¦â¼Æ¦¸¦b¼Ð·Ç©M«D¼Ð·Ç¤§¶¡.
\item «ì½Æ«ü¼Ð¦ì¸m.
\end{itemize}





\section{¨Ï³â¥zÁn¦b¤W¤å¦r console ¥¢®Ä}

¦pªG§A±j¨î¨Ï°{¥úÄµ§i¦b§Aªº console ¤W§A¥i¥H¨Ï¥Î
"{\ttfamily bl}" ¦b {\ttfamily termcap} Äæ¦ì©M©w¸q¥¦¨Ï¥Î¬Û¦Pªº¦r¦ê
«ØÄ³°w¹ï¦b "{\ttfamily vb}" ¤§¤W.¾aªñ¬O«K§Qªº¦pªG§A¤£
­n¦Û¤w³]©w¨C¤@­ÓÀ³¥Îµ{¦¡ (¥¦¦p¥H¤Uªº´y­z,µL½×¦p¦ó).
§Ú¦b©Ò¦³¾÷¾¹¤W¨Ï¥Î³o¿ï¶µ¦b­þ¸Ì§Ú¥i¥H°õ¦æ Linux ©M§Ú
¤£¯à©î¶}³â¥z.




\section{§i¶DÀ³¥Îµ{¦¡Á×§Kµo¥X¹Í¹ÍÁn}

³o¬O¤@¤£§¹¥þªºÀ³¥Îµ{¦¡ªº²M³æ¥¦¥i¥H¬O³Q«ü¥Ü¥h
¨Ï¥Î {\ttfamily vb} Äæ¦ì°w¹ï·í«eªº²×ºÝ¾÷ªº§ÎºA (¨Ï¥Î¥ô¤@
{\ttfamily termcap} ¸ê®Æ©ÎªÌ {\ttfamily terminfo} ³o­Ó):

\begin{itemize}
\item  X ¦øªA¾¹:¨Ï¥Î "{\ttfamily xset b}"©R¥O¨Ó¿ï¾Ü
bell ªº¦æ¬°.³o­Ó«ü¥O¨ú¤T­Ó¼Æ­Èªº
°Ñ¼Æ:¤j¤p,µ{«×©M«ùÄò. "{\ttfamily xset -b}" ¨Ï
³â¥zÁn§¹¥þµL®Ä.³]©w X ¦øªA¾¹¼vÅT¦bÅã¥Ü¾¹¤W©Ò¦³°õ¦æªº
À³¥Îµ{¦¡.
\item {\ttfamily xterm}: xterm ¥i¥HÂà´«¦U³â¥zÁn¨ì¤@­Ó¬Ý±o¨£ªº©ÎªÌ
Å¥±o¨£ªº«H¸¹.¦pªG§A¨Ï¥Î³â¥zÁn,"{\ttfamily xset}" ªº³]©w
±N·|¹B§@.³â¥zÁn¦b {\ttfamily xterm} ¹w³]¬O
Å¥±o¨£ªº,¦ý¬O§A¥i¥H¨Ï¥Î "{\ttfamily -vb}" ©R¥O¦æ¿ï¶µ
©M "{\ttfamily xterm*visualBell: true}" ªº¿ìªkÂàÅÜ¥¦¦¨¤@­Ó
¬Ý±o¨£ªº°{¥ú.§A¥i¥H¬C¨c¬Ý±o¨£ªº/Å¥±o¨£ªº«H¸¹¦b
¹B¦æ®É¾a control--left-mouse-button ¥s¥X¿ï³æ
.¦pªG§A°õ¦æ X §A³Ì¦³¥i¯àªº
¤£»Ý­n¤U¦C¸ê®Æ.

\item {\ttfamily tcsh} (6.04 ©M¥H«áªº): "{\ttfamily set visiblebell}".
³o«ü¥Ü¥i¥H¬O¦w©ñªº¦b {\ttfamily .cshrc} ©ÎªÌ¥i¥H¬O¤¬°Ê¦¡ªº°õ¦æ
.­«³]³â¥zÁn¥u­n "{\ttfamily unset
visiblebell}".¨Ï¥ô¦ó³qª¾©R¥OµL®Ä,¨Ï¥Î "{\ttfamily set
nobeep}" ¨ú¥N.
\item {\ttfamily bash} (¥ô¦ó bash,¦p§Ú©Òª¾¹D):©ñ "{\ttfamily set bell-style
visible}" ¦b§Aªº {\ttfamily \~{}/.bashrc}¤¤.¥i¯àªº³â¥zÁn§ÎºA
¥i¥H¬O "¨S¦³"©ÎªÌ "¥iÅ¥±o¨£ªº".
\item {\ttfamily bash} (with {\ttfamily readline},¦p¦P¨ä¥Lªº {\ttfamily readline}
°ò©óÀ³¥Îµ{¦¡):©ñ "{\ttfamily set prefer-visible-bell}" ¦b
{\ttfamily \~{}/.inputrc}.
\item {\ttfamily nvi} ©M {\ttfamily elvis}: ©ñ "{\ttfamily set flash}" ¦b
{\ttfamily \~{}/.exrc}©ÎªÌ»¡ "{\ttfamily :set flash}" ¤¬°Ê¦¡ªº (ª`·N
¨º­Ó«_¸¹).¨Ï°{¥úÄµ§iµL®Ä¨Ï¥Î {\ttfamily noflash} ¦b
{\ttfamily flash} ªº¦a¤è.
\item {\ttfamily emacs}: ©ñ "{\ttfamily (setq visible-bell t)}"¦b§Aªº
{\ttfamily \~{}/.emacs}.¥¦¬O¾a "{\ttfamily (setq visible-bell
nil)}" ¨Ï¨ä¨S¦³®Ä¥Î.
\item {\ttfamily less}:¨Ï¥Î "{\ttfamily -q}"¦b©R¥O¦æ¤W¨Ï¥Î°{¥úÄµ§i,
¨Ï¥Î "{\ttfamily -Q}" ¨Ï¥ô¦ó³ø§iµL®Ä.¹w³]¿ï¶µ¥i¥H
©ñ¶i§AªºÀô¹ÒÅÜ¼Æ "{\ttfamily LESS}".
\item {\ttfamily screen}: °õ¦æ CtrlA-CtrlG ©R¥O.§ïÅÜ
©Ò¦³µêÀÀ¿Ã¹õªº¦æ¬°.¬Ý man page
¦b "CUSTOMIZATION" ¤§¤U°w¹ï¦w¸Ë¹w³]­È.
\end{itemize}





\section{°ÝÃDªº¶Â·tÃä}

Ãa®ø®§¬O¥¦¤£¬O¨C¤@­ÓÀ³¥Îµ{¦¡³£¨Ï¥Î {\ttfamily termcap} ©ÎªÌ
{\ttfamily terminfo}.¤j³¡¤À¤pªºµ{§Ç¯S¦â¦b C ­ì©l½X½X¤¤¨Ï¥Î 'backslash-a' (Äµ³ø)
¦r¤¸. "alarm" ½X¦b¦r¦ê¤¤ÅÜ¦¨¤@­Ó¦r­±¤Wªº
ASCII BEL ·íÀx¦s¦¨¤G¶i¦ìªº.¯uªº
À³¥Îµ{¦¡³q±`¤£·|±¼¤J³oºØÃþ,¦ý¬Oª`·N·s¾Ç C ªº¤H
¥L­Ìµ¹§A¥L­Ì¦Û¤vªºµ{¦¡.¬O©Ò¦³³ÌÃaªºªº¬O¹q¸£¬ì¾Çªº¾Ç¥Í
,¯uªº.

°ß¤@ªº¤èªk¨Ï³o¨Çµ{¦¡¨IÀqªºÀ³¥Îµ{¦¡¬O
spekearectomy,©ÎªÌ¨Ì Martin Mares ªº¤èªk¨Ï¥Î escape ¶¶§Ç.



\end{document}
