After a command line login, we get a prompt at console. However, as soon
as the cursor reaches 25th line, the screen gets cleared and new prompt is
placed on the top of screen, i.e. in the first line. Needless to say,
this makes it nearly impossible to do any work.
How do I make console behave as a normal terminal? I've tryed setting
TERM to all sorts of values such as sun-color, dumb, vt100, vt52, dtterm,
xterm. I've tryed using 'stty rows 24' just to try, but this doesn't
change the number of rows, it remains on 25.
> After a command line login, we get a prompt at console. However, as soon
> as the cursor reaches 25th line, the screen gets cleared and new prompt is
> placed on the top of screen, i.e. in the first line. Needless to say,
> this makes it nearly impossible to do any work.
You just mean on a Sun keyboard/screen combo?
What is TERM set to? I'd normally expect 'sun'.
I've never seen that behavior, so I don't know what's causing it.
--
Darren Dunham ddu...@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
On Mon, 16 May 2005 16:01:03 +0000, Darren Dunham wrote:
> Josip Gracin <gra...@tel.fer.hr> wrote:
>> After a command line login, we get a prompt at console. However, as soon
>> as the cursor reaches 25th line, the screen gets cleared and new prompt is
>> placed on the top of screen, i.e. in the first line. Needless to say,
>
> You just mean on a Sun keyboard/screen combo?
No, on all PCs that I've tryed. It's Solaris 10/x86.
> What is TERM set to? I'd normally expect 'sun'.
By default it's sun-color. But I've tryed various other values
(vt100, xterm, dtterm, vt52...) with the same behavior.
> I've never seen that behavior, so I don't know what's causing it.
Has anyone seen this on Solaris 10/x86 PC platform?
- Bob
>Has anyone seen this on Solaris 10/x86 PC platform?
This looks like the behaviour of a Sun console when it's
gotten a standard vt100 init sequence. So check your
login scripts and tty settings.
Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
>>Has anyone seen this on Solaris 10/x86 PC platform?
> This looks like the behaviour of a Sun console when it's
> gotten a standard vt100 init sequence. So check your
> login scripts and tty settings.
it would help to provide context:
man wscons says
0xA The cursor, while remaining at the same character
position on the line, moves down one line. If the
cursor is at the bottom line, the screen either
scrolls up or wraps around depending on the set-
ting of an internal variable n (initially 1) .
The internal variable can be changed using the
ESC[r control sequence. If n is greater than
zero, the entire screen (including the cursor) is
scrolled up by n lines before executing the
line-feed. The top n lines scroll off the screen
and are lost. New blank lines n scroll onto the
bottom of the screen. After scrolling, move the
cursor down one line to execute the line feed.
If n is zero, wrap-around mode is entered. The
ESC [ 1 r exits back to scroll mode. If a line-
feed occurs on the bottom line in wrap mode, the
cursor goes to the same character position in the
top line of the screen. During line-feeds, the
line that the cursor moves to is cleared and no
scrolling occurs. Wrap-around mode is not imple-
mented in the window system.
For vt100's, ESC[r (with/without parameters) is used to set scrolling margins.
The escape sequence is used for more than just initialization; it is used in
curses applications such as vi as part of setting up scrolling regions.
The initialization sequence for vt100 would send the rs2 string. I don't
see that in this Solaris 8 terminfo description (but csr is present):
# Reconstructed via infocmp from file: /usr/share/lib/terminfo/v/vt100
vt100|vt100-am|dec vt100 (w/advanced video),
am, mir, msgr, xenl, xon,
cols#80, it#8, lines#24, vt#3,
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>,
clear=\E[H\E[J$<50>, cr=\r, csr=\E[%i%p1%d;%p2%dr,
cub=\E[%p1%dD, cub1=\b, cud=\E[%p1%dB, cud1=\n,
cuf=\E[%p1%dC, cuf1=\E[C$<2>,
cup=\E[%i%p1%d;%p2%dH$<5>, cuu=\E[%p1%dA,
cuu1=\E[A$<2>, ed=\E[J$<50>, el=\E[K$<3>,
el1=\E[1K$<3>, enacs=\E(B\E)0, home=\E[H, ht=\t,
hts=\EH, ind=\n, ka1=\EOq, ka3=\EOs, kb2=\EOr, kbs=\b,
kc1=\EOp, kc3=\EOn, kcub1=\EOD, kcud1=\EOB,
kcuf1=\EOC, kcuu1=\EOA, kent=\EOM, kf0=\EOy, kf1=\EOP,
kf10=\EOx, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt,
kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, rc=\E8,
rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, rmkx=\E[?1l\E>,
rmso=\E[m$<2>, rmul=\E[m$<2>,
rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7,
sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t^N%e^O%;,
sgr0=\E[m^O$<2>, smacs=^N, smkx=\E[?1h\E=,
smso=\E[1;7m$<2>, smul=\E[4m$<2>, tbc=\E[3g,
(some vt100 terminal descriptions may set scrolling margins; apparently
Solaris' is not among them).
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
It seems you are right. It is caused when TERM is set to dtterm and 'vim'
is started. Vim somehow screws up the terminal.
Is there any way to reinitialize it back to normal? I've tryed 'reset'
and 'tput -Tterm init' with various terms and it didn't work.
The console's terminal entry is 'sun' (set TERM to 'sun' and reset).
According to the wscons manpage that should work ( see the discussion
of ESC[r and ESC[s ).
If I don't set anything in my login scripts, TERM gets set to sun-color.
> According to the wscons manpage that should work ( see the discussion
> of ESC[r and ESC[s ).
Yes, that's it! Echoing '^[[1r' restores the normal scrolling.
Thanks everybody!
echo ESC[1r
(Set Scrolling 1 line)
For some reason, ESC[s has no effect.
> echo ESC[1r
> (Set Scrolling 1 line)
> For some reason, ESC[s has no effect.
The wscons manpage only mentions 3 escape sequences that set modes,
(ESC[ p, q and r) and the description of ESC[ s states that it resets
all modes (but does not list them).