Xref: utzoo comp.windows.x:35811 comp.unix.ultrix:7017 gnu.emacs.help:1863 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!bu.edu!m2c!risky.ecs.umass.edu!breck From: breck@ganzer.ecs.umass.edu (Liam Breck) Newsgroups: comp.windows.x,comp.unix.ultrix,gnu.emacs.help Subject: trouble with R4 xterm, Emacs, Ultrix: Solutions! Message-ID: <1991Apr27.145631.2778@risky.ecs.umass.edu> Date: 27 Apr 91 14:56:31 GMT Sender: breck@risky.ecs.umass.edu (Liam Breck) Organization: University of Massachusetts, Amherst Lines: 63 A while back I wrote to comp.windows.x: > ... the R4 xterm has menus which I can barely see and meta- > just dumps into Emacs. Help... Here is the info from the replies I got. Special thanx to Jaap Vermeulen and Liam Quin for their extra help. Fixing menus: The menus now use geometry and other resources loaded from the .Xdefaults file. I changed/added the following entries in that file: xterm*VT100.geometry: your_favorite ! won't affect menus xterm*VT100.borderWidth: # ! won't affect menus xterm*SimpleMenu.borderColor: a_nice_color ! only affects menus Fixing meta- passing: Basically all you have to do is add xmodmap -e "keysym xxx = Meta_L" to the beginning of your .xsession or .xinitrc file, where xxx is the keysym name of your meta key. xev is handy for finding this name (Alt_L in my case). R4 Xtoolkit evidently looks for a Meta_L/R modifier by default. Then it's up to your applications to set the terminal for eight bit input. Of course, you can do it yourself: stty pass8 # in the BSD world. stty cs8 -istrip # in the SysV world (may need other args) When Ultrix or rlogin is between you and your meta-seeking application (such as GNU Emacs) it's a bit more complicated. I start an xterm on Ultrix, rlogin to a SunOS node and run Emacs there. Ultrix rlogin strips the eigth bit by default, so it needs to be started with the `-8' option to pass meta-. SunOS rlogin seems to pass the eighth bit without `-8', although the SunOS rlogin man page doesn't say why. To get meta- when running Emacs on Ultrix in xterm (either local or remote) the terminal input mode must be changed from within Emacs: (if (string= (getenv "TERM") "xterm") (set-input-mode t nil)) in one's .emacs file. I believe (my knowledge is fuzzy here) that Emacs' default is to ask the OS for eight bits (it does this with SunOS) but I think Ultrix doesn't understand. A bug? Using the above command says: "Hey Ultrix! Yeah, you! Eight bit input NOW, dammit!" and Ultrix complies. (Further info about this bug/feature would be appreciated...) Finally, if none of the above solutions work, one can always try: xterm*VT100.Translations: #override Alt: string("0x1B") insert() in .Xdefaults. This is a kludge that makes meta- generate the escape sequence . I was also reminded that if you're serious about Emacs you needn't bother with xterm. GNU Emacs has X support so it can run in its own X window. In my case I *do* use emacs for X, and also occasionally want Emacs in an xterm. Comments, additions and corrections to this post welcome! -- Liam Breck breck@umvlsi.ecs.umass.edu