From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,fb65098df237e196 X-Google-Attributes: gidfee84,public From: swr@zeus.unx.dec.com (Scott Ruch) Subject: Re: setting terminal characteristics permanently (eg. baud rate) Date: 1995/05/26 Message-ID: <3q3j8d$6vo@jac.zko.dec.com>#1/1 X-Deja-AN: 103239716 references: <3q0n0j$j74@phunn1.sb.com> organization: Digital Equipment Corporation newsgroups: comp.unix.osf.osf1 Michel van der List (vandermj%phu614.molbio.sb.com@sb.com) wrote: : I've been trying to set terminal characteristics on my alpha : using stty. It seems that no matter what I do, settings return : back to some sort of default set. From the stty manual page, it : seems that something like 'stty 38400 < /dev/tty00' should set : the baud rate on that line to 38400. It does not seem to work : though. You can't change the characteristics permanently as the kernel data structures associated with the tty ports are initialized each time the tty is opened for the first time. On some platforms you can set the state of "CLOCAL" (i.e. modem or non-modem control) with a special ioctl and the tty driver will remember it. Your stty command sets the baud rate to 38400 on the tty that has been opened by the shell, but since it's closed when the command finishes, the settings are overwritten at the next first open. You'd need to keep it open all the time to preserve any non-default settings. -- ------------------------------------------------------------------ Scott Ruch Unix Systems Group DEC OSF/1 LAT Engineering Digital Equipment Corp. |d|i|g|i|t|a|l| 200 US Rt. 9 North swr@unx.dec.com Manalapan, NJ 07726-9455 (908) 577-6082 ------------------------------------------------------------------