Linuxdoc Sgml/Xterm-Title
<!doctype linuxdoc system>
<article>
<title>xterm-title mini howto
<author><url url="mailto:winni@xpilot.org" name="winni@xpilot.org">
<date>version 1.3 1996³â 10¿ù 22ÀÏ
<trans>¹ø¿ª: ÃÖÁ¾È¯ <url url="mailto:saxboy@saxboy.pe.kr" name="saxboy@saxboy.pe.kr">
<abstract>
´ÙÀ½Àº xterm-title mini howto¸¦ ¹ø¿ªÇÑ °ÍÀÔ´Ï´Ù.
¹ø¿ªÇÏ¸é¼ ¿ì¸®¸»·Î ¿Å°Ü¼ ¾î»öÇÒ °Í °°Àº ºÎºÐÀº ±×³É ¿µ¾î·Î ½è½À´Ï´Ù.
±×¸®°í ¹ø¿ªÀº ÀÇ¿ªÀ» À§ÁÖ·Î ÇÏ¿´°í ÀúÀÚÀÇ Àǵµ¿Í ¾î±ß³ªÁö ¾Ê´Â ¹üÀ§¿¡¼
¾à°£ÀÇ ¸»À» ¹Ù²Û °÷µµ ÀÖ½À´Ï´Ù.
Âü°í·Î ÀúÀÚ°¡ Çʸ®ÇÉÀÎ Àεí Çѵ¥, À̸§¿¡ Ư¼ö ¹®ÀÚ°¡ Àִµí..ÇØ¼
±ÛÀÚ°¡ ±úÁø °ü°è·Î E-mail address¸¸À» Ç¥±âÇß½À´Ï´Ù.
</abstract>
<toc>
<sect> ¼Ò°³
<p>
"±ÍÂúÁö ¾Ê¾Æ¿ä?" ¶ó°í ´ëºÎºÐ ¹°¾îº¾´Ï´Ù. Àü
xterm -T "¾²°í ½ÍÀº¸»" \
-n "¾ÆÀÌÄÜ À̸§µµ ¹Ù²Ü¼ö ÀÖ³×.." &
¶ó°í ½á¼ xterm ŸÀÌÆ²¹Ù¿¡ ¾²°í ½ÍÀº ¸»À» ¾¹´Ï´Ù. ±×·¸°Ô ÇÏ¸é µÇ°ÚÁö¸¸,
xtermÀ» ¶ç¿ì°í ³ª¼ ŸÀÌÆ² ¹Ù¸¦ ¹Ù²Ù°í ½ÍÀ¸¸é ¾î¶±ÇÏÁÒ?
xtermÀÌ ¶°ÀÖÀ»¶§ ŸÀÌÆ²À» ¹Ù²Ù°í ½ÍÀ¸¸é Ư¼ö¹®ÀÚ¿À» º¸³»ÁÖ¸é µË´Ï´Ù.
ÀÌ·± Ư¼öÇÑ ¹®ÀÚ¿À» "escape sequence"¶ó°í ºÎ¸£°í, µ¿ÀÛÀº ÇÏÁö¸¸ ȸ鿡´Â
³ª¿ÀÁö ¾Ê´Â °ÍÀÌ º¸ÅëÀÌÁÒ. ¿¹¸¦ µé¾î¼ <ctrl-v><Esc><c><Enter>¸¦ ´©¸£¸é
xtermÀ» ¸®¼Â½Ãų¼ö ÀÖ½À´Ï´Ù. (ȸéÀ» Áö¿ì´Â °Í ¸»ÀÔ´Ï´Ù. ) À̶§ <ctrl-v>´Â
bash°¡ <esc><c>¸¦ ¾Ë¾Æ¸Ô°Ô ÇÏ·Á°í ¾²´Â °Ì´Ï´Ù.
Àú´Â Ű ¿©·¯°³¸¦ ´©¸£´Â °ÍÀ» <>·Î ±¸ºÐÇϴϱî ÁÖÀÇÇϼ¼¿ä.
±×·¯¸é, xtermÀÇ Å¸ÀÌÆ²¹Ù¿Í ¾ÆÀÌÄÜ À̸§À» ¹Ù²Ù·Á¸é (xtermÀÌ ¶° ÀÖÀ»¶§) ´ÙÀ½
escape-sequence¸¦ ÁÖ¼¼¿ä.
<esc> <]> <2> <;> ŸÀÌÆ² ¹Ù À̸§À» ¹Ù²Ü¶§
<esc> <]> <1> <;> ¾ÆÀÌÄÜ À̸§À» ¹Ù²Ü¶§
ÀÌ ¹®ÀÚ¿À» xtermÀÌ ¾Ë¾Æ¸Ô°Ô ¸¸µé·Á¸é Ä¿¸Çµå¶óÀο¡¼ Ä¡Áö ¸»°í,
'echo'ÇÁ·Î±×·¥À» »ç¿ëÇϼ¼¿ä.
<verb>
echo -e "\033]2; ¾²°í ½ÍÀº ¸». \007"
</verb>
ÀÌ¹Ì ¿¹»óÇß°ÚÁö¸¸ \033Àº esc¸¦ 8Áø¼ö·Î ¾´ °ÍÀ̰í '-e'´Â echo°¡ ÀÌ·±
½ÄÀ¸·Î ½áµµ ¾Ë¾Æµè°Ô ¸¸µé¾î ÁÖ´Â ¿É¼ÇÀÔ´Ï´Ù.
¹®ÀÚ¿À» ´Ù ½èÀ¸¸é "ÀÌ»Ú°Ô »à»à°Å¸®´Â" <ctrl-g>·Î ³¡³»¾ß ÇÕ´Ï´Ù.
À§¿¡¼ º» °ÍÀ» ½á¸Ô±â ÁÁÀº °÷ÀÌ Àִµ¥ ¹Ù·Î Ä¿¸ÇµåÇÁ·ÒÇÁÆ®¸¦ xtermŸÀÌÆ²¿¡
¾²´Â°Ì´Ï´Ù. ? Ä¿¸ÇµåÇÁ·ÒÇÁÆ®¸¦ ÀÌ·¸°Ô ¾´´Ù°í »ý°¢ÇغÁ¿ä.
<verb>
export PS1='\u@\h:\w> '
</verb>
±×·¯¸é Ä¿¸Çµå ÇÁ·ÒÇÁÆ®°¡ ÀÌ·¸°Ô º¸À̰ÚÁÒ.
<verb>
winni@FeilSurf:~/mail>
</verb>
À̶§ µð·ºÅ丮¸¦ "/somewhere/else"·Î ¿Å±â¸é ¾î¶»°Ô µÉ±î¿ä? ±×·¸ÁÒ, ÇÁ·ÒÇÁÆ®°¡
±æ¾îÁ®¼ ŸÀÌÇÎÇÒ ÀÚ¸®°¡ ÁÙ¾îµé°ÚÁÒ. ÀÌ·¸°Ô ¸»ÀÔ´Ï´Ù.
<verb>
winni@FeilSurf:/somewhere/else
</verb>
Á» ÀÌ»óÇÏÁö¸¸ ŸÀÌÆ² ¹Ù¿¡´Ù°¡ ÀÌ·¸°Ô ¾²°í ½Í´Ù¸é...
<verb>
export PS1='\033]2; \u@\h:\2 \007bash> '
</verb>
±×·¯¸é escape-sequence´Â xtermÀ¸·Î µé¾î°¡°í ÇÁ·ÒÇÁÆ®¿¡´Â À̰͸¸ ³²½À´Ï´Ù.
<verb>
bash> _
</verb>
À¯°¨½º·´Áö¸¸ PS1Àº 60ÀÚÁ¤µµ±îÁö¸¸ ¾µ ¼ö ÀÖ°í, ±×·¡¼ ¾Æ¹«¶§³ª À§¿¡ ÀÖ´Â °Íó·³
ÇÏ¸é µÇ´Â °Í ¾Æ´Õ´Ï´Ù.
'cd'°°Àº ½© ³»ºÎ ¸í·É¾î¸¦ ¹Ù²ã¼ À§¿Í °°ÀÌ ÇÒ ¼öµµ ÀÖÁö¸¸, ±×·¯¸é ½ºÅ©¸³Æ®¸¦
µ¹¸±¶§ ŸÀÌÆ²¹Ù°¡ ¾ÆÁÖ ÀÌ»óÇÏ°Ô µÇ¾î ¹ö¸®ÁÒ. (cdÇÒ ¶§ ¸¶´Ù ŸÀÌÆ²¹Ù°¡
¹Ù²î´Ï±î ¸»ÀÌÁÒ. ) (¿ªÁÖ: alias cd '\033]2; .... ' <- ÀÌ·± ½ÄÀ¸·Î ¾²¸é )
Á¦ÀÏ ÁÁÀº ¹æ¹ýÀº ȯ°æº¯¼ö "PROMPT_COMMAND"¸¦ ¹Ù²Ù´Â ¹æ¹ýÀÔ´Ï´Ù. ÀÌ º¯¼ö¿¡ ÀÖ´Â
³»¿ëÀº ÇÁ·Î±×·¥ÀÌ ½ÇÇàµÇ°í, bash°¡ ÇÁ·ÒÇÁÆ®¸¦ ´Ù½Ã Âï±âÀü¿¡ ġȯµË´Ï´Ù.
´ÙÀ½°ú °°ÀÌ ÇÏ¸é ³×Æ®¿÷À» ¾µ¼ö ÀÖ´Â °÷¿¡¼ xtermÀ» ¸¹ÀÌ ¿¾îµÎ¾úÀ»¶§ À¯¿ëÇϰÔ
¾µ¼ö ÀÖ½À´Ï´Ù.
<verb>
export PROMPT_COMMAND='echo -ne "\033]2;$LOGNAME$HOST Dir: $PWD\007\033]1;$LOGNAME@$HOST\007"'
</verb>
ƯÈ÷ À©µµ¿ì¸Å´ÏÀú¿¡¼ "window list"¿¡¼µµ Á¦´ë·Î º¸ÀÔ´Ï´Ù.
¿Ïº®À» ±âÇØ¼ xterm¾È¿¡ ÀÖÀ»¶§¸¸ À̺¯¼ö°¡ ¼ÂÆÃµÇµµ·Ï ÇÏ¸é µË´Ï´Ù.
<verb>
if [ "$TERM" = "xterm" -o "$TERM" = "xterm-color" -o \
"$TERM" = "rxvt" -o "$TERM" = "vs100" ]
then
PS1='bash> '
PS2='bash>> '
PS1='bash>>> '
export PROMPT_COMMAND='echo -ne "\033]2;$LOGNAME$HOST Dir: $PWD\007\033]1;$LOGNAME@$HOST\007"'
fi
</verb>
"bash>"¸¦ ÇÁ·ÒÇÁÆ®¿¡ ½áÁÖ´Â °ÍÀº Ä¿¸Çµå¶óÀÎÀÌ ¾ÈÁ¤ÀûÀ̵µ·Ï µµ¿ÍÁÝ´Ï´Ù.
gnuplotÀ̳ª ncftp, gap, kash°°Àº ÇÁ·Î±×·¥µéÀº ÀÚ±â À̸§À» ¾²´Â °æ¿ì°¡ ¸¹±â
¶§¹®ÀÔ´Ï´Ù. ÀÌ·¸°Ô±îÁö ÇØµµ ytalk°°ÀÌ ¼ºê½©À» ºÎ¸£´Â ÇÁ·Î±×·¥¿¡¼´Â
¶Ç ¾û¸ÁÀÌ µÇÁÒ. ±×·¯¸é..
<verb>
unset PROMPT_COMMAND
</verb>
¸¦ ÇØ ÁÖ¼¼¿ä.
linux Áñ°Ì°Ô ¾²¼¼¿ä
-<url url="mailto:winni@xpilot.org" name="winni@xpilot.org">
CREDITS:
Ville Voutilainen <url url="mailto:vvoutila@raita.oulu.fi" name="vvoutila@raita.oulu.fi">
Noticed the ;s are missing from the escape-sequence in the "first half"
of the document.
PS:
´Ù¸¥ ÇÁ·Î±×·¥µé¿¡¼ °ð¹Ù·Î "escape-sequences"¸¦ ¾²Áö ¸¶¼¼¿ä. (¿ªÁÖ:
Ä¿¸Çµå¶óÀο¡¼ ±×³É ¾´´Ù°Å³ª ÇÏ´Â ½ÄÀ¸·Î...) ÇÁ·Î±×·¥ÀÌ È¯°æº¯¼ö '$TERM"¿¡¼
¹Þµµ·Ï ±×³É µÎ¼¼¿ä. ÀÚ¼¼ÇÑ »çÇ×Àº tput(1)À» º¸¸é µË´Ï´Ù. ( man 1 tput À̶ó°í
ÇÏ¸é µË´Ï´Ù. )
PS2:
xterms¿¡¼ ¾²´Â escape-sequenceµéÀ» ¾Ë°í ½ÍÀ¸¸é rxvt¼Ò½ºÄڵ带 º¸¼¼¿ä.
"doc/"µð·ºÅ丮 ¾È¿¡ "xterm.seq"¶ó´Â ÈÀÏÀÌ ÀÖ½À´Ï´Ù.
</p>
</article>
|
You will meet an important person who will help you advance professionally. |











