LinuxQuestions.org
Visit Jeremy's Blog.
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 09-07-2017, 04:04 PM   #1
rshepard
Member
 
Registered: Oct 2007
Location: Troutdale, Oregon
Distribution: Slackware
Posts: 246

Rep: Reputation: 19
14.2: less displays last viewed file above current file on all hosts.


There are 4 hosts here running 14.2. Two are 32-bit, two are 64-bit. One of each flavor is an upgrade from 14.1, one of each flavor is a new install. The virtual terminal is urxvt. In all of them when I view a file with 'less' I see the tail end of the file previously viewed with less in that virtual terminal.

I seek ideas on how to fix this or, at least, diagnose why it's happening. Has not before been an issue with Slackware-8.0 through 14.1 on both 32- and 64-bit installations.
 
Old 09-07-2017, 04:55 PM   #2
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware, Crux, NetBSD
Posts: 1,306

Rep: Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774
Quote:
Originally Posted by rshepard View Post
There are 4 hosts here running 14.2. Two are 32-bit, two are 64-bit. One of each flavor is an upgrade from 14.1, one of each flavor is a new install. The virtual terminal is urxvt. In all of them when I view a file with 'less' I see the tail end of the file previously viewed with less in that virtual terminal.

I seek ideas on how to fix this or, at least, diagnose why it's happening. Has not before been an issue with Slackware-8.0 through 14.1 on both 32- and 64-bit installations.
It could be a shell setting you have in ~/.bashrc. Try temporarily moving this file somewhere else and log in without your own bashrc to see if it still happens. I had a shopt setting some time ago which messed up my terminal.
 
Old 09-09-2017, 12:35 PM   #3
rshepard
Member
 
Registered: Oct 2007
Location: Troutdale, Oregon
Distribution: Slackware
Posts: 246

Original Poster
Rep: Reputation: 19
Gerard,

I tried moving ~/.bashrc out of the way, then ~/.bash_profile, and neither made a difference. 'less' still displays the end of the previously viewed file on top of the current one.

I'm open to all suggestions of what to try (or examine) to figure out the cause of this behavior.

Thanks,

Rich
 
Old 09-09-2017, 02:14 PM   #4
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware, Crux, NetBSD
Posts: 1,306

Rep: Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774
What does echo $TERM report?

Did you compile rxvt-unicode from source or install from Slackbuild?

What urxvt settings do you have in ~/.Xresources?
 
Old 09-09-2017, 10:19 PM   #5
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,660

Rep: Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540
'less' is a termcap application. http://invisible-island.net/ncurses/...ses_of_library
Perhaps try adding an entry to /etc/termcap for rxvt-unicode. https://www.linuxquestions.org/quest...ml#post5626083
 
2 members found this post helpful.
Old 09-10-2017, 10:45 AM   #6
rshepard
Member
 
Registered: Oct 2007
Location: Troutdale, Oregon
Distribution: Slackware
Posts: 246

Original Poster
Rep: Reputation: 19
What does echo $TERM[/B] report?
$ echo $TERM
rxvt

Did you compile rxvt-unicode from source or install from Slackbuild?
Used the SBo build script, as I've done before.

What urxvt settings do you have in ~/.Xresources?
$ grep urxvt .Xresources
urxvt*loginShell: true
 
Old 09-10-2017, 10:48 AM   #7
rshepard
Member
 
