LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   xterm magic (https://www.linuxquestions.org/questions/linux-general-1/xterm-magic-22446/)

raven 06-03-2002 03:47 AM

xterm magic
 
hello

can anyone tell me how I can set the behaviour of Xterm? More precisely, I want that xterm reacts correctly to the HOME and END keys (currently xterm prints the escape codes instead of jumping to the beginning/end of line)

I know there is a resource called "enable application cursor keys", but I dont what the command line is to set this at the start of each Xterm window.

Or is ther another resource where I can tell Xterm to start with this option enabled?

thanks

raven

slakmagik 10-26-2003 12:13 PM

*bump*

*bump*

*bump*

Eterm's home key works, but not end. Priceless. And xterm and rxvt don't work either way. And when my $TERM is 'linux' on the console, they work, but when it's 'linux' in X. they don't. And I've surfed and I've search and I've manned stty and tput and tset and xmodmap and I don't know what all else. I do... not... understand... them.

And if anybody tells me to hit ctrl-a and ctrl-e...

slakmagik 10-28-2003 11:56 AM

Sorry. Bad day there. Still could use some instruction in the mysteries of terminal emulators, though. And apparently I'm not alone. :)

Bruce Hill 10-31-2003 10:25 PM

Quote:

Originally posted by digiot
Sorry. Bad day there. Still could use some instruction in the mysteries of terminal emulators, though. And apparently I'm not alone. :)
You are not alone! Most apparently.

I was searching for this very thing and came across this thread. My home and end key were working, and have stopped for some reason - in xterm. And I know how you feel about ctrl-a and ctrl-e...but to tell you the truth, I was glad to read that in your post...

:D

megaspaz 10-31-2003 10:52 PM

i feel you. my key bindings work, but i remember on solaris that it behaved like described above. my old man set it up to where it works. you could try looking at this to see at least the keybindings:

http://www.mit.edu/afs/athena/contri.../term/xterm.el

do the command:

locate xterm.el

to see where it's stored on your computer. i'm not sure this directly helps you except for looking at the key bindings of something that may work. ie. i'm not sure if this is a system wide thing, an xterm thing, or just an emacs thing. i've seen on google things like xmodmap too. i called my old man and he forgot. he told me about how long ago, you had to do this yourself and then someone came along with a configuration tool that asked you for your terminal type (vt100, vt220, etc..). and i've also seen on google to make sure you got your keyboard type right as this should (postulation) make the key bindings work across all X apps. don't really know, but good luck.

Bruce Hill 10-31-2003 10:57 PM

I think one of the packages that I recently updated to unstable caused this. I can look through my .bash history and probably find it. It worked fine yesterday, so it should be something I got with synaptic this morning that did it.

I read a little Googling, but right now I'm trying to get some modules setup so I'll have sound and 3D graphics with my ATI card, and get them installed, when I recompile and install the 2.4.22 kernel this afternoon.

slakmagik 11-03-2003 08:02 PM

Thanks for that megaspaz - I'm on the wrong computer right now, but I'll look into it. (First time I've used XP in months - my DSL connection went to hell for no reason and my ISP will only tell me what buttons to push in Windows with IE. *shudder* I've been offline for a few days and just got it back now - yet to switch the modem back to my Slack box.) The problem with those key descriptions is that there are at least four different ways of describing them and apparently 400 places or ways to put them. There's a kind of hex code or something from xev and those you mention and simple word descriptions and some other form I can't think of right now. And they may go in xmodmap or they may go in xedfaults or termcap/info directly or who knows where. I don't know if it's something weird in the X server or if my window manager is doing something weird, or if it's a per app thing. All the apps react differently and they all react differently whenever I try a fix. Why the hell there isn't a single key-code descriptor table and a single interface, I have no idea. I should have an /etc/keys file which configures the console and every X app as well. Then I could make 'exception' rules if, for whatever reason, I *didn't* want my home and end keys to work. And the fact that this is so complex (for *some* reason) and that I don't understand what it is, tells me that I don't understand anything at all. *sigh*

Yeah, those are sucky keys, Chinaman, but they beat no keys at all, huh? *g* An upgrade very well may have caused it. One of the first things to check, I guess, is to 'echo $TERM' and make sure it hasn't been reset to some other term. Has something to do with the termcap or terminfo or whatever private configs the term in question calls on to translate key events. Argh.

Bruce Hill 11-03-2003 08:22 PM

Quote:

Originally posted by digiot
Yeah, those are sucky keys, Chinaman, but they beat no keys at all, huh? *g* An upgrade very well may have caused it. One of the first things to check, I guess, is to 'echo $TERM' and make sure it hasn't been reset to some other term. Has something to do with the termcap or terminfo or whatever private configs the term in question calls on to translate key events. Argh.
Digiot,

I checked that and at least it's still correct. Still looking. It ticks me off that it worked,and then without me *choosing* it has stopped. I can't even find the link where I read the info that made me think it was an upgrade. It had something to do with a security bug that was fixed in a new package because of a vulnerability in xterm. That's not good details, but that's all I can remember at the moment. Will definitely post if I find a solution.

I'm trying to get modules built for ALSA and my printer - just compiled a new kernel for Debian, and maybe this time around I can get a good working system. At least it looks like all my hardware is detected - except for this onboard sound and my ATI Radeon 9000.

slakmagik 12-16-2003 11:11 AM

Another thread reminded me of this issue: I finally fixed the home and end keys on rxvt in Slack. Something's seriously screwed about it all - and it happened after I installed Eterm but, anyway - in /usr/doc/rxvt-xxx/etc or whatever, there's a termcap entry - I copied that into /etc/termcap since I don't remotely understand the syntax. For some bizarre reason, rxvt wants to start up with a TERM of xterm, in which case it doesn't work. But if I start it as 'rxvt -tn rxvt' it sets $TERM to 'rxvt' and, with the pasted termcap entries, it works. Still a lot of work to do and a lot of learning to do but it's not real high on my list right now. No idea why Eterm seemed to trash my termcap or whatever it did or why Eterm then broke.

Bruce Hill 12-16-2003 05:01 PM

Thanks for the info digiot! I'll give it a try!

When I last replied in this thread I was using Debian. Now I'm using Slack. It's a little bit different setup. The home and end keys now work for me in xterm, but not if I open a document in pico. Also, I have colors in exterm for user but not for root. In Debian that was easily solved by changing .bashrc in /root, but that's not in the file structure for Slack. I just haven't read where to change it but I'm sure I can. I've been so busy getting everything going in Slack. Today I'll start a "Slack needs" list so I can keep it more organized. I really like Slack!

I'm going to give your tip a go in a minute and see what happens.


All times are GMT -5. The time now is 09:12 PM.