Sometimes when I create a Linux box, when I start a shell and use the "Alt-." functionality (a BASH builtin, use "bind -p" to list all of them), I get a little (R) symbol instead of the final argument of the previous command.
Lately, this happened again when I installed a Debian box. So here is a list of random facts that hopefully will jog me into solving the problem:
- When I installed FC3 on my main workstation, I had this problem.
- When I installed Mandrake 10.2b1 on my main workstation, I did not have the problem.
- When I installed FC4 on my main workstation, I did not have the problem.
- When I installed Debian on my laptop, I have the problem.
- GNOME Terminal does not have the problem, xterm does.
- I cannot find any GNOME keyboard settings dialogue that has any effect on the problem.
- I am not sure what X settings to check that might affect this problem.
Now some random facts about the problem on my Debian laptop:
- When I start a text terminal, I do not have the problem.
- When I become root ("sudo bash"), I do not have the problem.
- When I become root ("sudo bash") then any normal user again ("su - anynormaluser") the problem returns.
Initial looks at environment variables, .profile, /etc/profile, /etc/bash.bashrc, etc don't reveal anything that would make this happen, which is okay, since I suspect it's an X thing.
RAWK! SethK is Da Man! He figured it out. This fixed my problem. Put this into ~/.Xdefaults (or however you want to set your Xterm defaults):
XTerm*VT100.Translations: #override \
Meta <KeyPress> period: string(0x1B) string(0x2E) \n
Note: The space before the "Meta" on the second line may need to be a literal tab character. If you don't want to restart X, do this:
xrdb -merge ~/.Xdefaults
SethK says this is probably more-generally solved by doing this:
XTerm.metaSendsEscape: true
Although that might not work. He couldn't get it to work with a short couple tries:
(12:42:31) sethk_: bah, that doesn't work
(12:42:39) sethk_: heh, I did xrdb -all -remove
(12:43:45) sethk_: thought I had it. oh well, it must be being overridden by a translation
(12:44:25) sethk_: well, I give up on that, but if you need other
Alt+ mappings, you can use a similar pattern with the ASCII codes