Registered: Oct 2007
Location: Troutdale, Oregon
Distribution: Slackware
Posts: 246

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by allend View Post
Perhaps try adding an entry to /etc/termcap for rxvt-unicode.
There is a rxvt-unicode stanza in /etc/termcap; what it means I don't know:
rxvt-unicode|rxvt-unicode terminal (X Window System):\
:am:bw:eo:km:mi:ms:xn:xo:\
:co#80:it#8:li#24:lm#0:\
:AL=\E[%dLC=\E[%dPL=\E[%dMO=\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:ec=\E[%dX:ei=\E[4l:ho=\E[H:\
:i1=\E[?47l\E=\E[?1l:ic=\E[@:im=\E[4h:\
:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\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=\EOB:ke=\E[?1l\E>:\
:kh=\E[7~:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:ku=\EOA: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:ue=\E[24m:up=\E[A:\
:us=\E[4m:vb=\E[?5h\E[?5l:ve=\E[?25h:vi=\E[?25l:\
:vs=\E[?25h:
 
Old 09-10-2017, 11:18 AM   #8
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,660

Rep: Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540
You have not used code tags to enclose the contents of the termcap stanza, but it appears to differ from what I see as the output of 'infocmp -Cr rxvt-unicode-256color'.
 
Old 09-10-2017, 02:38 PM   #9
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware, Crux, NetBSD
Posts: 1,306

Rep: Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774
Quote:
Originally Posted by allend View Post
Interesting. Does this mean termcap applications like less and screen don't behave properly if there's no termcap entry, even if there are terminfo entries?
 
Old 09-11-2017, 10:34 AM   #10
rshepard
Member
 
Registered: Oct 2007
Location: Troutdale, Oregon
Distribution: Slackware
Posts: 246

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by allend View Post
You have not used code tags to enclose the contents of the termcap stanza, but it appears to differ from what I see as the output of 'infocmp -Cr rxvt-unicode-256color'.
I've done nothing to the termcap file; what I posted is what is in there.

There are three termcap files in /etc/:
$ ll termcap*
-rw-r--r-- 1 root root 12389 Dec 14 2011 termcap
-rw-r--r-- 1 root root 706385 Mar 2 2000 termcap-BSD
-rw-r--r-- 1 root root 8969 Feb 15 2004 termcap-Linux

These are what are provided by Slackware. If the -BSD and -Linux are too ancient, I can remove them; as far as I know only the 2011 version is used by the system.
 
Old 09-11-2017, 11:11 AM   #11
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,128
Blog Entries: 4

Rep: Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548
Quote:
Originally Posted by rshepard View Post
I've done nothing to the termcap file; what I posted is what is in there.

There are three termcap files in /etc/:
$ ll termcap*
-rw-r--r-- 1 root root 12389 Dec 14 2011 termcap
-rw-r--r-- 1 root root 706385 Mar 2 2000 termcap-BSD
-rw-r--r-- 1 root root 8969 Feb 15 2004 termcap-Linux

These are what are provided by Slackware. If the -BSD and -Linux are too ancient, I can remove them; as far as I know only the 2011 version is used by the system.
How sure are you about that?

On an unmodified 14.2 system you should have this:

jet$ ls -l termcap*
-rw-r--r-- 1 root root 8969 Feb 16 2004 termcap
-rw-r--r-- 1 root root 706385 Mar 2 2000 termcap-BSD
-rw-r--r-- 1 root root 8969 Feb 16 2004 termcap-Linux

If this is an upgraded system, please note that 14.2's upgrade script will not have replaced or modified your termcap file if you already had it (see shortly before the end of /var/log/scripts/etc-14.2-x86_64-7)

So.... where were you, and what were you doing on the 14th of December 2011?

And, what are the first two lines of /etc/termcap on your system?
And if they are as follows:

Code:
# [Slackware note:  If you're looking for a big, full-featured termcap,
#  use /etc/termcap-BSD instead ]
what do you see when you do 'diff /etc/termcap-Linux /etc/termcap' ?

As a five minute experiment, it would be worth copying your /etc/termcap somewhere safe, and then copying /etc/termcap-Linux to /etc/termcap, and then rebooting, and then seeing if your problem goes away.
 
3 members found this post helpful.
Old 09-24-2017, 10:14 AM   #12
rshepard
Member
 
Registered: Oct 2007
Location: Troutdale, Oregon
Distribution: Slackware
Posts: 246

Original Poster
Rep: Reputation: 19
I've found a way to fix the issue; it's more of a kludge than identifying the cause of the behavior change with 14.2. In ~/.bash_profile I've added the line export LESS="-c". Got the idea from closely reading the man page and it's working for me.

Thanks, all,

Rich
 
  


Reply

Tags
"less", 14.2, multiple files displayed


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
Allowing only one file to be viewed in a folder of files paperbagperson Linux - Newbie 6 04-01-2016 03:18 PM
[SOLVED] How can my script change my hosts file and fetch the password in a txt file i have tmtkobedmx8 Linux - Newbie 6 05-15-2014 01:55 PM
How to tell what process last wrote to a file? - hosts file being updated by unk kcoriginal Linux - General 1 12-29-2008 12:53 AM
does the /etc/hosts file work same as the M$ hosts file? Lleb_KCir Linux - Software 6 04-03-2004 05:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:20 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration