LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-03-2002, 03:47 AM   #1
raven
Member
 
Registered: Dec 2001
Location: Basel, Switzerland
Distribution: ubuntu
Posts: 297

Rep: Reputation: 31
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
 
Old 10-26-2003, 12:13 PM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
*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...
 
Old 10-28-2003, 11:56 AM   #3
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Sorry. Bad day there. Still could use some instruction in the mysteries of terminal emulators, though. And apparently I'm not alone.
 
Old 10-31-2003, 10:25 PM   #4
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
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...

 
Old 10-31-2003, 10:52 PM   #5
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
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.
 
Old 10-31-2003, 10:57 PM   #6
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
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.
 
Old 11-03-2003, 08:02 PM   #7
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
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.
 
Old 11-03-2003, 08:22 PM   #8
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
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.
 
Old 12-16-2003, 11:11 AM   #9
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
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.
 
Old 12-16-2003, 05:01 PM   #10
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
xterm - howto lauch an xterm into a specific directory jobano Linux - Software 11 01-30-2023 04:45 AM
how is black xterm background in IceWM when issue a xterm command? BRAHmS Linux - Software 1 02-14-2005 03:51 AM
Magic Rescue PhuckFonix Linux - General 0 08-07-2004 09:13 PM
Partition Magic robo11 General 6 05-16-2004 01:39 PM
Magic HD...now you see me....now you don't!!! recurrente Linux - General 3 03-17-2002 12:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration