Subject: joe and lynx on a short terminal

From: Dale Scheetz <[email-masked]>
Date: Wed, 28 Aug 1996 13:14:36 -0400 (EDT)

I have a Data General "dumb" terminal hooked up to my linux box through a
hard wired serial port. The terminal seems to provide 24 lines on the
screen. Pine handles this fine, but joe and lynx behave as though there
were one more line than there actually is. The behavior is that as you
cursor down the screen (in joe), the previous line appears under the
cursor as you move. Is there an environment variable that I can set to 24
(or even smaller) that will make joe and lynx handle the screen correctly?

TIA,

Dwarf

------------                                          --------------

aka   Dale Scheetz                   Phone:   1 (904) 877-0257
      Flexible Software              Fax:     NONE 
      Black Creek Critters           e-mail:  [email-masked]

------------ If you don't see what you want, just ask --------------

---

From: [email-masked] (Miquel van Smoorenburg)
Date: 28 Aug 1996 22:25:25 +0200

In article <[email-masked]>,
>(or even smaller) that will make joe and lynx handle the screen correctly?

Probably a terminfo problem. Your terminal may have auto-wrap (auto-margins)
and terminfo says it doesn't, or vice verse. Also make sure that you do
have the right terminfo entry: if you set term to "linux" its terminfo
entry says it has 25 lines.

Mike.
-- 
   Miquel van      | Cistron Internet Services   --    Alphen aan den Rijn.
   Smoorenburg,    | mailto:[email-masked]          http://www.cistron.nl/
[email-masked] | Tel: +31-172-419445 (Voice) 430979 (Fax) 442580 (Data)

---

From: Guy Maor <[email-masked]>
Date: Wed, 28 Aug 1996 15:42:23 -0500 (CDT)

On Wed, 28 Aug 1996, Dale Scheetz wrote:

> Is there an environment variable that I can set to 24

The variable is LINES.  resize(1x) will output code to set LINES and
ROWS correctly.  I use it like this (this is a bash function):

resize ()
{
    set -f;
    eval $(command resize);
    set +f
}

Guy

---

From: Dale Scheetz <[email-masked]>
Date: Wed, 28 Aug 1996 21:16:30 -0400 (EDT)

> entry says it has 25 lines.
This bring up another issue. This terminal obviously has special needs. Is
there a way in /etc/profile (or somewhere else) to set up the proper
conditions based on the terminal rather than the user? That is, can I
determine at login time what tty is being used and set the proper
conditions reguardless of the user logging in?

Thanks,

Dwarf

------------ If you don't see what you want, just ask --------------

---

From: Gerry Jensen <[email-masked]>
Date: Wed, 28 Aug 1996 23:15:27 -0600 (MDT)

> conditions reguardless of the user logging in?

I have this in my .bash_profile to set my terminal to vt320 if I'm
calling in on the phone which I rarely do anymore::

TTY=`tty`
case $TTY in
  /dev/ttyS?) TERM=vt320 ;;
esac

Actually, this brings up yet another issue.  vt320 doesn't seem to be
supported anymore (or maybe it never was on Debian, I don't know). If I
try to use vt320 I get: 

Cannot open termcap file
  vt320 not builtin

  or

Unknown terminal.

Does Debian support vt320?  I see there is a vt320 file under
/usr/lib/terminfo/v/vt320.  Am I doing something wrong?

Gerry

---

From: Miquel van Smoorenburg <[email-masked]>
Date: Thu, 29 Aug 1996 11:16:56 +0200 (MET DST)

> conditions reguardless of the user logging in?

Well yeah, if you run agetty (which is /sbin/getty on Debian ofcourse)
you can put the terminal type at the end of the command line. For example
if your terminal is a vt100, then in /etc/inittab:

S1:23:respawn:/sbin/getty /dev/ttyS1 9600 vt100

Mike.

---

From: Dale Scheetz <[email-masked]>
Date: Thu, 29 Aug 1996 10:15:24 -0400 (EDT)

>   /dev/ttyS?) TERM=vt320 ;;
Thanks! This let me; 'stty cstopb' to fix login's insistance that 1 stop
bit is sufficient (not for this terminal). Is the syntax for this
structure documented in the bash manual page? Can I put more than one
command in the case block?

Thanks again,

Dwarf

------------ If you don't see what you want, just ask --------------

---

From: Dale Scheetz <[email-masked]>
Date: Thu, 29 Aug 1996 10:23:19 -0400 (EDT)

> S1:23:respawn:/sbin/getty /dev/ttyS1 9600 vt100
My inittab line has ansi instead of vt100 (it is a little better in this
case). What I was looking for was more like what Gerry suggested.
I also tried your suggestion on the LINES environment variable with little
success.
This is a REALLY DUMB terminal. It claims to handle vt100, and because
pine seems to work, it does seem to support some major subset of the
protocol. But, for instance, if the new line to write to the screen is
only 70 characters and the line being written over had 80, the last 10
characters of the previous line remain after the new line is printed. Also
a tab in the front of the line fails to clear out old characters there as
well.
I got these terminals (8 of them) off the back of a truck that was hauling
them to the dump. It's no big deal if that's where they finally end up. I
have been using this junk to improve my knowledge of the internals of tty
handling. In that reguard they have been worth far more than I paid for
them ;-)

Thanks for all the pointers,

Dwarf

------------ If you don't see what you want, just ask --------------

---

From: Bruce Walzer <[email-masked]>
Date: Thu, 29 Aug 1996 08:40:46 -0500 (CDT)

[...]

> conditions reguardless of the user logging in?

Here's what I have in /ect/profile to do what I think you want;
--------------------------cut---------------------------------
TTYTYPE=`tty|cut -f 3 -d /|grep -f - /etc/ttytype|cut -f 1 -d " "`
  if [ "$TTYTYPE" = "" ]; then
   :
  else
   TERM=$TTYTYPE
  fi

unset TTYTYPE
-------------------------cut----------------------------------

/etc/ttytype looks like this;
-------------------------cut----------------------------------
vt100 ttyS0
vt100 ttyS1
vt100 ttyS2
vt100 ttyS3
-------------------------cut----------------------------------

In this case I set all the serial ports to vt100 and leaving
everything else alone. I forget where the ttytype idea came from but I
ripped it off from somewhere.

--
Bruce Walzer |Voice: (204) 783-4983
Winnipeg MB  |Internet: [email-masked]
Canada       |Amateur Radio: VE4XOR

---

From: Michael Meskes <[email-masked]>
Date: Thu, 29 Aug 1996 09:55:39 +0200 (MET DST)

> entry says it has 25 lines.

joe doesn't use terminfo. It comes with its own (very small) termcap file
and uses this. I never had the time to test joe with terminfo support
compiled in instead. The upstream author recommends to not use it anyway.

Michael
-- 
Michael Meskes                   |    _____ ________ __  ____
[email-masked] |   / ___// ____/ // / / __ \___  __________
[email-masked]                  |   \__ \/ /_  / // /_/ /_/ / _ \/ ___/ ___/
[email-masked]                |  ___/ / __/ /__  __/\__, /  __/ /  (__  )
Use Debian Linux!                | /____/_/      /_/  /____/\___/_/  /____/