Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Something weird sometimes happens on my Debian system. Typically at the prompt line I can use combo like alt-d to delete a word, alt-f to go to the next word, etc.

But quite regularly something happens in my xterm that makes alt-d and alt-f not work anymore: suddenly they print 'ä' (alt-d) and 'æ' (alt-f).

Note that this happens in a terminal that was acting like I wanted to at first. But then somehow must send a code or something that changes the behavior of the terminal.

It happens in xterm because that's where I always work. If I go to a console by doing ctrl+alt+f1 then by default alt-d does what I want (delete word) and so does alt-f. Maybe that I could screw that one too by doing some bad manipulation: I just don't know because I don't work in text mode.

Also note that if I spawn an xterm from the "broken" xterm, then the new xterm work as I expect.

What is going on? What am I turning on that was off previously?

My .Xresources says that and, once again, when I open an xterm it behaves as I expect it, it's only later on that "something" makes that it goes back to broken "I-print-characters-with-diacritics-and-other-nonsense" mode:

$ more .Xresources 
XTerm.vt100.eightBitInput: false
XTerm*eightBitInput: False
share|improve this question
up vote 7 down vote accepted

you need

xterm*metaSendsEscape:  true

in your ~/.Xdefaults

xrdb ~/.Xdefaults

Start a new xterm, hopefully that shouldn't have the problem anymore

share|improve this answer
    
@freethinkey: when I start a new xterm there's never any issue: but it drives me crazy when my current xterm does it. But how comes at first it works, then someone the xterm interprets a meta as not an escape anymore even though 5 seconds before that same xterm interpreted it as an escape? (+1 btw) – Weezy May 18 '11 at 19:35
    
well not sure whats resetting the settings, you can do a ctrl+leftclick and see if "Meta Sends Escape" is ticked or not, if it happens again – freethinker May 19 '11 at 1:51
2  
Worked for me. xterm now black on white instead of white in black as it was before. – SabreWolfy Oct 14 '12 at 22:36

add this:

% grep -i escape .Xdefaults 
     xterm*metaSendsEscape: true

(so, tell xterm that your alt key is sending escape)

share|improve this answer
    
+1 too, same comment as for freethinker: how comes at first it works, then someone the xterm interprets a meta as not an escape anymore even though 5 seconds before that same xterm interpreted it as an escape? – Weezy May 18 '11 at 19:36
    
well, you can change things on-the-fly, may that be by accident or whatever: if alt stops working, check your xterm by pressing strg leftmouse and see if the option is ticked (just like @freethinker said). then investigate, if yout pressed some keys before the change happened – akira May 19 '11 at 5:55
1  
german are we? strg? Surely that must be ctrl!? :) – Weezy May 19 '11 at 15:22
    
well, brainiac, it states 'germany' at my profile quite clearly, so ... trivial to spot, even without whats printed on the keyboard. – akira May 19 '11 at 16:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .