Unix/Linux Terminal News ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Using a character-cell video terminal with Unix is somewhat different from pointing-and-clicking on a Windows PC; also it differs from using a Unix- based workstation from its graphical display. (Of course, with most Unix systems, you can use an "X terminal" for a GUI interface that is remote from the system box. But here we are concerned with simple ASCII devices.) The results you get are affected by lots of factors, some of which are the same for all operating systems... and some of which are peculiar to Unix (and/or Linux). This document contains some of the "peculiar stuff." Look in other files at this site for the general stuff. A special category of peculiar stuff is the "terminfo" and/or "termcap" database. A good source of information is the book described at: http://www.ora.com/www/item/term.html and there is also the master termcap/terminfo database: http://tuxedo.org/~esr/terminfo/ There is also the built-in Unix manpage documentation. Type these commands: man terminfo (System V Unix: e.g., Solaris) man termcap (BSD Unix: e.g., FreeBSD) man -s 7i termio (System V) man 4 termio (BSD) man stty man tset The "term" and/or "TERM" environment variables are typically used to tell the system which records to look up in terminfo or termcap. The manpage for your user shell should describe how these may be set. You should be able to do at least echo $TERM to see the current setting. ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: As of A.D. 2002, one type of complaint frequently seen asked in many Unix (and/or Linux) discussion forums goes something like this: "I think Unix is broken. When I use the [whatever] Unix program, my function keys don't work right and my screen display looks all weird. Oh, by the way, I'm connecting to Unix from Windows, using the "telnet" or "Hyperterminal" program that came with Windows. ...and, upon investigation, the *real* problem turns out to be one of two things: (1) the TERM variable was set to some inappropriate value, such as 'tty'. (2) the [whatever] Unix program was trying to do some operation which would work fine on a real video terminal, but which does not work in a Hyperterminal or Windows Telnet session. When you are about to use one of these programs supplied "for free" by Microsoft, keep the following thought in mind: almost always, you will be using it to communicate with a non-Windows operating system. It is *not* in the economic interest of Microsoft Corporation that doing so should be easy for you. Microsoft *wants* you think that Unix is broken. So, before you give up trying to use Unix, try a different terminal- emulation program, and use the TERM and "stty" settings appropriate to it. (Elsewhere on this website there is a discussion of the peculiarities of the Hyperterminal program that Microsoft supplies.) Another thing to consider is that some properties of the interactive environment are determined by the shell (sh, csh, ksh, tcsh, etc.). .............................................................................. Indeed, the means of telling Unix what kind of terminal you are using, and how to control it, are complex, and the settings interact in non-intuitive ways. I've compiled a few rules of thumb, most of which work fairly well in Sun's Solaris when the user shell is "csh" or "tcsh". With other Unix variants and shells, YMMV. To find out the serial-port/pseudo-terminal parameters, the "stty -a" command can be used, e.g., % stty -a speed 38400 baud; rows = 25; columns = 80; ypixels = 0; xpixels = 0; eucw 1:0:0:0, scrw 1:0:0:0 intr = ^c; quit = ^|; erase = ^?; kill = ^u; eof = ^d; eol = ; eol2 = ; swtch = ; start = ^q; stop = ^s; susp = ^z; dsusp = ^y; rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v; -parenb -parodd cs8 -cstopb -hupcl cread -clocal -loblk -crtscts -crtsxoff -parext -ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc ixon -ixany -ixoff imaxbel isig icanon -xcase echo echoe echok -echonl -noflsh -tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3 To find out what some of the above "ioctl" settings are, you have to do % man -s 7i termio Often the best way to set the number of rows and columns displayed is by using the "stty" command: % stty rows 24 cols 80 A "termcap" entry for a given terminal can be transformed into the (mostly) equivalent "terminfo" entry by using the "captoinfo" program. % man -s 1m captoinfo (The "tic" program is used for setting up a terminfo entry.) Depending on which program you are running, it may take its cues about the terminal's control codes from either terminfo or termcap. In Solaris 2.x, at least, most of the OFFICIAL tools do use terminfo, but informally acquired programs are unpredictable. So you may need accurate descriptions of your terminal type in BOTH databases on your Solaris machine. The environment and/or shell variables "TERM" and "term" influence which terminfo/termcap entry is used. % echo $TERM unknown % setenv TERM vt100 % echo $TERM vt100 One handy alias I keep in my .cshrc: alias vt100 'set term = vt100 ; tset -I -Q' Some versions of Unix (not Sun's Solaris but many BSD flavors) support a shorthand way of setting the line discipline to the way DEC VTxxx terminals like it: % stty dec set all modes suitable for Digital Equipment Corp. operating systems users; (erase, kill, and interrupt characters to ^?, ^U, and ^C, decctlq and ``newcrt''.) The "decctlq" setting means that when output has been halted by Control-S (XOFF), only a Control-Q (XON) will restart it. The environment variable "LANG" influences the character set used for display. Information on other UNIX variants will be added as it becomes available and as time permits. ...RSS ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Most Unix systems use full-duplex communication. This means that when you type a key on the terminal's keyboard, nothing appears on the terminal's screen until the ASCII code has arrived at the Unix host and has been echoed back down the wire to the terminal. ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Judging from Usenet postings, many nascent programmers are not aware that the Unix programming model for character-cell terminals is discussed in a well known book. See chapter 11 in: "Advanced Programming in the UNIX Environment" by W. Richard Stevens. Reading, Massachusetts: Addison-Wesley, 1992. ISBN: 0-201-56317-7 (Furthermore, chapter 18 of this book discusses dialing an async modem.) ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Another reference book on the Internet is "UNIX Hints and Hacks" by Kirk Waingrow. Copyright 1999 MacMillan/Que. ISBN 0-7897-1927-4. Here is the URL of the chapter describing character-cell terminal displays and emulations. http://infobase.informit.com/infobase/content/0743100026/shelf/books/0789719274/19270099.htm ////////////////////////////////////////////////////////////////////////////// \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ One important fact: when you press a function or command key on a character-cell video terminal, you are sending an Escape sequence of some type. This Escape sequence encodes the meaning of the keystroke. This differs from a PC, where the meaning of the keystroke is carried in a Scan code. (Oops....pedantic note: some terminal types may use control sequences that do not start with an ASCII Escape character, but the principle is the same, whether the Down-arrow key sends Escape O B or Control-N. The ANSI X3.64-compatible terminal types do use Escape sequences; such types include VT100, VT220, VT320, xterm, and dtterm.) Thus, a large part of satisfactory terminal emulation is getting the host operating system (Unix in this case) and the terminal-emulator software on the PC to agree on a logical and useful vocabulary of Escape sequences generated by typing keys on the PC's keyboard. You want them both to speak the same language. Unfortunately, there is no authoritative dictionary for function-key meanings, so disagreements do arise. Both "termcap" and "terminfo" contain some features for allowing programs to know what Escape sequences to expect from a terminal type, although not every Unix program uses these features. And most terminal-emulation programs contain some way to adjust what the individual keys transmit. (Note that there are major differences in how Windows and Unix regard "scan codes" generated by a PC keyboard. Several messages below discuss this.) ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Some documentation for standardized "curses" is available on the Web: http://www.rdg.opengroup.org/onlinepubs/7908799/cursesix.html 1998-04-04 ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: From the VT525 FAQ: [http://ftp.digital.com/pub/Digital/termcaps/faqvt525.txt] [originally ftp://gatekeeper.dec.com/pub/DEC/termcaps/faqvt525.txt] 6. Why don't the arrow keys work with the 'vi' editor in VTx00 modes? ANSI arrow keys transmit key sequences which have the form up arrow = Esc [ A 'vi' has two modes of operation: Command mode and Insert mode. 'vi' interprets the ASCII Escape code as a command to exit Insert Mode and return to Command mode. If an Escape is received while in Command mode, it is an error and the user is notified by beeping the terminal. When 'vi' receives an Escape code it starts a Timer. If the timer times out before receiving the "[" code, 'vi' interprets the Escape as an Escape and the following "[ A" codes are interpreted as commands. These "bad commands" cause 'vi' to beep the terminal. The symptom is intermittent as it is TIMING DEPENDENT and is affected by communications-channel delays and processor speeds. Workaround: Enter the 'vi' command, "set notimeout". ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: The idiosyncrasies of Unix terminal handling are thoroughly derogated in Chapter 6 "Terminal Insanity" of "The Unix-Haters Handbook" by Simson Garfinkel, Daniel Weise, and Steven Strassmann. San Mateo, CA: IDG Books/Programmers Press, 1994. ISBN 1-56884-203-1 (At the time, Weise worked for Microsoft; Strassmann worked for Apple. Garfinkel was a writer for "Wired" magazine. Unix had been a serious operating system for a decade; Windows was up to version 3.1, but had not yet been improved to its current advanced design in which you activate the "Shutdown" function via the "Startup" button.) For an alternate viewpoint, with less ranting, there is good information in the book "Unix Power Tools, 3rd Edition" by Shelley Powers, Jerry Peek, Tim O'Reilly, and Mike Loukides Sebastopol, California: O'Reilly and Associates, October 2002. ISBN: 0-596-00330-7, Order Number: 3307 1156 pages, $69.95 US, $108.95 CA, £49.95 UK http://www.oreilly.com/catalog/upt3/ According to current policy of O'Reilly and Associates, the text of "Unix Power Tools, 3rd Edition" is readable online, as part of the "Safari" documents, for which there is a free 2-week demo period. http://safari.oreilly.com/0596003307 The older 2nd edition had terminal information in Part VII: "Unix Power Tools, 2nd Edition" by Jerry Peek, Tim O'Reilly, and Mike Loukides ISBN 1-56592-260-3 August 1997, 1120 pages, with CD-ROM. http://www.oreilly.com/catalog/upt2/ ////////////////////////////////////////////////////////////////////////////// Newsgroups: comp.unix.programmer Date: Tue, 19 Jun 2001 08:53:50 -0500 From: Chuck Dillon Subject: Re: stty command - what it does caroline wrote: > > hi, > can you please explain what stty does. > thanks, > caroline.c Terminal devices are highly configurable and their interfaces are standardized, so that they all look pretty much the same. In C code you use the ioctl() system call to read/change terminal settings. It is often necessary to be able to read/change terminal settings from a script. The stty program is a commandline interface that sits on top of ioctl() which allows you to script reading and/or changing of terminal settings. The man page for stty describes the capabilities, in stty terms, and it refers to other manpages (e.g. ioctl, termio ...) which describe the lower level stuff. HTH, -- ced -- Chuck Dillon Senior Software Engineer Accelrys Inc., a subsidiary of Pharmacopeia, Inc. ////////////////////////////////////////////////////////////////////////////// Resources for Linux users Two very helpful hyperdocuments by David S. Lawyer from The Linux Documentation Project: "Text-Terminal-HOWTO" http://www.tldp.org/HOWTO/Text-Terminal-HOWTO.html ftp://sunsite.unc.edu:/pub/Linux/docs/HOWTO/Text-Terminal-HOWTO "Serial-HOWTO" http://www.tldp.org/HOWTO/Serial-HOWTO.html .... Useful to Macintosh/iMac/iBook owners: "MacTerminal Mini-HOWTO" http://www.tldp.org/HOWTO/mini/Mac-Terminal.html .... Of less direct but possible peripheral interest: "Keyboard and Console HOWTO" http://www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO.html .... Linux "How To" Index http://www.tldp.org/ ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Other resources (some specialized to SCO Unix): http://unixware.sco.com/ ftp://ftp.uu.net/vendor/sco/Term/ http://develope.plantrol.com/support http://www.erols.com/rbetter/sco.txt http://www.stokely.com/stokely/index.html [The Stokely resources are now archived here: http://www.sunhelp.org/unix-serial-port-resources ] ...RSS] ////////////////////////////////////////////////////////////////////////////// Sometimes being able to read a single keystroke or control-keystroke sequence is useful. Editor programs, for instance, often need to do this. For an example of how the well-known open-source editor program "vim" implements this, you can look to a repository of source code, such as... http://www.opensource.apple.com/darwinsource/10.4.3/vim-13/vim/src/getchar.c Or, more generally, http://www.vim.org/download.php ////////////////////////////////////////////////////////////////////////////// OK. Time has permitted an entry about Hewlett-Packard's Unix flavor... Configuring HP-UX 10.20 for a terminal.... Using SAM to configure the port /dev/tty3p1: the user wanted the setting to be 9600, 8 no parity, so I used the following entry in the /etc/gettydefs file: m9600 # B9600 HUPCL IGNPAR ICRNL IXON OPOST ONLCR CS8 CREAD ISIG ICANON ECHO ECHOE ECHOK ISTRIP IXANY TAB3 # B9600 SANE IGNPAR CS8 ISTRIP IXANY HUPCL TAB3 #login 9600: #m9600 As of 1999-12-20, the following Web location gives advice on setting up charcter-cell terminals under HPUX 10.20. http://www.hp.com/visualize/programs/y2k/y2k_menu/y2k_help/os_transition/docs/periph/terms3.htm ////////////////////////////////////////////////////////////////////////////// Information on the UNIX "screen" ASCII window manager may be seen at http://www.math.fu-berlin.de/~guckes/screen/screen.intro.html The commercial "Mascot" Alphawindows screen manager may be seen at http://www.jsb.com/products/mvwmas/mascot.html ///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\/// \\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\ ARCHIVER'S NOTE: Below this point, the information in this document is mostly scavenged from several different Usenet newsgroups. It varies in accuracy. In several places, you can observe the common Usenet syndrome of a participant not bothering to actually understand the question being asked before posting an answer! ...RSS ///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\/// \\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\ Newsgroups: comp.terminals References: <9kdi7s$c6p$04$1@news.t-online.com> X-Original-NNTP-Posting-Host: 216.220.165.51 Message-ID: <3b6e048c_2@news3.paonline.com> Date: Sun, 5 Aug 2001 22:46:56 -0400 From: "paonline" Subject: Re: TeleVideo 925 and SUSE Linux ???? Martin Altmeyer wrote in message <9kdi7s$c6p$04$1@news.t-online.com>... > > Hi ! > > I got an Televideo 925 Terminal, and I want to use it on my linux > machine.... > What must I do ?? Martin, i guessing the Televideo 925 is a serial terminal ? if so you just need a "null modem" cable, a working serial port, serial port support compiled into the kernal, most likely already done, then use your favorite editor and open the file file /etc/inittab for a "com1" or "/dev/ttyS0" port, add a line : S1:12345:respawn:/sbin/agetty ttyS0 tvi925 save the file, then run "telinit q" to reread the inittab there might be other issues that allow logins from the serial port, the file /etc/securetty should contain a line with "ttyS0" and the file /etc/termcap should have a terminal definition the the 925, you can copy and paste this from the master termcap file "termcap-BSD". Anyone else ? Well, good luck; they are lots of fun, once running. Andy ............................................................................ Newsgroups: comp.unix.shell Date: 20 Feb 1997 02:20:40 GMT From: Brian S Hiles Subject: Re: Getting Backspace_key to actually backspace Lifeform (timewarp@sirius.com) wrote: : : Is there an easy way to configure my shell to allow me the pleasure of : using the [backspace] key like a normal human being? Try % stty erase \^H ( # or ^?, whatever your backspace key generates) -- -Brian ............................................................................ Newsgroups: comp.unix.shell Date: Thu, 20 Feb 1997 06:27:12 GMT From: David Boyce Subject: Re: Getting Backspace_key to actually backspace It's a minor point, but you can generally get away without having to know control sequences such as the above: just type "stty erase " and then hit the backspace key and carriage return. Since we already know that the character it generates is not being treated as a backspace, it will be taken literally and will have the desired effect. This assumes, of course, that you don't already have backspace mapped to some other action, which should be a pretty safe bet. -- David ............................................................................ or $ stty erase Ctrl-V where the Control-V forces literal interpretation.... ............................................................................ From: Joseph Gil Organization: Computer Science, University of B.C., Vancouver, B.C., Canada Q: How can an application set the Backarrow (the key at the north east side of the keyboard which is supposed to erase the previous char. The icon on it is something like <=] partkey of VT320 to send backspace? DEL? A: Send ESC[?67l to make <=] send DEL Send ESC[?67h to make it send BackSpace. The following CSH script in unix may turn useful for switching between the two modes. if ($?DEL) then stty erase "^?" echo "[?67l" else stty erase "" echo "[?67h" endif ............................................................................ Newsgroups: comp.unix.shell Date: 21 Feb 1997 17:07:13 GMT From: Dan Mercer Subject: Re: Getting Delete key to actually delete Da Borg wrote: : : What about "Delete" key? It does generate "^?" on my system. : How do I remap it to actually delete next char instead of : backspacing of printing "^?" ? The systems are SunOS and Linux. : stty ^? stty controls your terminal settings. UNIX terminal line protocol does not have a "delete next char" function. You can, however, map the delete key to a delete next char in your favorite editor. In vi, place the following in your .exrc file (replace with your delete key and with ). map! ^? ^[lxi map ^? x -- Dan Mercer Reply To: damercer@mmm.com ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.os.linux.misc,comp.unix.sco.misc Organization: Columbia University Message-ID: <8ef47s$qta$1@newsmaster.cc.columbia.edu> References: <8ecroc$26o$1@p enguin.transmeta.com> <390ADD9F.7067D850@pcunix.com> Date: 29 Apr 2000 16:56:28 GMT From: fdc@watsun.cc.columbia.edu (Frank da Cruz) Subject: Re: Linux and SCO In article , Bill Vermillion wrote: : : In article <390ADD9F.7067D850@pcunix.com>, : Tony Lawrence wrote: : > : > Linus Torvalds wrote: : >> : >> T.E.Dickey wrote: : ... : I think it would be better to leave the VT100 emulation alone and : build an alternate emulator than to muck with the VT100 'standard'. And your wish came true. PC-based Unixes like Linux and SCO each have their own unique console terminal definition that is definitely not VT100, although it shares the VT100's ANSI X3.64 basis. SCO has SCOANSI and Linux has Linux Console. Also there is AT386 used by Interactive Unix and later (I think) Unixware. The problem with these "emulations" is that they aren't emulations at all, since they aren't emulating anything and there is no physical terminal (like the VT100) to check them against. Their specifications can be hard to come by, and even when found, incomplete and/or inaccurate. To this day, we discover undocumented sequences used by applications that were designed for SCOANSI, AT386, etc. As for the Backspace/Delete controversy... This is decades old. The best policy (by the Principle of Least Astonishment) is to treat them the same by default, as many Unix variations now do, and use them to erase the character left of the cursor. People who truly need to distinguish between Rubout (127) and Backspace (8) will have enough of a clue to be able to do so. Those of us who still use command shells are left with the remnants of two ancient cultures: the original Unix culture and the once-mighty DEC culture. Remember that Unix was first developed in the late 1960s*, and predates the DEC heyday. The Unix guys picked certain keys to do certain things. DEC picked other keys to do the same things: Unix DEC Erase Character ^H ^? Erase Line @ ^U Interrupt Process ^? ^C The differences might largely have been because Unix was originally accessed from Teletypes, which (if memory serves) did not have a proper Ctrl key, whereas DEC systems (PDP-11, PDP-10, etc) were mainly accessed from terminals that did have a Ctrl key (LA34, LA36, VT05, VT50, VT52, VT100, ...) (although it is also true that early DEC systems were delivered with Teletype consoles.) After the fall of DEC culture, most of its people were absorbed into and influenced by Unix culture, and we began to see DEC usage predominate. Still, many Unixes are delivered with some or all of the default original Unix setups. The result being that when you Telnet to different Unix systems, you never know what Ctrl-H or Del/Rubout will do. For that reason, terminal emulators always give you a choice for the mapping the Backpace (<-) key. Of course matters are even more cofusing when we throw in EMACS/Vi conventions, Function keys, the arrow keypad, and so forth, not to mention keys with promising labels like "Insert", "Page Up", "Find", "Select" and "Help", but that's a different story! Wouldn't it be great if, after all these years, keys actually did what their keytops say they do? termcap ~~~~~~~~ Termcap is /etc/termcap (unless you've defined the shell variable TERMCAP to point somewhere else). This is the original Unix method of storing terminal information. While termcap isn't as powerful as terminfo, it is simpler to use, and if the programmer doesn't need a lot of fancy features, this is often the choice made. The file consists of entries that describe terminals, both in terms of capabilities (screen dimensions, etc), what special keys send when pressed, and what sequences need to be sent to do things like erase a line or move the cursor. All these are described in man F termcap. It is important to understand the difference between a capability (what the program must do in order to make the terminal act a certain way) and a definition (the F1 key will send a certain sequence). If you changed the termcap file for the scoansi terminal so that the "k1" (F1 key) entry was defined as "ESC-J@", pressing your F1 key is NOT going to produce "ESC-J@". All that entry does is tell a program that if it sees "ESC-J@" coming from a scoansi terminal, it should interpret that as being the F1 key. A program can use the termcap programming routines but read its information from a different termcap file. A programmer can also add new capabilites to that file (or even to /etc/termcap). The ubiquitous Filepro database uses both of those techniques to achieve its goals. You can add and change entries for your own purposes, too. For example, a certain program may work fine with your vt100 terminal except that it needs the F1 key but does not recognize it, because it is a "broken" program, badly written, and isn't using termcap or terminfo. Using the setup program within the terminal itself, you can reprogram the F1 key to send what the program expects to see (assuming you can determine this), but now other programs won't work because they are expecting the sequence that termcap (or terminfo) says the terminal will send. By changing the entry in /etc/termcap (or in terminfo- see below), you can make both programs happy. Usually the best way to do this is to copy the "mostly working" entry to a new terminal name ("myvt100") and modify that, so that you aren't affecting anythingbut the terminal(s) you really need to. As mentioned above, a program can have its own TERMCAP file, located somewhere other than /etc. If that's the case, you'd obviously need to look there for any modifications. Sometimes the file provides the functions of TERMCAP but not its syntax: RealWorld has sometimes used files like ANSI.config, etc. for this. Terminfo ~~~~~~~~ Conceptually, terminfo is similar to termcap- it is a data base of terminal information. However, it is set up completely differently, and using it in a program is a little more difficult (though the difficulty is offset by increased capability). Terminfo keeps its data in a compiled form in subdirectories of /usr/lib/terminfo. You'll find Wyse terminals under /usr/lib/terminfo/w, vt100 models unter /usr/lib/terminfo/v, ansi variations under /usr/lib/terminfo/a, etc. The source for all these terminals is usually found in /usr/lib/terminfo/terminfo.src (see man M terminfo for a description of the entries in terminfo source files). Most modern Unix programs use terminfo. You can see that by copying the entry for your terminal in /etc/termcap to a new entry, and changing it only by modifying its name. For example, you might copy the "vt100" section to "myvt100". You could then set TERM=myvt100, export TERM (if it isn't already), and programs that use termcap would continue to work happily. Attempt to use vi, however, and you'd get a strange message: myvt100: Unknown terminal type I don't know what kind of terminal you are on - all I have is 'myvt100' [Using open mode] That's because vi uses terminfo, not termcap. You could copy /usr/lib/terminfo/v/vt100 to /usr/lib/terminfo/m/myvt100 and then vi would be happy. You could also add a new entry to terminfo.src and use "tic" to compile it (which would create the compiled entry in the proper subdirectory). Some programs use terminfo files but put them in their own directory and use their own versions of "tic" (Pick based programs often do this, and so did the old Unix Lotus version, some versions of Synchronics, etc.). Solving Emulation Related Problems If the terminal is connected by a serial line, be sure that the /etc/ttytype file has the proper entry and that the "tset" line in .profile knows how to handle that entry (note that the devices in /etc/ttytype are ALWAYS the lower case versions, so even if you are coming in on /dev/tty2A, you want to have tty2a in /etc/ttytype). You can cause tset to change the meaning of /etc/ttytype: eval `tset -m wy50:wy60-25 -m ansi:${TERM:-ansi} -m :\?${TERM:-ansi} -e -r -s -Q` That line will set TERM to wy60-25 even when /etc/ttytype says it is a wy50. If the terminal doesn't work properly, you can sometimes fix it by checking to see what it actually sends. Using "hd", you can type the keys you are having trouble with, and see if they match the proper entries in /etc/termcap or /usr/lib/terminfo.src. For example, if I run "hd" and press the F1 key on my console, followed by ENTER and 2 CTRL_D's, I'll get back 0000 1b 5b 4d 0a .[M. That shows me that the F1 key generated Escape (that's hex 1b or decimal 27), then a bracket (hex 5b, decimal 91), then an "M" (hex 4d, decimal 77). The 0a is the Enter I typed after the F1. Checking the ansi entry in /etc/termcap. I see that k1 is defined as "\E[M". As"\E" is termcap's notation for Escape, this is correct. Looking in /usr/lib/terminfo/terminfo.src reveals that the ansi entry defines kf1 (that's terminfo's notation for F1) identically. If these things were not true, I wouldn't expect my terminal to work correctly. ...... [* ARCHIVER'S NOTE: Above, Frank asserts that "Unix was first developed in the late 1960s, and predates the DEC heyday." It was the summer of 1969 when Ken Thompson at Bell Labs obtained a disused PDP-7 computer and began to design an operating system for it, drawing on his experience in the Multics project. The exact timing of the "DEC heyday" is less precise. My own subjective judgment is that Digital Equipment Corporation, under Ken Olsen, reached its peak of confidence, influence, and perceived technological leadership in the spring of 1987, but I suspect Frank has a different estimate. ...RSS ] ////////////////////////////////////////////////////////////////////////////// Newsgroups: comp.protocols.kermit.misc Path: cs.utk.edu!gatech!newsfeed.internetmci.com!news.exodus.net!aimnet.com !ns2.mainstreet.net!bug.rahul.net!a2i!rahul.net!a2i!dold.a2i!dold Organization: a2i network Message-ID: <4er911$ml3@hustle.rahul.net> References: NNTP-Posting-Host: foxtrot.rahul.net Date: 1 Feb 1996 20:49:37 GMT From: Clarence Dold Subject: Re: Kermit for Win3x--K95? Steve Cosner (stevec@zimmer.CSUFresno.EDU) wrote: : My home setup requires me to connect to a Sun Unix server. K3.1 works : pretty well except backspace won't delete backwards. I know I can : redefine the backspace key, but is there a standard setup somewhere : for this type of connection? I connect to a SunOS 4.1.3 system with Kermit of various flavors. MSKermit 3.14, Unix C-Kermit 190, Kermit-95 1.2 My choice is to map the backspace key, although I could have done an stty on the UNIX side to accomplish the same task. I also map the function keys that exist on my PC keyboard, although they don't exist on a real vt100, and therefore don't exist in the default Kermit-vt100. From my mskermit.ini (for MSKermit 3.14, if that matters (?)) define UKEY1 set key clear,set key \270 \008,set key \782 \008; BackSpace do UKEY1 ; to match (ESIX 4.0.4) vt100 extended function keys to PC keyboard. ; f5 f6 f7 f8 f9 f10 define UKEY2 set key \319 \27Ot, set key \320 \27Ou, set key \321 \027Ov, set key \322 \027Ol, set key \323 \027Ow, set key \324 \027Ox do UKEY2 ; -- --- Clarence A Dold - dold@rahul.net - Pope Valley & Napa CA. ////////////////////////////////////////////////////////////////////////////// Newsgroups: comp.os.vms Path: cs.utk.edu!cssun.mathcs.emory.edu!gatech!news.mathworks.com!news.kei.com !nntp.coast.net!harbinger.cc.monash.edu.au!news.uwa.edu.au !info.curtin.edu.au!newsmaster Organization: Curtin University Lines: 69 Message-ID: <4egfro$bak@info.curtin.edu.au> References: <4dm1bu$gdg@griffin.ccc.nottingham.ac.uk> Date: Mon, 29 Jan 96 02:38:44 +800 From: zrepachol@cuppa.curtin.edu.au Subject: RE: The DEL/Backspace chestnut. In Article <4dm1bu$gdg@griffin.ccc.nottingham.ac.uk> cczanj@axp0.ccc.nottingham.ac.uk (Andy Jack) writes: > > I have recently been talking with my colleagues about the hoary old question > of the "Rubout" key. On VMS the character used to delete the last character > is ASCII Delete (octal 177) and that is the default for VT terminals, > DECterm etc. And, oddly enough, what it is in the ASCII standard. It dates from the dim, distant past, pre-Baudot even, and the practical realization that it is LOTS easier to re-punch a lot out, that to try to un-punch a few small bits back in. All code sets that lasted more than 5 min had the common feature that the value 2^n - 1 was a delete code, what ever wonderous other schemes they embraced. >On Unix systems, it varies. Some come out of the box expecting the rubout >character to be Delete, some expect Backspace (Control-H, octal 008). One can >change the latter behaviour by putting a stty command in the login sequence. You are in a twisty little maze of... You can change most anything on UNIX with enough effort, and finding what variation of incantation is needed in this case. Anything is possible, 'normal' is just as possible, but often seems harder :/, and subject to random change without warning. .. > In order to get consistency, we are faced with the problem of either making > all Unix systems and terminal emulators send and interpret Delete (and > leaving VMS untouched) or standardizing the Unix systems on Backspace, > leaving the terminal emulators with their default and trying to get some > special profile invoked for all calls to VMS. No, your real problem is getting the Lusers to understand why and when to use the 'right' majik. If you can do that, you may as well re-bind 'right' to be a remote equivelent to a local binding. Declare it as a user problem, and thus, it is, by definition not a global, and ipsp facto, not your problem. This has the minor nit of being slightly more sucsessful if you lusers have a strickly positive IQ. This can be problamatic in many places, and is often made worse by managment. The man can be infuriating at times, but RMS's 'buggy back-space on CRTs' is the best I can think of as an explanation. That is the real problem, people who have never used, and can't imagine using a hardcopy terminal. Or that there is a real legitimate, non 'rubout' use for backspace. And a use that is clearly stated in the ASCII standard. Yes, back to the glass-eyed luser problem again. >We cannot be alone in struggling with this mess. What do other people do? You're not. Promise, you really are not alone. Telling the vendor that their software is non-conforming to your specs, and that they won't be paid until it does often gets their attention. Or their bosses. You do SPECIFY what you ask for, don't you? Or use kermit, and have the vendor problem go away. In fact, given the terminal brain-death of so many emulation packages, and the pain in using them, even with a vendor attached, Kermit would still, IMHO, be the clear winner. There IS a standard. If only people would insist on it, and punish those who don't, we would not have to keep fighting these stupid, petty, bushfire fights. Oh, and your Emacs users will thank you as well... ~Paul (whose sig is a little puzzle for lovers of ASCII, history, and UPPERCASE ONLY ) ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: [ARCHIVER'S NOTE: One historical quirk of most Unix implementations is, if you type your login name in all uppercase, Unix decides that your terminal can produce and view only uppercase, so it forces all output to be UPPERCASE! My educated guess is that the ~ (tilde) is prefixed to characters that started out uppercase before Unix forces them up. ...RSS] ////////////////////////////////////////////////////////////////////////////// Newsgroups: comp.terminals,comp.os.linux.networking Path: cs.utk.edu!shuford Message-ID: <4kc3c4INNft5@duncan.cs.utk.edu> References: <4jq536$egp@stratus.skypoint.net> Organization: University of Tennessee, Knoxville--Dept. of Computer Science Expires: 30 May 1996 22:11:33 GMT Summary: clues about connecting terminals to Linux PCs Keywords: Linux, terminal server, serial communication Date: 8 Apr 1996 18:18:44 -0400 From: shuford(at)cs.utk.edu (Richard Shuford) Subject: Re: How do you hook a dumb terminal to a PC? In article <4jq536$egp@stratus.skypoint.net>, jhoglund@skypoint.com (Jamie Hoglund) writes: | | I'm very clueless about this, but I'd like to hook some terminals | on my linux machine. I really don't know where to look for information | on how to do this. Could someone give me a general overview of what is | involved? I'm assuming that you mean an ASCII character-cell terminal (not an "X terminal" which speaks the X graphics protocol and does X Windows....) As odd as it may seem to newcomers, people were doing work on computers for many years before point-and-click was developed, and video terminals were the most common end-user equipment. |What do I need on the computer? | Presumably some 'Black Box' that the terminals hook into, and tells the | system what terminal is where. What is this called? (I'm not talking about | serial ports, I don't think. The terminals have to be some distance from | the machine) Your "black box" is called a Terminal Server. There are many vendors for these, including Cisco, Xyplex, Livingston, Xylogics, Lantronix, Digi, Black Box, and even DEC. [As of 1998, probably the DEC terminal servers belong to Cabletron, not to Compaq...and as of 2002, not to HP.] Almost all ASCII character-cell terminals expect to communicate using an asynchronous RS-232-C serial link. The terminal doesn't particularly care what the cable connects to, as long as it can recognize the data that comes back down the wire. The job of a terminal server is to take characters arriving from the terminal on the RS-232 cable, pack them into some network-protocol (e.g., Telnet over TCP/IP) packet and send the packet over a high-speed network (e.g., Ethernet) connection to the computer. The distance limitations in such an arrangement are usually those of your network technology. (Oh, yes, the terminal server does the reverse process for data from the host computer to the terminal.) It is also possible, with many versions of Unix and/or Linux, to use a serial port on the host computer, omitting the terminal server. Although the official distance limitation of RS-232-C is 50 feet, in practice you may be able to go several hundred feet at 9600 bps. Use good low-capacitance wiring. (Metric equivalents are an exercise for the reader.) | I'd like the terminals to be VT100'ish, not a PC [running] | terminal emulator software. Well, you can probably still obtain used DEC VT100s if you like. Or look for another vendor's product with a VT100 mode. Or a mode that emulates the later VT220, VT320, or VT420 models. Beware that NOT every video terminal ever invented has a VT100 mode. For example, a Televideo 955 cannot emulate a VT100. Nor can a Lear- Siegler ADM-3. However, many people have successfully used both of these terminal types with Unix, given that correct termcap and/or terminfo entries have been installed on the Unix host computer. Even if the display of a random VT100-emulating terminal can properly interpret the VT100 Escape sequences, the keyboard may have a layout that differs from a DEC terminal's keyboard so as to make things confusing for the user. This is the case, for instance, with the Link MC-5 terminal. (Here's a really shocking thought: not all video terminals even use the ASCII code. All those IBM 3270 and 5250-style terminals speak EBCDIC as their native tongue....) | Do terminals hook into network cards? | If so, what determines how many terminals one can have? | What do the terminals need? | What do these things usually cost? Some institutions may be throwing 1978-vintage VT100s out in the trash. Many U.S. federal government sites periodically auction off pallets of old terminals by the pound. More recent used terminals are available from vendors for from under $100 to $300, depending on condition and features. You may get a better deal in a private sale. YMMV. You can even buy a shining new late-model VT510 from DEC: have a look at http://www.digital.com/info/Customer-Update/930913008.txt.html and then call 1-800-DIGITAL. [1998 update: instead of the above, you need http://www.boundless.com/ ] I've seen a low-end terminal server for about $750, but you can pay over $2000 for a full-featured model. [that was in 1996] | Is it even possible? | Is there an "overview" FAQ somewhere? One good source of general clues is on the World-Wide Web: the Stokely Consulting Unix Serial-Port Resources Page: http://www.stokely.com/stokely/unix.serial.port.resources/index.html An entire tutorial on the subject is beyond the scope of this posting. The Stokely Web site is very helpful. Also, you may wish to peruse my Video Terminal Information page: http://www.cs.utk.edu/~shuford/terminal_index.html [you found it!] If you need termcap or terminfo entries, point your Web browser at http://www.ccil.org/~esr/ncurses.html [1999: Eric moved it to this new URL: http://www.tuxedo.org/~esr/terminfo/] [2002: Eric moved it again: http://catb.org/%7Eesr/terminfo/index.html ] -- ...Richard S. Shuford | "It is not good to have zeal without knowledge, ...shuford%cs.utk.edu | nor to be hasty and miss the way." ... | Proverbs 19:2 ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: /////////////////////////////////////////////////////////////////////////// Newsgroups: comp.terminals,comp.sys.ibm.as400.misc,comp.unix.programmer Subject: Re: IBM RS/6000 F1-F24 & universal terminal type recomendations? Summary: handling terminal function keys in diverse environments is a problem Expires: 30 Jun 1996 22:11:33 GMT References: <4ncfet$mbk@news.inc.net> Sender: shuford%cs.utk.edu Date: 1996-05-17 18:22:00 EDT Followup-To: comp.terminals,comp.unix.programmer Distribution: world Organization: University of Tennessee, Knoxville--Dept. of Computer Science Keywords: termcap, terminfo, IBM AS/400, function, keyboard, Unix In article <4ncfet$mbk@news.inc.net>, tehrenre@dataplusnet.com (Tom Ehrenreich) writes: > > We are trying to be an open software developer. > We require [function keys] F1 - F24 for our product because it runs on > the MainFrame, AS/400, and the RS/6000. > > Our goal is that the RS/6000 Unix product be portable to HP Unix systems > as well as the rest, such as DEC etc... > > I need a terminal emulation from a PC to a common terminal type on the > Unix systems that will support F1-F24. and later said: > ...recommendation to develop for the VT100... I'm afraid that, once you step out of IBM's controlled domain, you find a very messy world. The VT100 was the original DEC ANSI-conforming terminal, and it is the most well known, but I don't think you would consider it usable in your application: the VT100 is defined to have only 4 function keys (PF1-PF4), which reside on the numeric keypad. In the VT220 and later models, DEC defined a separate top-row series F1-F20 in addition to retaining keypad PF1-PF4. However, if you want key-for-key identical function in your product when it is running both off an IBM-terminal-type keyboard and a DEC-terminal-type keyboard, you immediately run into the problem that DEC terminals earlier than the VT420 used top-row F1-F4 only for local functions, and these keys do NOT send any data to the host at all. (In the VT420 and VT5x0, these can be set up in "code mode" to send distinctive Escape sequences to the host.) And so far as I am aware, you can't modify these keys with Shift or Control. [Oops... when I wrote this, I forgot that you can use the VT420's DECUDK device-control sequence to program the Shifted function keys to send arbitrary character sequences, which would be very useful in Mr. Ehrenreich's application. See the "vt_keyset.sh" shell script for an example of how to do this. ...RSS] You may decide to try either the Televideo- or Wyse-style terminals, because of their somewhat more orthogonal function-key structure, however, each of these product lines introduces its own set of peculiarities, especially in the display rendering. I suppose you could consider Hewlett-Packard-style terminals, but I don't know much about them, and emulators for them are few and far between. You also may have to supply your customers with the termcap and/or terminfo-database entries appropriate to whatever terminal you end up using, because Unix vendors often don't do very well at supplying accurate termcaps (or terminfo....). You really must read the O'Reilly book on this subject, the description of which follows: ___ ._. . .. ._.. ._.. _.__ ___ ._. . .. ._.. ._.. _.__ ___ ._. . .. ._.. "termcap & terminfo" by John Strang, Linda Mui & Tim O'Reilly 3rd Edition April 1988 270 pages, ISBN: 0-937175-22-6, $29.95 U.S. http://www.oreilly.com/catalog/term/ http://www.amazon.com/exec/obidos/ISBN=0937175226 [ORA catalog description follows] While termcap and terminfo are no longer as important as they once were, due to the growth of the X terminal market and increased standardization among ASCII terminals, handling different terminal types can still be a headache for system administrators. The termcap and terminfo databases are UNIX's solution to the difficulty of supporting many terminals without writing special drivers for each terminal. Termcap (BSD) and terminfo (System V) describe the features of hundreds of terminals, together with a library of routines that allow programs to use those capabilities. This book documents hundreds of capabilities and syntax for termcap and terminfo, writing and debugging terminal descriptions, and terminal initialization. If your bookstore does not have it, the book may be ordered from O'Reilly & Associates, Inc. 103-Aa Morris Street Sebastopol, CA 95472 email: WATS voice: 1-800-998-9938 POTS voice: +1 707/829-0515 POTS fax: +1 707/829-0104 ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.terminals Organization: GTE Government Systems Message-ID: <36804FE6.473E5E9F@GSC.GTE.Com> References: To: Alain Migeon Date: Wed, 23 Dec 1998 02:05:26 GMT From: "Scott G. Hall" Subject: Re: VT100 Alain Migeon wrote: > I need a implement an interface working a VT100 compatible terminal. > > I have the following questions : > - how to control the terminal > - not to echo anything when something is typped on the keyboard > - how to use the arrow keys > - is this to be performed using escape sequencies, or is it with the > use of the ioctl function? I would not concern yourself with any low-level details. I would get a terminal-independant library for your operating system and compiler that has library calls to do eactly what you are asking. Myself, I have always used a library calls "curses". It ships with most UNIX compilers. Years ago I bought a "PC-Curses" from Mortice-Kern Systems (MKS); but in recent years the compiler vendors for MS-DOS/MS-Win have been shipping curses libraries (yes - even for dealing with a terminal on a serial port in MS-DOS!) If you want to muck in the low-level details, download a copy of C-Kermit, and digest the source code and see how it is done. -- Scott G. Hall GTE Government Systems North Carolina Systems Center email: Scott.Hall@GSC.GTE.Com ////////////////////////////////////////////////////////////////////////////// Newsgroups: comp.unix.solaris Path: cs.utk.edu!stc06.ctd.ornl.gov!news.er.usgs.gov!darwin.sura.net !news.fsu.edu!nntp.cntfl.com!imci4!newsfeed.internetmci.com !newsxfer2.itd.umich.edu!news.eecs.umich.edu!gmi.edu!ellis Organization: GMI Engineering&Management Institute, Flint, MI Message-ID: References: <4m2mk2$rmn@rcsuna.gmr.com> Date: 11 May 1996 12:24:48 GMT From: ellis@nova.gmi.edu (R. Stewart Ellis) Subject: Re: Terminal emulation on Solaris 2.4. Brian Beagan, Electronic Data Systems, writes: > > Does anyone know how I can get a SparcServer running Solaris 2.4 to act as a > terminal emulator? Ideally, I would like a program similar to Windows 3.1 > 'Terminal'. I need to hook up a controller to the Sun's serial port and have > a terminal emulator communicate with the controller. The terminal emulators on Solaris are cmdtool/shelltool, xterm, and CDE dtterm, which emulate a Sun console, a DEC VT102, and ANSI X3.64/vt220 (sort of), respectively. You simply run tip in the window and connect to the port. -- R.Stewart(Stew) Ellis, Assoc.Prof., (Off)810-762-9765 ___________________ Humanities & Social Science, GMI Eng.& Mgmt.Inst. / _____ ______ Flint, MI 48504 / / / / / / Web admin: http://www.gmi.edu/ ellis@gmi.edu /________/ / / / / ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Variations on the above: (1) get T.E. Dickey's color "xterm" from http://www.clark.net/pub/dickey/xterm/xterm.html or http://dickey.his.com/xterm/xterm.html (2) run C-Kermit in the window, instead of "tip", with > set line /dev/term/a > set speed 38400 > connect http://www.columbia.edu/kermit/newsn6.html ftp://kermit.columbia.edu/kermit/f/ ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Path: utkcs2!stc06.ctd.ornl.gov!cs.utk.edu!gatech!newsfeed.internetmci.com !news.exodus.net!aimnet.com!news2.aimnet.com!usenet Newsgroups: comp.unix.solaris,comp.unix.sys5.r4,comp.editors,comp.terminals Organization: Common Ground Software, Inc. Distribution: inet Message-ID: <311723BD.1985@commonground.com> References: <310A3956.23B0@commonground.com> <4ei1uh$re4@flonk.uk.sun.com> <4elov0$2q5@kodak.rdcs.Kodak.COM> Date: Tue, 06 Feb 1996 01:47:41 -0800 From: Michael Bennett Subject: Re: vi doesn't restore the terminal (text) in Solaris 2.4 Kevin C Scott wrote: > I'd like to ask a > related question about terminal configuration on Sun systems > (both SunOS and Solaris). It seems that whenever the scrollbar > is active, programs are unable to send out escape sequences to > modify the contents of the screen. For example, when using > tcsh with scrolling enabled, it is seemingly impossible to > use the up/down arrow keys to recall previous commands. Also, > when the scrollbar is active, and I use less to view a file > that happens to be smaller than a screenful, the whole file > flips by instantly and then is immediately erased. Is there > some configuration trick that will allow simultaneously having > the scrollbar active and allowing programs to send out escape > codes to edit the text on the screen? Having such a capability > would make the scrollbar much more useful than it currently is. As another reply pointed out, cmdtool has some nice features that break a lot of other things. If you use xterm (with or without a scroll bar) all these features work fine. Note that you can also use ^P/^N in place of up/down arrows in tcsh, as well as whatever up/down line commands supported by the editor your emulating (emacs or vi). This feature, as well as file completion works better in xterm as well. You can still get programs confused about the size of your terminal with xterm, particularly after a telnet. eval `resize` works on a lot of systems to correct this. I don't know about 'less' - I've hardly used it. I almost never use 'more' any more either - my xterm scroll bar works! (more or less :) -- Michael Bennett ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Date: 30 Sep 1996 15:26:46 GMT From: Mark McCullough Newsgroups: comp.unix.admin, comp.unix.solaris Subject: Re: Arrow keys in tcsh In article <324BD5EC.333C@nexos.com>, Stephen W. Barnett wrote: > > I can use the arrow keys for command recall with tcsh in Openwindows > but the same thing does not work in the CDE. [Common Desktop Environment] > > How can I make the arrow keys work in the CDE with tcsh? Switch to xterm from dtterm. Something seems to be wrong with the dtterm emulator of the arrow keys, but on all systems I've used, xterm works fine. (Oh, it might be cmdterm instead of dtterm for the Suns, sorry.) -- Mark McCullough ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: (this archive stores a small amount of "xterm" information elsewhere) ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.unix.aix Message-ID: <6fh2a5$ore$1@mdnews.btv.ibm.com> References: <6fgnfk$b8c1@news.midusa.net> <351bed6b.0@news1.mid-ga.com> <351C09E2.7EA1@musicland.com> Date: 27 Mar 1998 20:31:01 GMT From: Christian Bauernfeind Subject: Re: Useing the up arrow on command line prompt. H. Blakely Williford wrote in message <6fgnfk$b8c1@news.midusa.net>... >I did not find this in the faq or on a usernet search; but I've seen this >some where before. > >How do you get AIX to display the previous command/s by pressing the up arrow? In article <351C09E2.7EA1@musicland.com>, John Jaszczak writes: > Bill Dyer wrote: > Just a little clarification of this message. > 1) You must be using ksh > 2) export EDITOR=vi (set this in your .profile > 3) is back one is forward one > Wrong on 2). It's set -o vi. My .profile has set -o emacs # Map cursor keys alias __A='^P' alias __B='^N' alias __C='^F' alias __D='^B' alias __H='^A' alias __P='^D' which doctors cursor keys, home and del. YMMV Christian -- Christian Bauernfeind Not speaking for Siemens ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.protocols.kermit.misc Path: cs.utk.edu!gatech2!udel!gatech!psuvax1!news.math.psu.edu!news.cac.psu.edu !newsserver.jvnc.net!newsserver2.jvnc.net!howland.reston.ans.net !newsfeed.internetmci.com!chi-news.cic.net!news.wctc.net!spcuna !news.columbia.edu!watsun.cc.columbia.edu!fdc From: fdc@watsun.cc.columbia.edu (Frank da Cruz) Subject: Re: Backspace don't work? Date: 14 Dec 1995 16:00:21 GMT Organization: Columbia University Lines: 143 Message-ID: <4aphml$j73@apakabar.cc.columbia.edu> References: <4aeic5$pf1@mercury.IntNet.net> NNTP-Posting-Host: watsun.cc.columbia.edu In article <4aeic5$pf1@mercury.IntNet.net>, Jeff Tomich wrote: > > When I'm at my unix shell prompt the backspace doesn't work, although it > works fine when I'm in my mail reader, etc... From the Kermit FAQ: http://www.columbia.edu/kermit/faq.html ftp://kermit.columbia.edu/kermit/faq.txt 5. MY BACKSPACE KEY DOESN'T WORK! . Newsgroups: comp.protocols.kermit.misc . Date: 7 Jan 1995 21:26:44 GMT . Organization: Columbia University . From: fdc@columbia.edu (Frank da Cruz) . Subject: Re: [?] Backspace key says, "^?" In article , Jim Monty wrote: > > DISCLAIMER: I've looked for the answer to the following question in > _Using MS-DOS Kermit_ and in the documentation included with MS-DOS > Kermit 3.13. I either couldn't find the answer or didn't understand > it if I did. > Thank you for consulting the documentation. > I'm using MS-DOS Kermit 3.13 on an i80386SX machine running MS-DOS > 6.0, using a 14,400 bps Zoom VFP V.32bis modem. Kermit is set for > VT220 terminal emulation and is using the Latin1 character set and > code page CP437. I've not mucked with much in the initialization > files, so you may assume that any other parameters are still set to > the "factory" defaults. > > Alas, the question: In some online environments, my backspace key > behaves as one would expect it to. In others, hitting the backspace > key results in either (1) nothing happening, or (2) the characters > "^?" appearing on the screen. I can, however, use Ctrl-H in these > situations. In these exact same online environments (e.g., vi > insert mode when connected to my dial-up UNIX shell account) under > analagous circumstances, the other terminal emulator that I use, > Telemate Version 3.12, does not behave this way. The backspace key > functions as a destructive backspace. > > I presume that the change I need to make to my MS-DOS Kermit > configuration is a simple one, but I can't figure it out. And I've > never really wanted to bother to spend a lot of time trying to > figure it out myself. (I want the magic straight from the wizards' > minds.) Thanks, in advance, for taking the time to help me. > > Jim Monty, Kermit Cheerleader at Arthur Andersen LLP > Well, Jim, I think it's finally time to classify this as a Frequently Asked Question and add it to the FAQ (kermit.columbia.edu:kermit/FAQ.TXT). As you have discovered, different hosts and applications use different characters (or sequences) for destructive backspace. The terminal emulator, Kermit or otherwise (including Telemate--if its backspace key works for you in all circumstances, I think that's just a stroke of luck), has no way of knowing what host or application you are using, and therefore no way of knowing what to send when you press the Backspace key. Of course, Kermit's Backspace key must send *something* "out of the box", so it uses one of the several most likely destructive backspace values, and in fact the one that is *defined* in ASCII to be destructive backspace, namely Rubout, also known as Delete or DEL, character number 127, which sometimes is displayed as "^?". Lest anyone believe this is a frivolous choice, I quote from American National Standard X3.4-1977, Section 5.1, Control Characters: 0/8 BS (Backspace). A one-active-position format effector that moves the position backward on the same line. 7/15 (DEL). A character used primarily to erase or obliterate an erroneous or unwanted character... In cases where the default does not work, Kermit lets you redefine the Backspace key (or any other key) to send whatever you want it to send (or to take any other actions) with the SET KEY command. The SET KEY command has two operands: a unique identifier for a key or key combination, called a scan code, and the value or action to be assigned to the key. Scan codes are written with a preceding backslash (\). The scan code for the Backspace key is \270. The default definition for this key is \127, meaning the character whose numeric value is 127, i.e. DEL. You can find out a key's scan code by consulting Table I-9 in the manual (pages 285-288), or by giving the SHOW KEY command to Kermit and then pressing the desired key or key combination. Now, as you have discovered, some applications use Ctrl-H -- ASCII BS (Backspace) -- for destructive backspace. Consulting the ASCII table on page 275, you see that the ASCII code for BS is 8. So to make PC's Backspace key send BS instead of DEL, give this command: SET KEY \270 \8 If you use Kermit only to connect to hosts and services that use BS for destructive backspace, then you can put this command in your MSCUSTOM.INI file, and it will take effect automatically every time you start Kermit. But some people (like yourself) switch between different hosts and/or services that expect different characters or sequences for destructive backspace. You can, of course, give Kermit the appropriate command every time you switch from one to another: SET KEY \270 \8 ; Backspace sends BS or: SET KEY \270 \127 ; Backspace sends DEL or you can use the macros that are already defined in MSKERMIT.INI for this. In version 3.14, for example, we have macros with names like VAX and IBM. The VAX macro sets things up (including the Backspace key) for communicating with VAXes and VAX-like systems, and that means, among other things, setting the Backspace key to send DEL. The IBM macro, on the other hand, is used for communicating with IBM mainframes in linemode, where BS is used. You can use these macros as they are, or you can write your own macros based upon them and add them to your MSCUSTOM.INI file. To use a macro, just type its name at the MS-Kermit> prompt. Suppose, for example, you normally access two different systems: a BBS (which uses 8-bit characters, ANSI terminal emulation, and BS) and a UNIX system (which uses 7-bit characters, VT220 emulation, and DEL), and these items need to be changed when you switch between the two. You could write two macros such as these: define bbs set term byte 8, set term type ANSI, set key \270 \8 define unix set term byte 7, set term type vt220, set key \270 \127 And then each time you want to use the BBS, you just type "bbs" at the MS-Kermit> prompt, and each time you want to access the UNIX system, you type "unix". Of course, you could take this process even further, and turn the BBS and UNIX macros into complete connection-establishment and login scripts, following the directions in Chapter 14 of the manual, on script programming. - Frank ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: If you want to know exactly what ASCII codes the computer is seeing when you type a given key, try using the "od" utility, available in many variants of Unix, including Solaris. Here the "od" command is given with arguments that tell it to use hexadecimal radix and notice usual codes, then the VT220 "PF1" key is struck, followed by carriage return and Control-D. % od -x -c ^[OP 0000000 1b4f 500a 033 O P \n 0000004 % ////////////////////////////////////////////////////////////////////////////// Newsgroups: comp.unix.solaris Message-ID: Date: Tue, 11 Nov 2003 17:45:41 +0000 From: piano.tuner@virgin.net Subject: Backspace At Login Puzzle Hi all, From Telnet or a terminal emulator, our Solaris boxes want *? (DEL) for backspace when logging in (e.g. password/username typo). After login, they're happy with ^H (which I prefer to be the standard across our systems). Obviously once logged in, I can use stty erase to affect behaviour, or add to .profile or .login, but how do I configure this 'pre-login' behaviour without having to change emulators, Telnet config etc? Our old Unixware boxes didn't display this characteristic using same emulator or Telnet. I thought gettytab sounded promising, but that's not recognised by these boxes - any equivilant? Many thanks! Shaun. .............................................................................. Newsgroups: comp.unix.solaris Message-ID: References: Date: Tue, 11 Nov 2003 19:55:46 -0600 From: Barton Fisk Subject: Re: Backspace At Login Puzzle On Tue, 11 Nov 2003 17:45:41 +0000, wrote: > > I thought gettytab sounded promising, but that's not recognised by > these boxes - any equivilant? ---------disclaimer: do this at your own risk----------- You may modify the /kernel/drv/options.conf file and replace "7f" with"8". For example, modify - ttymodes="2502:1805:bd:8a3b:3:1c:7f:15:4:0:0:0:11:13:1a:19:12:f:17:16"; to ttymodes="2502:1805:bd:8a3b:3:1c:8:15:4:0:0:0:11:13:1a:19:12:f:17:16"; Reboot. ------------a Better way---------------------- Install an ssh server (openssh) and download a free client like PuTTY or better yet, buy Secure CRT from VanDyke and distribute to your users. Configure public key authentication or use passwords. Say goodbye, to username/password typing manually, and sending passwords in the CLEAR. OMT, there is an SSH server bundled with Solaris 9. -- Barton Fisk, SCNA SCSA ////////////////////////////////////////////////////////////////////////////// Newsgroups: comp.protocols.kermit.misc,comp.unix.osf.osf1 Path: cs.utk.edu!gatech!newsfeed.internetmci.com!in2.uu.net!news.new-york.net !news.columbia.edu!watsun.cc.columbia.edu!fdc Date: 1 Feb 1996 15:42:49 GMT From: fdc@watsun.cc.columbia.edu (Frank da Cruz) Organization: Columbia University Subject: Re: MS Kermit 3.14 and Digital Unix 3.2 coexistence Message-ID: <4eqn1p$gv0@apakabar.cc.columbia.edu> References: <1996Jan31.120633.134971@forest> In article <1996Jan31.120633.134971@forest>, Mike Richichi, Systems Manager wrote: : : We're getting a weird interaction between Kermit 3.13 and 3.14 and our : newly installed Digital Unix 3.2C system. : : First, if you telnet to the system, it spews out "Bad termcap entry" : twice on the screen before giving you the "login:" prompt. This happens : no matter what kind of host or PC you're telnetting from. When you log : in, the "Bad termcap entry" message is repeated on login (I assume in : the tset -I -Q) and the TERM variable is blank. When you TELNET from Kermit, Kermit negotiates the ability to send its terminal type to the Telnet server, and then if the Telnet server asks for the terminal type, Kermit sends it. Kermit's default terminal type is VT320. Some systems don't have a termcap entry for VT320. So either change Kermit's terminal type or add a VT320 termcap entry. You can also instruct Kermit to "lie" about its terminal type by using the "set telnet term-type" command. : Secondly, no matter how you connect to the machine, doing a more or a : man causes the status line to be overwritten with more's prompt (usually : an inverse video "stdin") each page. I did a "set term debug", and : Dig. Unix is addressing the 25th line, sure enough. A "stty rows 24" : doesn't fix the problem either, but a "stty rows 23" does. This is a new feature of Digital UNIX, and it is a strange one considering Digital is also the original designer and maker of the VT terminal series. Of course all that is long forgotten. They think you are using a xterm or something. : The "bad termcap entry" message really annoys me, the more thing at : least has a workaround, but I still think that if Unix thinks your : display is 24 lines it shouldn't be writing to the 25th. Exactly. - Frank ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Q. The host reports "Unknown terminal type DEC-VT100" A. UNIX machines cannot use the RFC-standard terminal name of a DEC-VT100. Rename the reported emulation name in the emulation settings to "vt100" or type: setenv TERM vt100 in the remote shell--if you use csh or tcsh. For sh, ksh, zsh, and maybe also bash and zsh type: TERM="vt100"; export TERM or TERM="vt100" if the shell is set to auto-export. (Info from Peter Zander and Michael Thornberry.) ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.unix.admin Path: utkcs2!stc06.ctd.ornl.gov!novia!newsfeed.nacamar.de!howland.erols.net !infeed2.internetmci.com!newsfeed.internetmci.com!news.telstra.net !act.news.telstra.net!loomi.telstra.net!not-for-mail Message-ID: <01bc9714$f92ac0c0$0211010a@pc30346.alintagas.com.au> References: <33D54705.79E6@mktdev.com> NNTP-Posting-Host: alinta-102.alintagas.com.au Organization: AlintaGas Date: 23 Jul 1997 03:04:37 GMT From: "Gunter Muller" Subject: Re: C shell #@!$%@$^@&@ X-Archive-Subject: [setting terminal type for C shell users] Chris Donnelly wrote in article <33D54705.79E6@mktdev.com>... > Can anyone tell me how to read input > from the keyboard in the c shell? > > like in sh you > > echo 1. vt100 > echo 2. wy60 > read answer The following c-shell code will do the job: set answer = $< "man csh" reads: $< Substitutes a line from the standard input, with no further interpretation thereafter. It can be used to read from the keyboard in a C shell script. See 'man csh' for further explaination of c-shell scripting command etc. Alternatively, you could also use the 'line' command: set answer = `line` # see 'man line' > Yes I have RTFM. > It looks like the c shell has no provision for this. > And why do I want to use the c shell? > Because I just started here and that is the default shell for all the users. > And I need to set their terrminal type in .login on SunOS 4.1.4 If in /etc/ttytab the terminal type is set correctly for each serial port, the user should not need to select a terminal type. If the serial terminals are connected to a network terminal server, when set the default terminal type for each port in the terminal server. Having done this, you could also use the 'tset' command in .login. Thus: set noglob set nterm = (`tset -m dialup:\?vt100 -m unknown:\?vt100 -r -Q -`) if ($status == 0) set term = $nterm unset nterm noglob This will only prompt the user if the default terminal type is 'dialup' or 'unknown'. See 'man tset' for further options. > > I tried doing #! /bin/sh at the top of the > login script but it is ignored Hope this helps ... Gunter. [While you are at it, ask your sysadmin to provide a more friendly shell for your users, such as ksh or tcsh. But trying to write scripts for the C shell has been deprecated elsewhere. ...RSS] ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Date: Sat, 01 Apr 1995 00:49:22 +0000 From: Michael Dillon Subject: Re: Printing to "Attached-to-Ansi" Message-ID: In-Reply-To: X-Mailing-List: bsdi-users > I also would be interested to know of any native command that sends output > to a "terminal's" attached printer port. Years ago, when I was working with > DIGIBOARD hardware and SCO UNIX, each /dev/tty?? had an associated /dev/pty?? > (I believe it was pty??. Can't remember for sure.) that was the attached > printer. Simply writing to the pty device sent data to the printer. It was > nice. One could even continue working on the tty device while printing > progressed -- the board or the OS switched back and forth automatically so > that you didn't notice. As a simple work around, and only for ANSI/VT100 > emulations, use the following /bin/csh code snip: The way this device driver worked is: it would send a printer ON command, then about 32 bytes of data, then a printer OFF command, and then it would pause a bit--before doing the same thing again. On a dot-matrix printer with real-world speed between 2400 bps and 4800 bps, this would only slow down printing a bit, but would give almost normal response on the terminal. I believe this could ONLY be implemented in a device driver, since any terminal output would have to be held back while the printer was turned on. > --------------------cut here > printf "\033[5i" > cat $1 > printf "\033[4i" > --------------------cut here This is just about all that the "lpansi" program from the Lynx distribution does. [Using the DEC VT102 printer-on/off codes...] Michael Dillon C-4 Powerhouse, RR #2 Armstrong, BC V0E 1B0 Canada Fido: 1:353/350 ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.terminals Path: utkcs2!stc06.ctd.ornl.gov!fnnews.fnal.gov!uwm.edu!news-res.gsl.net !news.gsl.net!news.mathworks.com!newsfeed.internetmci.com !usenet.eel.ufl.edu!news.ultranet.com!xylogics.com!xylo!not-for-mail Date: 16 Jul 1996 07:02:25 -0400 From: carlson@xylogics.com (James Carlson) Subject: Re: VT100 Organization: Xylogics Incorporated Message-ID: <4sfss1$aea@newhub.xylogics.com> In article <4se653$rqj@netnews.upenn.edu>, cchong@red.seas.upenn.edu (Christopher C. Hong) writes: |> |> I have a question about VT100. I thought that it was a fixed size (80x24) |> and that it was not possbile to resize your window. However, I am using |> EWAN right now, a winsock telnet client. When I resize the window to any |> size and then refresh the screen, the display readjusts to fit the window. |> So I can get sizes that I thought were only possible in Xterm. |> Does anyone know how this is possible? Telnet and rlogin have special protocol messages that allow them to inform the host that the screen size has changed (RFC 1073 for TELNET NAWS, and RFC 1282 for rlogin). Real DEC VT100s are 80x24, of course, but the ANSI-based protocol they use allows any number of rows or columns. -- James Carlson Tel: +1 617 272 8140 Annex Interface Development / Xylogics, Inc. +1 800 225 3317 53 Third Avenue / Burlington MA 01803-4491 Fax: +1 617 272 2618 ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.terminals Path: cs.utk.edu!gatech!ncar!noao!ennfs.eas.asu.edu!cs.utexas.edu!uwm.edu !news-res.gsl.net!news.gsl.net!news.mathworks.com !newsfeed.internetmci.com!vixen.cso.uiuc.edu!usenet Date: 21 Jul 1996 22:03:29 GMT From: "Paul A. Kennedy" Organization: University of Illinois at Urbana Message-ID: <4su9fh$gfk@vixen.cso.uiuc.edu> References: Subject: Re: wyse 50 and linux pc jcresawn@pcs.cnu.edu (J. Ryan Cresawn) wrote: >I have recently acquired a Wyse 50 terminal and have connected it to >my Linux box via a serial cable. Everything works great except directory >listings. When I type "ls" all the file names run together. The getty >settings look like this. > >/sbin/getty ttyS1 DT19200 wy50 > >I would really appreciate any assistance anyone may offer. Thanks a lot. You might try taking a look at the alias for ls. On a couple of installations that I have seen (Slackware, I think), ls is aliased to something like: /bin/ls $LS_OPTIONS I would wager that the colour ls stuff is messing you up. Try to unalias ls first, or just try /bin/ls and see what happens. Hope this helps. Paul -- Paul A Kennedy pakenned@uiuc.edu Finger at pandora for PGP 2.6 public key. pkennedy@pandora.physics.calpoly.edu ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.unix.admin Path: utkcs2!stc06.ctd.ornl.gov!fnnews.fnal.gov!cbgw1.att.com!cbgw3.att.com !news.PBI.net!decwrl!enews.sgi.com!news.sgi.com!csulb.edu!news.uoregon.edu !news.rediris.es!news.unizar.es!root From: "J.A. Gutierrez" Date: Mon, 12 Aug 1996 17:56:38 +0200 Message-ID: <320F5436.41C6@daphne.cps.unizar.es> References: <320BC9A4.61D9@us.checkpoint.com> Subject: Re: Solaris 2.5: ex Unknown terminal type ? Rohit Aggarwal wrote: > > I am using Solaris 2.5 and when I use EX > I get "Unknow terminal type". > Any clues as to what is the problem/fix for this. > I guess you are using Solaris 2.5 with CDE and dtterm, right? I had the same problem and I fixed it by adding the dtterm entry to /etc/termcap (you can get it from `infocmp -C dtterm`) -- J.A. Gutierrez E. / http://www.cps.unizar.es/~spd ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.unix.solaris Path: utkcs2!stc06.ctd.ornl.gov!cs.utk.edu!news.msfc.nasa.gov!news.sgi.com !spool.mu.edu!howland.erols.net!EU.net!sun4nl!ahx!paul From: paul@wau.mis.ah.nl (Paul Slootman) Message-ID: Date: Wed, 18 Sep 1996 19:22:48 GMT References: <51lrbp$l3u@news.cict.fr> Organization: Albert Heijn Winkelautomatisering, Zaandam the Netherlands Lines: 23 Subject: Re: vi & xterm novice user J-Luc BOICHARD wrote: >new user of SUNOS I search to obtain the ouput of iso-latin character >in vi in a xterm emulator not in octal value. > > ex: when I stroke the eacute key I obtain \151 in VI but > the eacute output is correct in emulator shell command line Try doing this first: LC_CTYPE=iso_8859_1; export LC_CTYPE This tells the system you are capable of displaying all the characters in that ISO font. This works fine on Solaris 2.4... Posted and mailed. Paul Slootman -- Murphy Software, Enschede, The Netherlands | ... It beeped and said work: paul@wau.mis.ah.nl / paul@murphy.nl | "Countdown initiated." home: paul@wurtel.demon.nl | Is that bad? ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.terminals Path: utkcs2!cs.utk.edu!not-for-mail From: shuford%cs.utk.edu (Richard Shuford) Date: 14 Aug 1996 13:11:51 -0400 Organization: University of Tennessee, Knoxville--Dept. of Computer Science Expires: 30 Sep 1996 22:11:33 GMT Message-ID: <4ut1cnINN8ou@duncan.cs.utk.edu> References: <320AA011.10A7@otech.otech.co.kr> Summary: SOCK_KEEPALIVE or timeout Keywords: TCP/IP, Telnet Subject: Re: [Q] How to terminate telnet when an user power down his PC. In article <320AA011.10A7@otech.otech.co.kr>, Yong Tae Kim writes: > > >Help me please. >My problem is that telnet session is not terminate automatically >when an user who connected to UNIX merchine via telnet program >powers down his/her PC without logging out. >How can I terminate the telnet session having no owner ? >Please help me. > >E-Mail : ytkim@otech.otech.co.kr As somebody else noted, you can handle a single case of this via % kill -9 The fundamental problem is to get some type of status information back to the Unix machine. Since telnet connections don't have a DTR wire (RS-232 signal) accompanying them, there can be difficulty. And, in TCP/IP, it is considered a desirable feature that the physical link can be temporarily lost without the session being terminated. Some (but not all) implementations of TCP/IP allow a connection option "SOCK_KEEPALIVE". This periodically polls the other end of the connection to see if it is still alive. You might try to find out if you can use this. Otherwise, you'll have to arrange for the login session to be timed out after some period of inactivity. (Without knowing which Unix version you have, one cannot say exactly how to achieve this.) -- ...Richard S. Shuford [Update: one resource that may help, for several Unix flavors, is "idled". http://www.dimensionx.com/people/crider/idled/ ...RSS] [2002 update: Alas, the author of "idled" has been absorbed! However, the last known version is yet available on the Internet: http://www.darkwing.com/idled/ or ftp://ftp.cs.hope.edu/pub/idled/ ...RSS] ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Date: Sun, 16 Feb 1997 16:04:45 -0500 From: "Richard L. Hamilton" Newsgroups: comp.sys.ibm.pc.hardware.misc, comp.sys.ibm.pc.hardware.systems, comp.sys.ibm.pc.misc, comp.os.linux.hardware, comp.unix.solaris Subject: Re: Sun-style UNIX keyboard for the PC (?) Mark Aitchison wrote: [...] > Keytronics used to make zillions of different types, DEC made VT200 > style alternative keyboards, and Wyse (I think) made PCs with as many > different keyboards as their terminals had. It is a great pity there > doesn't seem to be as much variety in keyboard layouts now (I guess > because mass production means special keyboards push the total system > price up those extra few dollars that makes the whole thing > uncompetitive for low-margin distributors). It is a pity that keyboard > technology has gone backwards. [...] The one good thing about less variety (or more accurately, a *single* keyboard layout available for various systems) is that what many people seem to hate worst about switching systems is learning a different keyboard. If there were a small number of keyboard layouts (probably max 3 to 5), that were uniform (and uniformly reprogrammable) across manufacturers, that might not be exactly to anyone's liking as much, but at least they'd only have to learn one keyboard layout rather than whining and moaning about learning new ones. With suitable software (CDE, for example), the keyboards are the main thing that from the user's perspective keep a heterogenous mix of systems from being reasonably decent to work with. (From an administrator's point of view, too heterogenous a mix of systems is, and will probably remain for some time, a heck of a lot more work, but nobody ever listens to SA's anyway.) -- mailto:rlhamil@mindwarp.smart.net http://www.smart.net/~rlhamil ////////////////////////////////////////////////////////////////////////////// ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....:... CDE FAQ: http://www.laxmi.net/cde.htm Solaris CDE User's Guide http://docs.sun.com:80/ab2/coll.8.41/CDEUG/@Ab2TocView?Ab2Lang=C&Ab2Enc=iso-8859-1 Solaris CDE Advanced User's and SysAdmin's Guide http://docs.sun.com:80/ab2/coll.8.41/CDEADMIN/@Ab2TocView?Ab2Lang=C&Ab2Enc=iso-8859-1 ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....:... ////////////////////////////////////////////////////////////////////////////// Path: utkcs2!stc06.ctd.ornl.gov!cs.utk.edu!news.msfc.nasa.gov!news.sgi.com !news.mathworks.com!news.PBI.net!samba.rahul.net!rahul.net!a2i !news.vbc.net!news.mira.net.au!news.mel.connect.com.au !news.ade.connect.com.au!news.adelaide.on.net!highlander.senet.com.au Date: Sun, 29 Sep 1996 19:07:49 +0930 From: Chris Foote Newsgroups: comp.os.linux.setup,comp.unix.admin Organization: South Australian Linux Users Group Message-ID: <324E436D.76F9D13D@salug.org.au> Subject: Re: Serial line dial-in problem In message <324B8B49.1924@bisnews.co.th>, kulawat@bisnews.co.th wrote: > I use Linux 1.2.8 with my server and I have some problem > with serial line dial-in. > > Sometimes when I dial to the serial line. > It already connected but no login prompt anymore! > (It sometimes works) > > Serial configuration of my /etc/initab is > > # Serial lines > s1:12345:respawn:/sbin/agetty -h 38400 ttyS0 vt100 > s2:12345:respawn:/sbin/agetty -h 38400 ttyS1 vt100 I don't know the answer to you problem, but I would suggest moving over to mgetty+sendfax instead of using 'agetty'. It works much better for answering calls from a modem. You can get it from: ftp://sunsite.anu.edu.au/pub/linux/system/Serial/ Latest stable version: mgetty+sendfax-0.98.tar.gz -- Chris Foote SALUG South Australian Linux Users Group http://www.salug.org.au e-mail chris@salug.org.au Support Free Software! ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.unix.aix Path: utkcs2!stc06.ctd.ornl.gov!fnnews.fnal.gov!uwm.edu!cs.utexas.edu !howland.erols.net!EU.net!sun4nl!news.eur.encompass.com!Leiden.NL.net !chagall.cti-software.nl!news From: pim@chagall.cti-software.nl (Pim Zandbergen) Subject: Re: Curses and Wyse terminals Date: 4 Nov 1996 15:39:29 +0100 Organization: CTI Software BV, The Hague, the Netherlands Message-ID: <55kv71$2tv@chagall.cti-software.nl> References: <55d04j$8p8@news3.realtime.net> grjohn@bga.com (Glen Johnson) writes: > >Wyse terminals seem to return a 0x0a both for the enter key and for the >down-arrow key. How do I distinguish which was pressed using curses? No, the Enter key returns 0x0D (carriage return), but the tty driver translates it to 0x0A. Use nonl() in curses to turn off the translation. -- E-mail : Pim Zandbergen S-mail : Laan Copes van Cattenburch 70, 2585 GD The Hague, The Netherlands Phone : +31 70 3542302 Fax : +31 70 3512837 ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: http://www-archive.stanford.edu/lists/sun-managers/hyper95/2931.html ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Date: 07 Nov 1996 12:49:18 +0000 From: Jon Care Newsgroups: comp.sys.sun.admin Subject: Re: Using a VT terminal as a console... >>>>> "R" == R A Milowski writes: In article <54toh8$9rm@gold.tc.umn.edu> milor001@gold.tc.umn.edu (R A Milowski) writes: R> This should have been simple but... I am trying to use a VT220 R> terminal as a console for a sparc 10. I set the eeprom R> parameters as such: R> setenv output-device ttya setenv input-device ttya R> The machine boots fine, but nothing shows on the console and I R> get no console login. R> Any ideas? R> Is there some way I can test that these terminals work and are R> configured correctly? I suppose I could setup a login monitor R> (like getty) on the ttya port, but I don't want to interfere R> with the console--or whatever is happening now with the R> console. Have you checked that you have the terminal working at the right speed? 9600 8N1 is usually what is set in the eeprom. Also, have you checked that pin's 2 & 3 don't require swapping over? Try popping a reverser in the serial link. [ARCHIVER'S NOTE: This "reverser" item may also be called a "null modem". It compensates for the fact that RS-232-C devices come in two flavors, DTE and DCE; each wants to talk to the other kind, not to its own kind.] -- Jon Care, Sun Microsystems European Networking group. ++44 1276 20444 If you aren't part of the solution, you're part of the precipitate. ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....:... See the illustrated Sun Serial Control How-To instruction: http://www.obsolyte.com/sunFAQ/serial/ ////////////////////////////////////////////////////////////////////////////// ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....:... Path: utkcs2!stc06.ctd.ornl.gov!fnnews.fnal.gov!uwm.edu!cs.utexas.edu !howland.erols.net!newspump.sol.net!www.nntp.primenet.com!nntp.primenet.com !news.texas.net!news.sprintlink.net!news-fw-6.sprintlink.net !newton.hlthsrc.com!matusij@hlthsrc.com Newsgroups: comp.databases.pick Date: Wed, 11 Dec 1996 10:33:06 -0800 Organization: Healthsource, Inc. Message-ID: <32AEFE62.1B6B@hlthsrc.com> References: <19961211005000.TAA04602@ladder01.news.aol.com> From: Mark Greene Subject: Re: Universe (Term Types) dmbearden@aol.com wrote: > > Help! > I am trying to configure a PC running W95 using WRQ Reflections2 talking to > Universe 8.3.3.1 (Whew, that's a mouthful). My problem is in the > emulation mode. I can't seem to get the reflections system to act like my > dumb terminals (which are Wyse 50's). Here's the specs: > > PC: > emulating a vt220. Term type is vt220 in HPUX as well as Universe. > > Wyse50 - HPUX and Universe are both wy50 > > What happens is that when I print @(31) in basic, I am getting a line feed > as well as a carriage return. This also happens if I print anything in > column 80 on the terminal. > > The Wyse 50 is handling all of this properly. > Anybody have any idea how to configure Reflections to emulate a Wyse 50? It just so happens that we went through the same process recently! Keep in mind that you have to sync all the pieces: Reflection, Unix, and Universe. Here's a list of what we did: Reflection setup: Terminal: newline off Display : Jump=2; AutoWrap on Keyboard: Backspace sends a backspace (not delete) Unix setup: term=vt220 stty chagnes: -ixany altwerase -iexten Universe setup: PTERM changes: CASE NOINVERT WERASE ON REPRINT ON SWITCH OFF QUIT OFF EOF OFF CRMODE NOICRNL BREAK OFF (This is done in the UV.LOGIN paragraph in the VOC in the UV account). We also loaded a keyboard map in Reflection to remap the arrow keys and some of the F-keys to mirror the Wyse keys (things like the arrows were, unfortunately, hardcoded into our application). Hope this helps. MJG ////////////////////////////////////////////////////////////////////////////// As of fall 2001, WRQ has technical notes on mapping the Backspace key in the Reflection X product (X server/display): The general Unix case: http://support.wrq.com/techdocs/3001.html RedHat Linux: http://support.wrq.com/techdocs/1516.html ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Date: 11 Jan 1997 17:00:45 GMT From: "T.E.Dickey" Newsgroups: comp.unix.solaris Subject: Re: ! NEED HELP FOR CURSES ! tony lu wrote: : : I am porting a curses program to SUNOS5.4, problem is when I link aginst : /usr/ucblib/libcurses.a there are some functions not defined in that's the "wrong" library. Solaris puts its ".a" libraries in /usr/ccs/lib. But normally you'll use the shared libraries, and not have to worry about what directory they're in. : libcurses.a, and I can not find them in local directory or /usr/lib . (i.e : beep , echo ..etc.). : Is there any other lib should I link when you link aginst libcurses ? -- Thomas E. Dickey dickey@clark.net http://www.clark.net/pub/dickey (old) http://dickey.his.com/ (new) ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Mr. Dickey makes a "curses development kit" available on the Internet: http://dickey.his.com/cdk/cdk.html ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.sys.hp.hpux References: <351244A1.1BCE@nspuh.cz> Message-ID: <01bd554a$f63d5f40$ed3a868b@seymours> Date: 22 Mar 98 04:30:44 GMT From: Shane Seymour Subject: Re: curses in HP/UX 10.20 Michal Hajek wrote in article <351244A1.1BCE@nspuh.cz>... > Hi, > > I wrote program under HP/UX 9.04, which uses curses and term. > When compiled under 9.04, it works correctly under both > 9.04 and 10.20. The first thing to note is that libcurses is X/Open curses at 10.x not (what I prefer to call) classic curses. To make a program successfully work with X/Open curses you need to define _XOPEN_SOURCE_EXTENDED when compiling. If you need to use classic curses you need to link with libHcurses at 10.x. Note that 11.00 X/Open curses is the only 64bit curses library. In 32- or 64-bit mode it is the default definition that is included when you #include . There's an #ifdef to allow classic curses (forgotten what you have to #define) to be included. Shane ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.sys.hp.hpux Message-ID: <6rgr5f$a8o$2@callisto.clark.net> References: <903585650.405273@optional.cts.com> Date: 20 Aug 1998 09:44:15 GMT From: "T.E.Dickey" Subject: Re: curses on HPUX 10.10 Lee Slaughter wrote: > > I posted earlier about the curses initscr() call. > The curses.c from o'reilly runs on Linux and > unixware but hangs on HPUX. I haven't a clue. > As I said before cscope, a curses program, > ran fine on 9.x Are you linking with the default curses, or with the color-curses? The former library, I'm told, is distributed in an unusable form (though patches may be available). -- Thomas E. Dickey ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.terminals Followup-To: comp.terminals,comp.unix.admin,comp.unix.programmer, comp.unix.questions,comp.unix.sco,comp.unix.sco.misc, comp.unix.xenix.misc,comp.unix.xenix.sco Path: utkcs2!stc06.ctd.ornl.gov!news.he.net!uwm.edu!news-peer.gsl.net !howland.erols.net!europa.clark.net!news.clark.net!explorer2.clark.net Message-ID: <5jkm44$t6t@clarknet.clark.net> References: <33563A9E.641D@hp9k.lag.itesm.mx> <5jj2ip$e91@chleuasme.francenet.fr> Date: 23 Apr 1997 09:52:04 GMT From: T.E.Dickey Subject: Re: Termcap VS Terminfo In comp.terminals Frederic MARAND wrote: : > : > Applications typically only support either terminfo or termcap, never both. : : Some versions of VI do support both ! I found that out when I remove a : terminfo definition to work on it and VI still worked: it only ceased : working when I also removed the termcap. I'm not sure of the OS, but I : think it must have been on AIX 3.1.3. Also, applications built with ncurses DO support termcap (but I don't recommend relying on it, since when it falls back to termcap, it still creates a shadow terminfo directory) -- Thomas E. Dickey dickey@clark.net http://www.clark.net/pub/dickey ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.terminals Path: cs.utk.edu!news.msfc.nasa.gov!sgigate.sgi.com!swrinde!ihnp4.ucsd.edu !newshub.nosc.mil!news!owen From: owen@nosc.mil (Wallace E. Owen) Subject: Re: How do you hook a dumb terminal to a PC? Message-ID: <1996May15.170413.20709@nosc.mil> Keywords: Linux, terminal server, serial communication Organization: NCCOSC RDT&E Division, San Diego, CA References: <4jq536$egp@stratus.skypoint.net> <4kc3c4INNft5@duncan.cs.utk.edu> Date: Wed, 15 May 1996 17:04:13 GMT In article <4kc3c4INNft5@duncan.cs.utk.edu>, Richard Shuford wrote: > >In article <4jq536$egp@stratus.skypoint.net>, > jhoglund@skypoint.com (Jamie Hoglund) writes: >> >> I'm very clueless about this, but I'd like to hook some terminals >> on my linux machine. I really don't know where to look for information >> on how to do this. Could someone give me a general overview of what is >> involved? > >>What do I need on the computer? >> Presumably some 'Black Box' that the terminals hook into, and tells the >> system what terminal is where. What is this called? (I'm not talking about >> serial ports, I don't think. The terminals have to be some distance from >> the machine) > >Your "black box" is called a Terminal Server. There are many vendors >for these, including Cisco, Xyplex, Livingston, Xylogics, Lantronix, and >even DEC. ... much deleted ... Just plug it into the back of your PC on a spare serial port, using a null-modem cable (2-3, 3-2, 5+6-20, 20-5+6, 4-5, 5-4, 7-7 on 25-pin rs232). Forget all that terminal server stuff 'till you need more than a couple of terminals. +-------------------------------------------------------+---------------------+ | "I can see nobody, sire.", the bowman said. | Wally Owen | | "I only wish I had such eyes," the King remarked in a | VisiCom Laboratories| | fretful tone. "To be able to see nobody? And at that | (619) 457-2111 | | distance, too! Why, it's as much as I can do to see | 457-0888 Fax | | real people by this light!" | owen@cod.nosc.mil | +-------------------------------------------------------+---------------------+ ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Date: 3 Feb 1997 10:12:47 GMT From: "Brian S. Craigie - Unix SA - NEC - Scotland" To: Tim Keanini Newsgroups: comp.unix.solaris Subject: Re: Cant 'stty rows 24' on console In article <32F2AFA6.794BDF32@worldbit.com>, Tim Keanini writes: > For some reason beyond me, I cannot set the Sun console to 80x24. > > I have a Sparc (running SunOS 5.5) with /dev/ttya as the output > device and my Type5 keyboard as input. > > Needless to say, ttya is set to vt100 in inittab and for some > reason or another, there is NO WAY for me to get 24 rows. > > I stty -a and see that it is 34x80 so I stty rows 24. > I stty -a again and nothing has changed. I can stty me in a > new erase char and stty -a shows it no problem. > > Is there no way to set the console to 24x80? $TERM is > vt100 also. > > For the life of me, I can't see where else I can tell this darn > thing that I want 'rows 24' and 'cols 80' Have you tried changing in the shell instead? export COLUMNS=24 export ROWS=80 Works for us (that's the ksh syntax above) -- Best Regards, Brian S. Craigie Unix Sysadmin NEC Semiconductors (UK) Ltd ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Question from the "slrn FAQ" posted by . Message-ID: Subject: 1. Instead of drawing lines for the thread tree, I see `mq'. Why? There are a couple of reasons for this. The simplest may be that the font that you are using does not support line-drawing characters. Simply switching fonts to a dec-vt220 compatible font may solve the problem. This is usually the case with Windows telnet applications. Another reason for this is that your terminfo file may not be set up properly. The obvious solution is fix the terminfo file. However, this may not be possible without the correct tools (untic and tic) and many systems do not have those tools installed. Although slang is a terminfo-based system, there is another solution based on termcap if you are using version 0.99.18 of slang or later. First of all, get a termcap entry that contains the appropriate capabilities for an alternate character set, that is, the termcap `ac', `ae', `as', and possibly `eA' capabilities. Let's call this file `my_termcap'. Then do: setenv TERMCAP `pwd`/my_termcap eval `tset -s terminal-name` (Replace `terminal-name' by your terminal name). `tset' will then read and parse the my_termcap file and set the TERMCAP variable appropriately. You will want to put this in your .login file. (for information about "slrn", see http://space.mit.edu/%7Edavis/slrn.html) ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.terminals,comp.unix.internals Path: cs.utk.edu!news.msfc.nasa.gov!newsfeed.internetmci.com !howland.reston.ans.net!blackbush.xlink.net!news.asys-h.de !baghira.han.de!anubis.han.de!user X-Newsreader: Yet Another NewsWatcher 2.1.2 Sender: news@baghira.han.de (news at baghira.han.de) Message-ID: References: Date: Sun, 17 Dec 1995 15:47:11 GMT From: jum@anubis.han.de (Jens-Uwe Mager) Subject: Re: /dev/vt0 in early Unices: what was it? In article , rsm@math.arizona.edu (Robert S. Maier) wrote: > I recently looked at the SunOS source for plot(3) (the old package of Unix > graphics routines, which I'm writing a modern version of). It includes > libraries of routines for plotting graphics on various graphics terminals. > One of them (libvt0.a) clearly wasn't intended to drive a specific terminal > at all. It simply sends command to /dev/vt0, in a special format. > > I'd hazard a guess that `vt' means `virtual terminal'. Can anyone fill > me in on this? Was there at one time (in very early Unices) a virtual > terminal driver in the kernel? If so, why was it there? And why was > it removed? If I remember right this was an interface for a Versatec plotter device. I believe it used an Unibus expansion card for PDP-11 computers to talk to the plotter, therefore the special kernel level driver. > To this day, the entries in many termcap files include a `vt' attribute > for older terminals. Is there any connection? Thanks in advance. This has nothing to do with the /dev/vt0 device; this was a number identifying a kernel-based terminal emulator. One could set parameters using a struct termcb and the LDSETT and LDGETT ioctl() calls. It basically translated from a virtual terminal model (described in sys/crtctl.h) to a real terminal like VT100. Most System V.4 based systems still have the header files, although I doubt that anyone used this stuff for years. ______________________________________________________________________________ Jens-Uwe Mager jum@anubis.han.de 30177 Hannover jum@helios.de Brahmsstr. 3 Tel.: +49 511 660238 ////////////////////////////////////////////////////////////////////////////// Newsgroups: comp.terminals NNTP-Posting-Host: cleo.labri.fr References: <45937df1$0$26438$426a74cc@news.free.fr> <861wmknn9a.fsf@gmail.com> <459517ad$0$319$426a74cc@news.free.fr> Message-ID: <20070103153606.GA8011@bouh.residence.ens-lyon.fr> Organization: Debian GNU/Linux site Date: Wed, 3 Jan 2007 16:36:06 +0100 From: Samuel Thibault Subject: Re: How a virtual terminal is connected ? yvespiel, le Fri 29 Dec 2006 13:27:09 +0000, a écrit : > > Le Thu, 28 Dec 2006 21:49:53 +0800, yong a écrit: > > > > No. > > > > It is a virtual console from /dev/pts/*. > > is there a link which explain console/teminals/etc... Since you seem to be french, maybe you can have a look at one of my TDs: http://dept-info.labri.fr/~thibault/SecuSE/td3bis.ps Samuel ////////////////////////////////////////////////////////////////////////////// Newsgroups: comp.unix.solaris Path: utkcs2!stc06.ctd.ornl.gov!news.he.net!www.nntp.primenet.com !nntp.primenet.com!cs.utexas.edu!geraldo.cc.utexas.edu!arlut.utexas.edu !news.eden.com!uunet!in1.uu.net!207.67.253.7!atmnet.net!news.lightside.com Organization: Jet Propulsion Laboratory Message-ID: <32FE6259.3147@lightside.com> References: <5dkrlb$q61$1@news.cs.tu-berlin.de> Date: Sun, 09 Feb 1997 15:48:41 -0800 From: Jake Hamby Subject: Re: x86: Compose-key? Christian Krauss wrote: > > Does anybody know how to set up the compose key > on PC-Keyboards. [under Solaris 2.5 x86--Intel processor version of Solaris] > Is there any shortcut for it ? The xmodmap program is what you want. Find the keycode of the key you want to map to Compose (a useful tool for this is /usr/openwin/demo/xev, if you have it installed, run it and type keys into the window). On my keyboard, the right Control key is keycode 71. Create a file called .Xmodmap in your home directory containing this line: keycode 71 = SunCompose Now type at a shell prompt: % xmodmap .Xmodmap The right control key is now Compose, and works just like a Sun. If you want to use the Right Alt key instead, substitute keycode 69 (to find other keycodes, use /usr/openwin/demo/xev). To make this permanent, put the xmodmap command somewhere where it will be executed after OpenWindows starts (depending on your configuration, this could be .xinitrc or .openwin-init). Enjoy! By the way, I had a very difficult time with this same problem in FreeBSD (XFree86). I could never get Netscape (an X11R5 binary) to recognize the accented characters. I guess that's one advantage of Solaris... -- Jake Hamby ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: If you want to automate the interaction of a telnet or rlogin session, consider using the "expect" tool, perhaps in conjunction with TCL or Tk. http://expect.nist.gov/ ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.sys.dec Path: utkcs2!stc06.ctd.ornl.gov!news.he.net!news.maxwell.syr.edu !cam-news-hub1.bbnplanet.com!cam-news-feed2.bbnplanet.com!shore!news Message-ID: <33B7A10C.59E2@iisc.com> References: <33B55637.2DB7@home.com> Organization: Integrated International Systems Corp. NNTP-Posting-Host: koibito.iisc.com Date: Mon, 30 Jun 1997 08:05:32 -0400 To: acrobytes1@home.com From: Charles M Richmond Subject: Re: Telnet to DEC "Alpha" Skillman Hunter wrote: > > A router has been installed in our company that provides access to a > remote "DEC Alpha" - I dont know any more about what that machine is, > could be unix, could be VMS. With the IP address of the Alpha, we can > log in via Telnet and get a response. However, from both a Win95 and Mac > PCs the cursor positioning is wrong - goes to wrong place on screen, and > same wrong palce on both PCs. I set Telnet to VT100 terminal emulation > or "DECVT100" with same result. > > The operator of the Alpha says "They have had problems with terminal > emulators." > > What questions do I need to ask of the DEC guy before I can begin to fix > this problem? First off, if you are able to telnet in, then you *do* know whether you are logging into VMS or Unix. You might as well say that you can't tell the difference between Beethoven and country music. Solution for Digital UNIX: After logging in, type: eval `/usr/bin/X11/resize` Please note that the "`" are backquotes, not single quotes. If that doesn't work then try the following: TERM=ansi; eval `/usr/bin/X11/resize` or TERM=xterm; eval `/usr/bin/X11/resize` Which ever of these work, you should add to the .profile or .login files. Ask your sysadmin, which one it should be. -- *********************************************************************** * Charles Richmond Integrated International Systems Corporation * * * * UNIX Internals, I18N, L10N, X, Realtime Imaging, and Custom S/W * * One Longfellow Place Suite 3309 , Boston , Ma. USA 02114-2431 * * (617) 723 7695 (617) 367 3151 FAX (617) 723 6861 * *********************************************************************** ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.os.linux.setup,comp.terminals,comp.os.linux.misc Path: utkcs2!stc06.ctd.ornl.gov!fnnews.fnal.gov!uwm.edu!vixen.cso.uiuc.edu !howland.erols.net!news.maxwell.syr.edu!News1.Ottawa.iSTAR.net !news.istar.net!nr1.ottawa.istar.net!not-for-mail Organization: Global Proximity Corporation X-Mailer: Mozilla 3.0 (X11; I; Linux 1.2.13 i586) NNTP-Posting-Host: nnt-100.oxford.net Message-ID: <33D3B16C.4EDD0CD@Global.Proximity.ON.CA> References: <5qu8sb$nds$1@nntp.Stanford.EDU> Date: Mon, 21 Jul 1997 14:58:52 -0400 From: Chris Tyler Subject: Re: Linux + IBM 3101 Terminal Chris Peiffer wrote: > > I have an old IBM 3101 terminal that I am trying to hook up to COM2 > on a Linux box (Slackware, kernel version 2.0.27, 486). I have set up a line > in inittab: > > s2:12345:respawn:/sbin/agetty -L 300 ttyS1 ibm3101 > > I have a null modem adapter hooked on the end of the cable. However, > I get no response from the terminal. This happens with both full handshake > and no handshake null modems. It always says "line check 2", meaning that it > can't communicate with the host. Check out your connections: (1) Loopback pin 2 to 3 on the terminal's serial port. Can you see what you type? (If not, what if you loop back 4 to 5 and 8 to 20?). If not, the terminal is toast. (2) Loopback pin 2 to 3 on the Linux PC's serial port. Disable the getty and connect to the port (cu -l /dev/ttyS1). Can you see what you type? If not, the serial port is toast. (3) While still running the "cu" command (above), plug the terminal into the linux PC. Can you type from one machine to the other? In both directions? If not, the cable is toast or the comm options are mismatched (speed, parity, etc). -- Chris Tyler Global Proximity Corporation http://Global.Proximity.ON.CA/ Internet and Computer Consulting (519) 421-3541 / fax (519) 421-2107 *** Organizers of the Woodstock Business Internet Conference *** ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.terminals,comp.unix.solaris Path: utk.edu!cpk-news-feed4.bbnplanet.com!cpk-news-feed1.bbnplanet.com !cpk-news-hub1.bbnplanet.com!su-news-hub1.bbnplanet.com !news.bbnplanet.com!theplanet.net!not-for-mail Message-ID: <34110E59.167E@cscragroup.slv.co.uk> References: <01bcb95e$e5acc220$986cf2c6@rport.portable.com> NNTP-Posting-Host: n02i107.c2r5.pol.co.uk Organization: CSC Ra Group Date: Sat, 06 Sep 1997 09:03:37 +0100 From: Allan Wilkins Subject: Re: Wyse 150 and solaris curses Robert J. Harrington wrote: > > Hello, > > I am working on a project using solaris curses on a PC running Solaris 2.5.1 > with a Wyse 150 terminal. I got the termcap and terminfo source from > > (deleted text) > > Any ideas? > > Thanks, > Rob Harrington > rjh@instanton.com I don't know of what help this will be, but I have often found that attribute handling is controlled with "sgr" (set graphics rendition) rather than the individual variables (rmso, rev etc). It may well be worth checking the value of sgr to see if it is correct. The unfortunate thing is that the syntax for sgr is very complicated (reverse polish or some such) and does not seem to lend itself to the way a Wyse terminal controls attributes. You could also try removing the sgr entry altogether to see if this forces curses to use the individual attributes. If you need any additional help feel free to e-mail me or re-post. Good luck, you'll need it Al -- Allan Wilkins (awilkins@csc.ragroup.co.uk) CSC Ra Group Ltd. In this posting/mail I am speaking for me, not my employer ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Date: Wed, 04 Feb 1998 09:57:42 +0100 From: Jostein Leira Newsgroups: comp.os.linux.hardware, comp.os.linux.questions, comp.terminals, comp.os.linux.networking Subject: Re: Dumb Terminal/Linux cabling question Jeff Jolley wrote: > > Is my cable screwed up. Are my permissions screwed up (then why does the > modem work?) Am I using the wrong getty process? I have all the > permissions, inittab entries, and anything else that may help, but I don't > want to post them and make this file any longer. > > If you've had any success connecting linux to a dumb terminal, please email > me with some help. I had a similar problem, but this solved it for me: In your /etc/inittabs where you have listed your getty, note that you need the -h option so your host does not to force a hangup on the terminal line before initializing it. When using mgetty use the -D option (no fax). t1:234:respawn:/sbin/getty -h ttyS1 19200 vt100 or t1:234:respawn:/sbin/mgetty -D -s 19200 ttyS1 (I found this in the book \Essential System Administration/ by Fleen Frisch, O'Reilly & Associates, Inc, 1995. Good book for UNIX novices like me.) Regards -- Jostein Leira http://www.winlink.no/~jost ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.unix.aix Message-ID: <34fc9bc2.4431391@nntp.ix.netcom.com> References: Date: Wed, 04 Mar 1998 01:27:25 GMT From: Joe Vigil Subject: Re: Wyse Terminal Lockup On Tue, 3 Mar 1998 07:44:56 -0600, "Mark Martin" wrote: > >I have a 570 Server with Version 3.2 O/S. We have had it since 94 and have >had no upgrades to the OS. All our terminals including the console are >Wyse 60 terminals. > >Yesterday I installed a Tripplite UPS with their auotmated software for >monitoring and shutdown of the system. The install seemed to go OK until I >logged off and tried to get back in. The software seems to have changed all >the tty devices to expect an Xterm device. Now when a user logs in, their >terminal is locked by the codes the OS is sending to set the terminal. The >only way out for them is to turn off the terminal and turn back on to reset >it. But as soon as they log out, the cycle happens again. > >I have spoken with the people at Tripplite and they have been of no help >yet. This site has over 100 terminals and this is causing problems and >prompting phone calls. > >Does anyone have a clue as to where I can stop the system from thinking >these terminals are other than wyse 60? > >Mark Martin >Triad Services LLC You can edit the /etc/profile and include a line like TERM=wyse60;export TERM Also, within "smit", you can assign a terminal type to a particular tty. ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.sys.dec Organization: Engineering Computer Services Message-ID: <5s7rp3$6q7$1@risky.ecs.umass.edu> References: <870734443.44@dejanews.com> Date: Tue, 5 Aug 1997 09:33:41 GMT From: Joe Heimann Subject: RE: Non-DEC uses for VT320 terminals? gbarrett@jerrynet.com writes: > > Does anyone know of any non-DEC uses for VT320 terminals? I have a > storage room littered with model VT320-C2 terminals that I can't quite > let go of because they still power up. Can they be hooked up to Unix boxes? Yes, termcap and terminfo entries are available in many Unix operating systems, or can be found. The VT320s can also be set to VT100 or VT200 mode. > Is there some way to use them for terminal access to network > equipment? Maybe I can patch together some sort of RS-232 cable? DEC shipped VT320s with a standard MMJ to RS232 adapter. If I am looking at the right one, the part number is H8571-K. There are also other MMJ adapters for other uses, such as MMJ to DB9. They should be fairly easy to find from DEC or other suppliers, or someone at your organization may have kept some around in a drawer or storage closet. Joe Heimann Engineering Computer Services College of Engineering University of Massachusetts /Amherst ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Archiver's Note: At the question above... > > Does anyone know of any non-DEC uses for VT320 terminals? ... > Can they be hooked up to Unix boxes? ...old-timers will either wince or chuckle, because Unix was INVENTED on DEC computers. Now that Compaq has absorbed DEC, I guess wincing is more likely. ...RSS ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.sys.hp.hpux Organization: NR Message-ID: <6dj687$oc6@news.neth.hp.com> References: <6cugoc$b2m$1@nnrp1.dejanews.com> NNTP-Posting-Host: news.neth.hp.com Date: 4 Mar 1998 09:17:59 GMT From: franks@neth.hp.com (Frank Slootweg) Subject: Re: Log a running terminal On February 24, coquito@bigfoot.com wrote: > There is a way to log (like the "script" command) everithing in an already > running terminal session ? > > Can I run the "script" command in background ? I am mainly responding, because, as far as I can tell, you did not get any other responses. I do not know a way to do this, but you can run script(1) from /etc/profile or ~user/.profile. That way you have the needed information when you need it. You probably also will need to write some daemon script to monitor the size of the script(1) typescript files, and perhaps trim them or abort script(1) when they become too big. Note that script(1) can only be used if you have the cooperation of the user, because it is trivial for the user to terminate it. ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.sys.hp.hpux Path: transfer.stratus.com!cam-news-feed2.bbnplanet.com !cam-news-hub1.bbnplanet.com!news.bbnplanet.com!newsfeed.xcom.net !news.maxwell.syr.edu!news.mel.connect.com.au!not-for-mail Organization: Customer of Connect.com.au P/L, Melbourne, Australia Message-ID: <35308d67.28812580@news.mel.connect.com.au> References: <6gk3k9$47m$1@news6.ispnews.com> Date: Sun, 12 Apr 1998 09:50:23 GMT From: rjc@trump.net.au (Robert Colquhoun) Subject: Re: Terminfo for Microsoft bundled TELNET.EXE On Thu, 9 Apr 1998 22:24:42 -0500, "Jerrel C. Baxter" wrote: >I am looking for a suitable terminfo configuration for use with Microsoft's >bundled TELNET.EXE application which comes with Windows for Workgroups 3.11, >Windows 95, and Windows NT 3.X&4.0. Preferably something that will not >require that I and students constantly have to force a redraw of the screen >when running elm and/or pine not to mention vanilla vi. We're currently >running HP-UX 9.04 and testing HP-UX 11.0 on an alternate host machine. > >I know that TELNET.EXE can be pretty miserable and normally we do use WRQ >Reflection but I would prefer to offer students in particular the option of >having a reasonably reliable session via TELNET.EXE if possible. > >Thank you, > >Jerrel Baxter >jcbaxter@panther.bsc.edu Hi Jerrell, I have found it works a whole lot better if you set the Terminal->Preferences Buffer Size to 24 lines, also if you enable VT100 arrows work nicely in vi (this is with the ANSI term emulation). You still need to Control-L occasionally but it's not too bad. -- - Robert [ARCHIVER'S NOTE: Microsoft's Telnet client that comes with Windows 95 is a poor VT100 emulator. It scores only 28 on "vttest". The "emulating a terminal on a PC" web page at this site contains pointers to lots of better alternatives. ] ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.sys.hp.hpux Message-ID: <352EA9FD.3962BB2C@redlinesw.com> References: <352E670A.650ABEEE@nortel.com> From: joel sherriff Subject: Re: How to stop emitting '^[OA' from up-cursor? Date: Fri, 10 Apr 1998 16:23:42 -0700 Peterson, Jeff (EXCHANGE:RICH2:2O41) wrote: > I am using HPUX 10.20. When I start a new xterm, the up cursor key emits > "[A" which is correct. When I run /bin/vi, the up-cursor key emits > "[A" within the editor, but after exiting, it then emits "OA"! > I have found a work arround that I use for the zsh which I will include. > What I want to know is, what do I do to remove the source of the > problem. I suspect the curses library. Here are some interesting facts: > > 1. I don't use /bin/vi, my vi is aliased to vim. > 2. My cursor keys get messed up, so other programs have the problem. > 3. /bin/vi always messes up the settings. > 4. All of the cursor keys are messed up, the '[' has been replaced > with 'O'. > 5. This problem is independent of the shell used. > 6. The problem showed up with HPUX 10.20. > 7. Although the up-cursor is screwed up outside of /bin/vi, it emits > [A while using /bin/vi. > 8. There is nothing covering this problem in the HPUX faq. > > Jeff Peterson > jeffreyp@nortel.com Jeff, Your suspicion is close, but the problem is in the terminfo entry for xterm on your machine. vi on HP-UX 10.20 puts the keyboard in application keypad mode on exit. I'm not sure why, but you can make it stop by modifying the terminfo entry and either remove the name=value pair for "rmkx" or set the value to be the same as for "smkx". On my IRIX machine, the values for rmkx and smkx are switched and the entries for keypad up (kcuu1), down (kcud1), back (kcub1) and forward (kcuf1) are in cursor keypad mode (^[OA, ^[OB, ^[OD, ^[OC), opposite from HP-UX's. My guess is that it used to be that way on the older HP-UX. You might try that, or just take the terminfo entry for xterm from an older HP-UX. See man "terminfo", "tic", and "infocmp" for more info. Joel Sherriff RedLine Software http://www.redlinesw.com/ ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.sys.hp.hpux Organization: University of Jyvaskyla, Finland Message-ID: References: <892115859.3440.0.nnrp-07.c246a7b2@news.demon.co.uk> Date: 11 Apr 1998 00:55:42 +0300 From: Tapani Tarvainen Subject: Re: vi, ksh's set -o emacs and HP-UX "Eric Le Donné" writes: > I use ksh as shell, vi as editor, and set -o emacs. > I've defined some aliases: > > __A=^P > __B=^N > __C=^F > __D=^B > > so I can use the arrow keys to edit the command line. It works fine, but > once I've finish to use vi, the aliases don't work anymore, pressing the > upper key returns 'A' on the command line.... > > I've tried stty sane, set -o vi, alias __A=^P, set -o emacs again... nothing > work... I try to log on again, to telnet, still nothing... I have to close > my xterm and launch a new one to get the aliases back again.... One feature that xterm has inherited from VT100 is that arrow (and keypad) keys can emit two different escape sequences depending on the mode the terminal is in: there's "normal" mode and there's "application" mode (separately for arrows and keypad). The above aliases rely on arrow keys being in normal mode, but a number of programs, including vi, set them to application mode and leave them so upon exit. This plagues not only xterm but a number of other terminals and emulators as well (including ssh-for-Windows I'm using right now-- it's not specific to HP either). Some of them have their own means of changing the key modes; e.g., in xterm there's usually a menu accessible by holding ctrl and clicking one of the mouse buttons (I don't remember which one, and it's customizable anyway). In all vt100-compatibles, however, you can reset the arrow keys to normal mode by the escape sequence [?1l: try print "\0033[?1l" after running vi. As a permanent solution you can insert that sequence in PS1. In order to keep it from messing ksh's notion of line length a carriage return can be used as a separator. Here's a sample way of doing it in your .kshrc: PS1="$(print '\0033[?1l\0015')${PS1##*$(print '\0015')}" That will first strip away any -terminated sequence from the beginning of PS1 so they won't accumulate, then insert the desired sequence. This way it will work even in a global script that can be sourced by everybody in their .kshrc regardless of what they want as their PS1 (apart from other -terminated sequences). An alternative approach would be mapping the application mode arrows to do the right thing, but I haven't bothered to work out the details on how to do that. -- Tapani Tarvainen ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.sys.hp.hpux Date: 14 Apr 1998 13:01:04 GMT Organization: Institut de Recherches Subatomiques - Strasbourg Message-ID: References: <892115859.3440.0.nnrp-07.c246a7b2@news.demon.co.uk> From: speckel@sbgrs1.in2p3.fr (Benoit Speckel) Subject: Re: vi, ksh's set -o emacs and HP-UX On 11 Apr 1998 00:55:42 +0300, Tapani Tarvainen wrote: >"Eric Le Donné" writes: > >> I use ksh as shell, vi as editor, and set -o emacs. >> I've defined some aliases: .......... >> I've tried stty sane, set -o vi, alias __A=^P, set -o emacs again... nothing >> work... I try to log on again, to telnet, still nothing... I have to close >> my xterm and launch a new one to get the aliases back again.... > >One feature that xterm has inherited from vt100 is that arrow >(and keypad) keys can emit two different escape sequences >depending on the mode the terminal is in: there's "normal" mode >and there's "application" mode (separately for arrows and keypad). >The above aliases rely on arrow keys being in normal mode, but >a number of programs, including vi, set them to application mode >and leave them so upon exit. > ................ >An alternative approach would be mapping the application mode >arrows to do the right thing, but I haven't bothered to work >out the details on how to do that. > >-- >Tapani Tarvainen On HP-UX 10.20, under a curses application (vi...) you get normal keypad/cursor sequences, and when the application exits it sets application sequences. Unless some X ressources are set, xterm starts with normal sequences. Usually, it works the other way (application sequences under curses applications), ...and sometimes application sequences are not reset when the application exits. To solve this, I have modified our xterm terminfo entry, and removed all set/reset of application sequences. Users which prefer an application keypad may set it through ressources, by default, our keypads generates digits (a blessing with our french keyboards). The terminfo entry can be decompiled with the "untic" command, entries wich set/reset the applications sequences are smkx/rmkx (man terminfo). A list of xterm's control sequences is distributed with the source of X11, look with archie for the file "ctlseqs.PS.Z". -- Cordialement, Benoit SPECKEL IReS - Bat 27 e-mail: speckel@in2p3.fr 23 rue du Loess voice: 03 88 10 68 23 BP 28 fax: 03 88 10 62 02 F-67037 STRASBOURG Cedex 2 ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.terminals Message-ID: <35b71f37.1432663@netbsd.haeb.demon.org> References: <6p2ecg$lsp$1@nnrp1.dejanews.com> Date: Tue, 21 Jul 1998 23:11:13 GMT From: Harry Broomhall Subject: Re: Prgramming Wyse60 arrow keys On Tue, 21 Jul 1998 16:07:44 GMT, bkarsten@OLGC.com wrote: > >We have a program that sets a value for the arrow keys on the terminal itself. >So when we connect the terminal to another program, we will need to re-program >the arrow keys to their default. >Could someone let me know how to program a wyse 60 terminal through code? > >We are using a Sun box. System V UNIX If you have a correctly installed terminfo then something like 'tput init' will do the trick. This is a bit variable though! If it *isn't* installed properly then do so--it will make things *much* easier! Regards, Harry. ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: from the HP-UX 10.20 Online Release Notes: curses(3X) in HP-UX ----------------------------------------------------------------------------- * Now conforms to the X/Open Curses, Issue 4 Specification, which includes support for color, new attributes, and codesets supported by libc. * The library libcurses.a has been removed. * libcurses.sl and /usr/include/curses.h have been replaced with a library that confirms to the X/Open Specification. However, the previous library is still available. The old header file is accessed by using the _HP_CURSES define on the command line with -D_HP_CURSES. * Linking .o files that were developed for use with the old curses is no longer supported with libcurses. These .o files can be linked with libHcurses (use -lHcurses). * You should begin movement to the new default curses library because the ability to use libHcurses and -D_HP_CURSES will eventually be removed. See also HP-UX 10.20 patches: Patch Name: PHCO_10947 Patch Description: s700_800 10.20 libHcurses cumulative patch Symptoms: PHCO_10947: Long environmental variables can cause coredumps. PHCO_10451: libHcurses API getch() coredumps when is pressed twice, quickly. PHCO_8892: 9.x curses based application breaks in 10.20. Patch Name: PHCO_14249 Patch Description: s700_800 10.20 curses library libcur_colr cumulative patch Symptoms: PHCO_14249: waddch() mispositions cursor if it is at the bottom right corner. PHCO_10344: waddch() does not return ERR when a character is placed at the end of the window and is also unable to advance the cursor. Patch Name: PHCO_14654 Patch Description: s700_800 10.20 Xcurses library cumulative patch Symptoms: PHCO_14654: The delwin(3X) coredumps in some cases. PHCO_11342: The X/Open curses API getch() waits indefinitely for input to complete a keypad sequence. PHCO_11036: Various XCurses APIs were fixed during 10.30 and the same had to be backported to 10.20. PHCO_9295: 1. In 10.20, high-lighted fields cannot be reverted to normal in an application which links with -lcurses. 2. Application uses select() systems call dumps core. Compiling -lcur_colr is now the standard. HP-UX Patches --> ftp://us-support.external.hp.com/hp-ux_patches/ ....:....:....:....:....:....:....:....:....:....:....:....:....:....:....: Newsgroups: comp.protocols.kermit.misc Message-ID: <6ol9r2$2nf$1@samba.rahul.net> References: <6okifb$ijr$1@nclient1-gui.server.virgin.net> Organization: a2i network Date: 13 Jul 1998 20:13:08 GMT From: Clarence Dold Subject: Re: Line feeds lost after kermit session. : Kirill Sapelkin (znanie@best.com) wrote: : : After logging off from my ISP and leaving kermit, I find that each : : line prints over the previous, line feeds are lost. : At the ISP, are you configured as TERM=vt100 ( a popular defaul