LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-18-2010, 06:22 PM   #1
irb
LQ Newbie
 
Registered: Mar 2010
Distribution: Slackware, [Free|Open]BSD, Debian, CentOS
Posts: 4

Rep: Reputation: 0
TERM=rxvt / rxvt-unicode and ctrl-L


This has been a nagging problem for quite a while with Slackware and I'm curious if others have seen it. If, using any sort of rxvt-based terminal with TERM set to rxvt (or rxvt-unicode) then ^L will not clear the screen, only act as newline. This is not the behavior I see on Debian or CentOS. I have the same user environment at each site.

Using urxvt on centos, ^L will clear the screen like readline(3) says it should. If I then ssh to slackware, it won't.

exporting TERM=xterm will cause the correct behavior after having logged in to slackware, but I'd rather understand why this is happening.

I've tried moving aside all the shell startup scripts, setting clear-screen explicitly in .inputrc, setting stty sane ... nothing doing. Am I missing something?

Thanks.
 
Old 03-18-2010, 06:29 PM   #2
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,211

Rep: Reputation: 293Reputation: 293Reputation: 293
Seems to work here with urxvt at least while not in vim/irssi. I have no settings in .inputrc for it.
 
Old 03-18-2010, 07:41 PM   #3
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,276

Rep: Reputation: 686Reputation: 686Reputation: 686Reputation: 686Reputation: 686Reputation: 686
Doesn't work here in urxvt either. In default GNU screen it works so it didn't bother me (it is quite rare that I use a terminal without using screen as well), but after switching to using term screen-256color-bce to get my full colour fix I've lost that capability again. I haven't done anything about since it is easy enough to type `clear` but I guess some terminfo files are just not very complete.
 
Old 03-19-2010, 01:50 AM   #4
irb
LQ Newbie
 
Registered: Mar 2010
Distribution: Slackware, [Free|Open]BSD, Debian, CentOS
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by T3slider View Post
Doesn't work here in urxvt either. In default GNU screen it works so it didn't bother me (it is quite rare that I use a terminal without using screen as well), but after switching to using term screen-256color-bce to get my full colour fix I've lost that capability again. I haven't done anything about since it is easy enough to type `clear` but I guess some terminfo files are just not very complete.
Yeah, in screen it's fine, unless I ssh into another slackware box, where it stops working for the duration of that session (whose TERM is set to screen-bce or screen-256color-bce as well). Hunh.
 
Old 03-19-2010, 02:03 AM   #5
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
On my slackware machine, 'rxvt' is not one of the possibilities in the /etc/termcap file in the section which includes 'xterm'. As such, I had the same behavior as you do, i.e. CTRL-L would not clear the screen. By adding 'rxvt' into the list of TERM possiblities in the section where 'xterm' is listed, CTRL-L now works as expected in my rxvt.

The corresponding section of my /etc/termcap file looks like this (note where I inserted rxvt):

Code:
# Entry for an xterm. Insert mode has been disabled.
vs|rxvt|xterm|xterm-color|vs100|xterm terminal emulator (X Window System):\
        :am:bs:mi@:km:co#80:li#55:\
        :im@:ei@:\
        :ct=\E[3k:ue=\E[m:\
        :is=\E[m\E[?1l\E>:\
        :rs=\E[m\E[?1l\E>:\
        :eA=\E)0:as=^N:ae=^O:ac=aaffggjjkkllmmnnooqqssttuuvvwwxx:\
        :kI=\E[2~:kD=\177:kP=\E[5~:kN=\E[6~:\
        :k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:\
        :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k0=\E[21~:\
        :F1=\E[23~:F2=\E[24~:\
        :kh=\E[H:kH=\EOw:\
        :ks=:ke=:\
        :te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:\
        :tc=vt-generic:
Also, note that I just did this for the heck of it, to test before posting here, so I have not tested the other entries in this section of the file to see if the rest of the codes work in rxvt -- you really should probably create a unique section specifically for rxvt, such as has been done for other terminals like for e.g. Eterm.

Sasha
 
1 members found this post helpful.
Old 03-19-2010, 02:56 AM   #6
Thom1b
Member
 
Registered: Mar 2010
Posts: 70

Rep: Reputation: 30
I made a slackbuild for slackware-fr.org called rxvt-unicode-terminfo.
Then you can keep TERM=rxvt-unicode and everything will work. This is very useful if you want to connect on a ssh server who hasn't rxvt-unicode installed from a rxvt-unicode terminal. Just install the terminfo on the server.

Last edited by Thom1b; 03-19-2010 at 03:06 AM.
 
Old 03-20-2010, 11:02 AM   #7
irb
LQ Newbie
 
Registered: Mar 2010
Distribution: Slackware, [Free|Open]BSD, Debian, CentOS
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by GrapefruiTgirl View Post
On my slackware machine, 'rxvt' is not one of the possibilities in the /etc/termcap file in the section which includes 'xterm'. As such, I had the same behavior as you do, i.e. CTRL-L would not clear the screen. By adding 'rxvt' into the list of TERM possiblities in the section where 'xterm' is listed, CTRL-L now works as expected in my rxvt.

Sasha
For some reason I thought /etc/termcap was obsoleted by the entries in /usr/share/terminfo; perhaps not. I've added a termcap entry for rxvt-unicode and can now ^L all day. FYI, this is what I ended up using:

Code:
#       Reconstructed via infocmp from file: /etc/terminfo/r/rxvt-unicode
# (untranslatable capabilities removed to fit entry within 1023 bytes)
rxvt-unicode|rxvt-unicode terminal (X Window System):\
        :am:bw:eo:hs:km:mi:ms:xn:xo:\
        :co#80:it#8:li#24:lm#0:\
        :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
        :K1=\EOw:K2=\EOu:K3=\EOy:K4=\EOq:K5=\EOs:LE=\E[%dD:\
        :RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:ae=\E(B:al=\E[L:\
        :as=\E(0:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\
        :cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:\
        :dl=\E[M:do=^J:ds=\E]2;\007:ec=\E[%dX:ei=\E[4l:fs=^G:\
        :ho=\E[H:i1=\E[!p:ic=\E[@:im=\E[4h:\
        :is=\E[r\E[m\E[2J\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001 1049l\E[4l:\
        :k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:\
        :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:kD=\E[3~:\
        :kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=\177:kd=\E[B:ke=\E>:\
        :kh=\E[7~:kl=\E[D:kr=\E[C:ks=\E=:ku=\E[A:le=^H:mb=\E[5m:\
        :md=\E[1m:me=\E[m\017:mr=\E[7m:nd=\E[C:rc=\E8:sc=\E7:\
        :se=\E[27m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:\
        :te=\E[r\E[?1049l:ti=\E[?1049h:ts=\E]2;:ue=\E[24m:\
        :up=\E[A:us=\E[4m:vb=\E[?5h\E[?5l:ve=\E[?25h:vi=\E[?25l:\
        :vs=\E[?25h:
Thanks for helping me track it down.

/i.
 
1 members found this post helpful.
Old 03-20-2010, 03:24 PM   #8
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
I too am sometimes not sure which file supercedes which other files, or which are obsoleted by another. I think this can also vary by OS, and by compilation options of certain programs (such as term emulators). Based on what you write above, it looks fair to say that `infocmp` uses the /etc/terminfo* information, and produces output that can be used in /etc/termcap?

I'm going to keep your above post handy as a reference; I did not know of `infocmp` and I just tried it in my xterm and it produced a load of stuff! I can probably tune up all my terminals to some degree.

I haven't looked into it yet, but what I now wonder, is if a local termcap file is possible, such as ~/.termcap for example, which one could use to prevent the case of a system upgrade or whatever, overwriting your customized /etc/termcap file.

I am currently (among other things-- I get distracted easily) doing all sorts of configurating of various terminals on my system, so that everything works happily between terminals, $TERM variables, $LOCALE variables, LS_COLORS in terminals with different background-colors, and curses apps like MC and pkgtools -- because usually when *most* things are working great, there's usually *one* thing that gets screwed up; and fixing THAT thing, screws up something else. A local termcap file in the $HOME folder would make sense.

Anyhow, if you happen to read about if a $HOME/.termcap file can be used, please do tell; if I figure it out before you, I'll update this post.

EDIT - according to the termcap man-page, termcap is indeed obsoleted by terminfo.... I wonder then, why termcap is still being used, at least in this particular circumstance. There's probably a nice document about this somewhere which I'll look for later.


Sasha

Last edited by GrapefruiTgirl; 03-20-2010 at 03:38 PM.
 
Old 03-21-2010, 12:09 AM   #9
irb
LQ Newbie
 
Registered: Mar 2010
Distribution: Slackware, [Free|Open]BSD, Debian, CentOS
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by GrapefruiTgirl View Post
Anyhow, if you happen to read about if a $HOME/.termcap file can be used, please do tell; if I figure it out before you, I'll update this post.

EDIT - according to the termcap man-page, termcap is indeed obsoleted by terminfo.... I wonder then, why termcap is still being used, at least in this particular circumstance. There's probably a nice document about this somewhere which I'll look for later.
Sasha
Yeah, running it through strace confirms that ~/.terminfo is read before /usr/share/terminfo. I'm surpised that termcap supersedes it though (or that it's incomplete?).

I'm still playing with it--the simple solution is to just use xterm as $TERM but I feel like being stubborn about it and making things work the Right Way. Though I can now do 256-color urxvt / screen there are some things that just don't seem to want to work right, like running "tome -mgcu" (it acts like it's an 8-color terminal). Elinks works fine though. Weird.

If I come up with a better terminfo entry I'll be sure to post it here. It seems to work better under CentOS which, as a Slackware bigot, is just unacceptable. *grin*

/i.
 
Old 03-21-2010, 01:20 AM   #10
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
The simple solution you propose -- using xterm as a blanket replacement in $TERM -- works for *most* things, and I did that for a while, even setting TERM=xterm in /etc/profile; but I think you will find that it does screw up *some* obscure things, particularly VT's.

I too have been messing with this off and on for some time -- most recently the last several hours. It makes me want to put my head in a vise at times :/ because when it *appears* that I've got everything working, I later find something else messed up. Plus, you can't neglect the VT Linux Console -- under some situations, it doesn't work right at all, when the $TERM variable is not what it wants it to be (linux).

xterm and rxvt are pretty compatible. Eterm is not. But despite the vast differences between say Eterm and xterm (in infocmp), I can set $TERM=xterm and most things work correctly in Eterm. But like you, *most* is not satisfactory enough, so the struggle continues. When I use Eterm, with TERM=Eterm, and start mcedit, I cannot use SHIFT+direction keys to highlight/select text -- instead I get letters, like a,b,c,d.

FWIW, I don't use `screen` very often (I prefer DVTM), because when I do use screen it seems that $TERM is ignored or changes to something else (never checked it though, that was a while ago)

Good luck! And, maybe since this thread is solved, you or I should start a new thread on the subject? Last time I spent a lot of time on this, I had started this thread over here: http://www.linuxquestions.org/questi...t=ncurses+mess

Maybe Eterm just sucks -- but I kinda like it still, and I'd like it to work

Sasha

Last edited by GrapefruiTgirl; 03-21-2010 at 01:21 AM.
 
Old 06-09-2010, 05:09 AM   #11
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,551
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
The termcap entry posted by irb may have been mangled during copy-and-paste. There may be a missing ";" in
Code:
:is=\E[r\E[m\E[2J\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001[HERE]1049l\E[4l:\
The reason for thinking so is that it is otherwise functionally identical to both the termcap entry produced by the infocmp -C rxvt-unicode command and the termcap entry created during SlackBuild.

This when using Slackware 13.1 and SlackBuild's unicode-urxvt 9.07 build (creates SBo/rxvt-unicode-9.07/doc/etc/rxvt-unicode.termcap urxvt.termcap.sbo, possibly by running infocmp -C rxvt-unicode).

When using the posted termcap, I was unable to login after launching urxvt with /usr/bin/urxvt <some options> -e /bin/su - root. After inserting a ";" as above it works OK.
 
  


Reply

Tags
readline, rxvt, xterm


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rxvt unicode problem with fluxbox Josh000 Slackware 16 12-24-2009 03:45 AM
rxvt-unicode fonts proper setup zomane Linux - Desktop 1 04-12-2009 05:02 PM
problem with rxvt-unicode corbis_demon Linux - Software 0 11-27-2007 10:55 AM
System-wide urxvt (rxvt-unicode) X-resource control colo Linux - Software 2 07-17-2006 08:17 AM
term (rxvt) creates ~ when pressing home/end ninmonkeys Linux - General 4 11-22-2004 03:37 PM


All times are GMT -5. The time now is 06:00 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration