.Xdefaults 파일을 조작해서 xterm 에서 meta 키 사용하기

Computing 2008. 7. 11. 14:36
ubuntu 를 쓰면서 한가지 아쉬운 것이 있다면 apple terminal 같은 터미널 프로그램이 마음에 들지 않는다는 것이다. 특히나 기본 터미널인 gnome-terminal 은 그 느리기 그지없는 속도와 쓸데없는 기능들, 그리고, 마음에 드는 폰트가 없다는 사실 때문에 특히나 더 쓰기 싫어서 그나마 좀 나은 xterm 을 (!!!) 사용하고 있다.

사용자 삽입 이미지

그런데, xterm 을 쓰면서 한가지 아쉬운 것이 바로 meta 키가 애매하게 먹는다는 것이다.
<meta><BS> 를 눌러서 단어 단위로 삭제를 하는 것이 동작하지 않는다.
그러나, man xterm 을 해 보자. 아래와 같은 내용이 나온다 :

metaSendsEscape (class MetaSendsEscape)
        If ``true'', Meta characters (a  character  combined  with  the
        Meta  modifier key) are converted into a two-character sequence
        with the character itself preceded by  ESC.   This  applies  as
        well  to function key control sequences, unless xterm sees that
        Meta is used in your  key  translations.   If  ``false'',  Meta
        characters input from the keyboard are handled according to the
        eightBitInput resource.  The default is ``false.''

대략 감이 잡힌다. 이 리소스를 true 로 세팅하면 될지도 모른다는 생각이 든다.
manpage 를 위로 스크롤해 보면, 이 속성이 vt100 widget 에 속한다는 것을 확인할 수 있다.

그럼 이제, 홈 디렉토리의 .Xdefaults 파일에 XTerm.vt100.metaSendsEscape: true 라는 라인을 추가하도록 하자 :



이제 xterm 을 실행시켜서 meta-BS 를 눌러 보자. 아주 쾌적하게 동작한다.

: