Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Solaris console has no scroll capability (Solaris 10/x86)?

552 views
Skip to first unread message

Josip Gracin

unread,
May 15, 2005, 4:19:08 PM5/15/05
to
Hi!

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.

Darren Dunham

unread,
May 16, 2005, 12:01:03 PM5/16/05
to
Josip Gracin <gra...@tel.fer.hr> wrote:
> Hi!

> 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. >

Josip Gracin

unread,
May 16, 2005, 12:16:39 PM5/16/05
to
Darren, thanks for answering.

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?

Robert Lawhead

unread,
May 16, 2005, 12:43:37 PM5/16/05
to
Are you doing this with a generic login (ie no tailoring
of .login .cshrc, .kshrc, .profile etc? I've not seen this
on any of a large number of PC consoles.

- Bob

Casper H.S. Dik

unread,
May 16, 2005, 1:11:30 PM5/16/05
to
Josip Gracin <gra...@tel.fer.hr> writes:

>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.

Thomas Dickey

unread,
May 16, 2005, 3:33:58 PM5/16/05
to
Casper H.S. Dik <Caspe...@sun.com> wrote:
> Josip Gracin <gra...@tel.fer.hr> writes:

>>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

Josip Gracin

unread,
May 16, 2005, 4:03:13 PM5/16/05
to
On Mon, 16 May 2005 17:11:30 +0000, Casper H. S. Dik wrote:
> 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 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.

Thomas Dickey

unread,
May 17, 2005, 4:57:29 AM5/17/05
to

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 ).

Josip Gracin

unread,
May 17, 2005, 6:06:14 AM5/17/05
to
On Tue, 17 May 2005 08:57:29 +0000, Thomas Dickey wrote:
> The console's terminal entry is 'sun' (set TERM to 'sun' and reset).

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!

Casper H.S. Dik

unread,
May 17, 2005, 7:09:52 AM5/17/05
to
Josip Gracin <gra...@tel.fer.hr> writes:

echo ESC[1r

(Set Scrolling 1 line)

For some reason, ESC[s has no effect.

Thomas Dickey

unread,
May 18, 2005, 8:40:40 AM5/18/05
to
Casper H.S. Dik <Caspe...@sun.com> wrote:

> 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).

mordonez

unread,
Feb 3, 2014, 1:05:18 AM2/3/14
to
Did you ever get this resolved I have the exact same problem on a Raritan IP kvm.


0 new messages