Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!rutgers!usc!wuarchive!udel!princeton!phoenix.Princeton.EDU!subbarao From: subbarao@phoenix.Princeton.EDU (Kartik Subbarao) Newsgroups: comp.unix.questions Subject: Re: how to stty another terminal? Message-ID: <4558@idunno.Princeton.EDU> Date: 7 Dec 90 14:17:29 GMT References: <1990Dec07.055142.11132@eecs.wsu.edu> Sender: news@idunno.Princeton.EDU Lines: 34 In article <1990Dec07.055142.11132@eecs.wsu.edu> rnelson@yoda.UUCP (Roger Nelson) writes: >------ > >How to you stty a terminal line that you are not currently connected to. > >Specifically I have written a small C shell script that prints to a local >printer connected to a terminal (even if you are not logged in with that >terminal). This works fine (NL is mapped to CR LF) as long as someone is >logged in with the terminal. When no one is logged in with the terminal, >NL is only mapped to LF. > >So what I would like to do is specify the device, something like: > > stty -d ttyd4 onlcr > >Is there a way? Yes. Either stty onlcr < /dev/ttyd4, stty onclr > /dev/ttyd4 ( I'm not sure which one. ) Or just open /dev/ttyd4, load in the struct sgttyb (or termio for SunOS), diddle the right flags, and then issue the appropriate ioctl(). -Kartik -- (I need a new .signature -- any suggestions?) subbarao@{phoenix or gauguin}.Princeton.EDU -|Internet kartik@silvertone.Princeton.EDU (NeXT mail) -| SUBBARAO@PUCC.BITNET - Bitnet