Re: setting 132 columns in Solaris (screen width) - Questions

This is a discussion on Re: setting 132 columns in Solaris (screen width) - Questions ; Shiva MahaDeva wrote: | | How could I setting a terminal emulator to 132 columns in Solaris, | like I issue "set terminal/width=132" in OpenVMS ? Anton Rang replied: > > The command > $ stty columns 132 > will ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Re: setting 132 columns in Solaris (screen width)

  1. Re: setting 132 columns in Solaris (screen width)

    Shiva MahaDeva wrote:
    |
    | How could I setting a terminal emulator to 132 columns in Solaris,
    | like I issue "set terminal/width=132" in OpenVMS ?

    Anton Rang replied:
    >
    > The command
    > $ stty columns 132
    > will change it on the host side. There isn't a standard way to send
    > the command sequence to request that the terminal automatically switch
    > as well, though.



    The VMS DCL command "SET TERMINAL/WIDTH=132" does two things:

    (1) set the operating system's opinion of the terminal's width to 132 columns

    (2) send an Escape sequence that causes a DEC VTx00 terminal to configure
    its screen buffer to actually display 132 characters horizontally

    The Unix command "stty columns 132" performs only thing (1).

    For thing (2), while there is no "de jure" ANSI standard for switching the
    visible screen width, there is yet a widely implemented mechanism, based
    on the control codes implemented in the DEC VT220 video terminal (and in
    later DEC terminal products).

    If "xterm" is being used, then the "Allow 132/80 Column Switching" option
    must be enabled from the "VT Options" menu. (This screen menu is accessed
    by holding down the Control key and pressing the middle mouse button.) Then
    some software running on the Unix host can cause (2) to happen by sending
    the DECCOLM Escape sequence:

    Esc [ ? 3 h

    In Solaris, the "some software" may consist of this simple one-line command:

    $ printf "\033[?3h"

    The control sequence to reset/clear the screen size back to 80 columns is:

    Esc [ ? 3 l
    $ printf "\033[?3l"

    (where 'l' is a lowercase 'L').

    Finally, you must reset the operating system's opinion to 80 columns like this:

    $ stty columns 80

    Archived information on related topics may be found here:

    http://www.cs.utk.edu/~shuford/terminal_index.html

    --
    ...Richard S. Shuford
    shuford(at)list.stratagy.com


  2. Re: setting 132 columns in Solaris (screen width)

    In comp.unix.solaris Richard S. Shuford wrote:

    > For thing (2), while there is no "de jure" ANSI standard for switching the
    > visible screen width, there is yet a widely implemented mechanism, based
    > on the control codes implemented in the DEC VT220 video terminal (and in
    > later DEC terminal products).


    But on Solaris, the supported terminal program (so I'm told) is dtterm.
    That recognizes also a different escape sequence. Oddly Solaris' xterm
    doesn't seem to recognize this (though some of Solaris' manpages haven't
    been updated since Solaris 2.3 - I noticed several instances today ;-).

    "man resize" mentions this feature:

    -s [rows columns]
    This option indicates that Sun console escape
    sequences will be used instead of the special xterm
    escape code. If rows and columns are given, resize
    will ask the xterm to resize itself. However, the
    window manager may choose to disallow the change.

    I added that feature to XFree86 xterm a while back. It's very convenient
    for resizing the terminal, e.g.,

    resize -s 45 80

    to get 45 rows by 80 columns.

    --
    Thomas E. Dickey
    http://invisible-island.net
    ftp://invisible-island.net

  3. Re: setting 132 columns in Solaris (screen width)

    Shiva MahaDeva wrote:
    |
    | How could I setting a terminal emulator to 132 columns in Solaris,
    | like I issue "set terminal/width=132" in OpenVMS ?

    Then Richard S. Shuford wrote:
    >
    > For thing (2), while there is no "de jure" ANSI standard for switching the
    > visible screen width, there is yet a widely implemented mechanism, based
    > on the control codes implemented in the DEC VT220 video terminal (and in
    > later DEC terminal products).


    And then Thomas Dickey wrote:
    +
    + But on Solaris, the supported terminal program (so I'm told) is dtterm.
    + That recognizes also a different escape sequence. Oddly Solaris' xterm
    + doesn't seem to recognize this....


    Hi, Thomas,

    Recent releases of Solaris have included Sun-supported versions of
    both "xterm" and "dtterm". However, with Sun moving away from the
    committee-compromise "Common Desktop Environment" and toward the
    Gnome windowing environment, the CDE "dtterm" program is becoming
    less important. (And "cmdtool" is even further out of mind, whereas
    Gnome Terminal is becoming more important.)

    Noting that Shiva said merely "a terminal emulator", it is not clear
    what software is being used. Possibly it could be some program
    running under Windows and not any of the above Unix/Linux packages.
    (I picked "xterm" because it is fairly typical of a decent VT100
    emulator.)

    But, you do raise an issue that I forgot. By default, the Solaris
    "dtterm" program will ignore the DECCOLM control sequence. However,
    there is an invocation option to make "dtterm" honor DECCOLM, which
    the user can choose like this:

    $ /usr/dt/bin/dtterm -132

    (In Solaris 8 and 9, this is documented in the dtterm man page.)

    Another variant control sequence was developed by Digital Equipment
    Corporation for its real DEC VT330 terminals (and is used in later DEC
    and/or Boundless terminal models and faithful emulators of them). To
    support multiple screen-page memory in the terminal, DEC invented a
    more generalized screen-sizing feature: the command sequence is called
    DECSCPP (DEC Set Columns Per Page).

    For switching to 132 columns, the DECSCPP sequence (without the
    intervening spaces) would be:

    Esc [ 1 3 2 $ |

    (Using a Unix shell command to emit the '$' dollar and '|' pipe
    characters, without interpreting them, can require tricky quoting.)

    To reset/clear the VT330 to the default of 80 columns, any of these
    work:

    Esc [ $ |
    Esc [ 0 $ |
    Esc [ 8 0 $ |

    According to the documentation, the VT330 also supports an analogous
    DECSLPP (DEC Set Lines Per Page) control sequence, to allow screen
    pages containing 24, 36, 72, or 144 (!?) lines.

    Esc [ 2 4 t
    Esc [ 3 6 t
    Esc [ 7 2 t
    Esc [ 1 4 4 t

    Additional video-terminal lore resides here:

    http://www.cs.utk.edu/~shuford/terminal_index.html

    ...RSS


  4. Re: setting 132 columns in Solaris (screen width)

    In comp.unix.solaris Richard S. Shuford wrote:

    > Recent releases of Solaris have included Sun-supported versions of
    > both "xterm" and "dtterm". However, with Sun moving away from the


    I was more/less aware of that. There was a comment in this newsgroup
    a year or two ago regarding a Solaris-specific performance improvement
    which was in xterm. (Not detailed enough for me to make the same change,
    but enough to see that Sun was making changes that aren't in the X/Open
    version).

    > committee-compromise "Common Desktop Environment" and toward the
    > Gnome windowing environment, the CDE "dtterm" program is becoming
    > less important. (And "cmdtool" is even further out of mind, whereas
    > Gnome Terminal is becoming more important.)


    ( supporting Gnome Terminal may be challenging ;-)

    > Noting that Shiva said merely "a terminal emulator", it is not clear
    > what software is being used. Possibly it could be some program
    > running under Windows and not any of the above Unix/Linux packages.
    > (I picked "xterm" because it is fairly typical of a decent VT100
    > emulator.)


    I was thinking mostly of dtterm, since it's what is normally run as "terminal"
    (but don't have a Solaris 9 to adjust my expectations about that).

    > But, you do raise an issue that I forgot. By default, the Solaris
    > "dtterm" program will ignore the DECCOLM control sequence. However,
    > there is an invocation option to make "dtterm" honor DECCOLM, which
    > the user can choose like this:
    >
    > $ /usr/dt/bin/dtterm -132


    > (In Solaris 8 and 9, this is documented in the dtterm man page.)


    That applies to xterm as well.

    > Another variant control sequence was developed by Digital Equipment
    > Corporation for its real DEC VT330 terminals (and is used in later DEC
    > and/or Boundless terminal models and faithful emulators of them). To
    > support multiple screen-page memory in the terminal, DEC invented a
    > more generalized screen-sizing feature: the command sequence is called
    > DECSCPP (DEC Set Columns Per Page).


    It is more generalized - but as you note, apparently limited to specific
    values of columns and rows. (I implemented something based on this in
    XFree86 xterm, but omitting the limit - easier to do with a software terminal
    emulator than a piece of hardware).

    --
    Thomas E. Dickey
    http://invisible-island.net
    ftp://invisible-island.net

  5. Re: setting 132 columns in Solaris (screen width)

    Thomas Dickey writes in comp.unix.solaris:
    |In comp.unix.solaris Richard S. Shuford
    | wrote:
    |
    |> Recent releases of Solaris have included Sun-supported versions of
    |> both "xterm" and "dtterm". However, with Sun moving away from the
    |
    |I was more/less aware of that. There was a comment in this newsgroup
    |a year or two ago regarding a Solaris-specific performance improvement
    |which was in xterm. (Not detailed enough for me to make the same change,
    |but enough to see that Sun was making changes that aren't in the X/Open
    |version).

    For Solaris 2.6 through 8, xterm is basically the X11R6 version. For
    Solaris 9 it was upgraded to the l18nux.org (now openi18n.org) version,
    with yours/XFree86 supplied on the unsupported freeware companion CD.

    I'm not sure what comment or fix you're referring to, but if there's
    something you think can be of benefit, let me know and I can look to
    see if there's something there we can contribute. (We contribute fixes
    to both X.org & XFree86 now, though the process of going through our
    code and finding changes that would be beneficial to contribute is
    slow going since it's a lot of work and not our highest priority.
    XFree86 4.4 will contain a number of Sun-contributed fixes and the IPv6
    work from Sun.)

    --
    __________________________________________________ ______________________
    Alan Coopersmith alanc@alum.calberkeley.org
    http://www.CSUA.Berkeley.EDU/~alanc/ aka: Alan.Coopersmith@Sun.COM
    Working for, but definitely not speaking for, Sun Microsystems, Inc.

  6. Re: setting 132 columns in Solaris (screen width)

    In comp.unix.solaris Alan Coopersmith wrote:
    > Thomas Dickey writes in comp.unix.solaris:
    > |In comp.unix.solaris Richard S. Shuford
    > | wrote:
    > |
    > |> Recent releases of Solaris have included Sun-supported versions of
    > |> both "xterm" and "dtterm". However, with Sun moving away from the
    > |
    > |I was more/less aware of that. There was a comment in this newsgroup
    > |a year or two ago regarding a Solaris-specific performance improvement
    > |which was in xterm. (Not detailed enough for me to make the same change,
    > |but enough to see that Sun was making changes that aren't in the X/Open
    > |version).


    > For Solaris 2.6 through 8, xterm is basically the X11R6 version. For
    > Solaris 9 it was upgraded to the l18nux.org (now openi18n.org) version,
    > with yours/XFree86 supplied on the unsupported freeware companion CD.


    > I'm not sure what comment or fix you're referring to, but if there's


    I was recalling one of your postings - but checking now, I'm misquoting it.
    The posting commented that dtterm had been modified to use a SolarisIA
    extension (makes subprocesses get a priority boost), but went on to say that
    xterm was not modified. This was in April 2002.

    --
    Thomas E. Dickey
    http://invisible-island.net
    ftp://invisible-island.net

+ Reply to Thread