Path: utzoo!attcan!telly!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!bonnie.concordia.ca!nstn.ns.ca!news.cs.indiana.edu!news.nd.edu!spool.mu.edu!uwm.edu!uwvax!persoft!dag From: dag@persoft.com (Daniel A. Glasser) Newsgroups: comp.unix.sysv386 Subject: Re: Copyright startup lines Message-ID: <1991Feb22.215311.16076@persoft.com> Date: 22 Feb 91 21:53:11 GMT References: <1991Feb17.130459.29719@virtech.uucp> <375@metran.UUCP> Organization: Persoft, Inc. Lines: 57 * This is not a flame directed at Jay. The world of ANSI X3.64 style terminals * and the programming thereof is not a black art but most people don't know * much beyond what they read in manuals and treat it as such. In article <375@metran.UUCP> jay@metran.UUCP (Jay Ts) writes: >The ANSI-standard "clear screen" escape sequence is ESC-c. So all you have >to do is modify your /etc/gettydefs file like this (for each entry you use): > >console# B9600 [ ... ] # B9600 [ ... ] #^[cConsole Login: #console > > ^that ^[ is an ESC character > >Thus, the pre-login prompt stuff is cleared off the screen, and users always >get the login prompt in the top left of a nice, clean screen. YIKES!!!! I RECOMMEND THAT YOU DON'T DO THIS! The ANSI sequence that is "spelled" "\033c" ("^[c" or "c") is not defined as "clear screen". It is defined as RIS (Reset to Initial State), and in many terminals (notably DEC VTx, x >= 100) causes a disconnect. This disconnect will cause a modem to hang up, and on some hardware/OS combinations, signal a hangup to the host even if the terminal does not hang up its end. It may also change the baud rate setting on the terminal. The DEC VT420 manual (which is not a standard, but is common practice) says this about RIS (quoted without permission): This control function causes a nonvolatile memory (NVR) recall to occur. RIS replaces all set-up features with their saved settings. ... NOTE: Digital does not recommend using RIS to reset the terminal. You should use a soft terminal reset (DECSTR) instead. RIS usually causes a communication line disconnect and may change the current baud rate settings. When performing a RIS, the terminal sends XOFF to the host to stop communication. When the RIS is complete, the terminal sends XON to resume communciation. (DECSTR, Soft Terminal Reset, does not clear the screen, so this isn't what is desired either, and it's only supported by VT3x0 and higher.) I don't know of an ansi standard sequence for "clear screen". There is one that clears a portion (or all) of the display page, ED (Erase in Display), which is "\033[J" or "\033[0J" for "erase from cursor to end of page", "\033[1J" for "erase from beginning of page to cursor", and "\033[2J" for "erase entire display." None of these moves the cursor. This is, however, not exactly what I thought the original query was asking, since the drivel that you are clearing out still gets written, but then gets cleared away. It still uses up line time and might confuse some calling uucico... -- Daniel A. Glasser | Persoft, Inc. | dag@persoft.com "Their brains were small, and they died."