How to setup the consoles and terminals *PROPERLY* ?

The problem was that when on /dev/tty via SSH I was not able to scroll the command line history with up- and down-arrows.

I’ve found the nearly ideal setup:

  • in /.boot I declared “/bin/sinit TERM=qansi”
  • in /etc/config/sysinit.NODE I removed “-Q” from “/bin/Dev.ansi -n6 -h &”
  • in /etc/config/sysinit.NODE I added “export TERM=qansi”, then after the line “reopen /dev/con1” I’ve put “stty protocol=1 term=$TERM”
  • in /etc/default/login I declared “TERM=qansi”

This gave me colored man-pages, access to the command line history with up- and down-arrows on /dev/conX, my favorite mqc works…

On /dev/tty I’m able to access the history with Ctrl-P and Ctrl-N.
Strangely enough - the up- and down-arrows start working on /dev/tty after I log-in via telnet!
stty reports different modes before and after the telnet session.

May be it’s curable with ./configureing SSH2 to use some termcap or something… Will try it later.

The draw-backs found so far:

  • in mqc I’ve lost Ctrl-Enter to put the highlighted filename onto the command line.

Please comment.

Tony.

On Sun, 19 Sep 2004 16:14:30 +0400, Tony <mts.spb.suxx@mail.ru> wrote:

The problem was that when on /dev/tty via SSH I was not able to scroll the command line history with up- and down-arrows.

Thanks to Frank Liu the solution was very simple:

  • in /etc/config/sysinit.NODE I added “reopen /dev/ttyp0; stty load” after Dev.pty is started.
  • the boot-image and /etc/default/login declare TERM=qnx


Dev.pty -nN &
reopen /dev/ttyp0
stty load

Dev.con -nM &
reopen /dev/con1
stty load

Now everything works nicely.
Even a windoze machine with the terminal answerback set to “xterm” is able to display the full-screen programs like mqc or vedit.

Tony.