Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Sep 1996 14:35:44 -0600
From:      Sean Kelly <>
Subject:   Re: stty, printcap, ixon, Postscript printer
Message-ID:  <>
In-Reply-To: <Pine.SOL.3.91.960909105349.18376A-100000@log3> (

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
>>>>> edward ing <> writes:

> I have determined that I need to use software flow control to get my
> Postcript printer to work properly. Thus I wish to set the ixon flag
> terminal setting for port.

Sounds good to me.  I use software flow control for my PostScript
printer, too.

> 1. There are printer capability flags in printcap which can be set
> for the l-flags and the c-flags. What I wish to know is whether
> there is a capability to set the i-flags in printcap file.

Actually, it depends on what version of FreeBSD you have.  For 2.1.5
and earlier, you're not setting termios l-flags and c-flags at all,
but instead the sgtty flags.  Use the settings defined in
/usr/include/sys/ioctl_compat.h.  You'll want the TANDEM flag, and
probably the ANYP, LITOUT, FLUSHO, and PASS8 flags.  Try these
settings in your /etc/printcap.


Now, if you're using FreeBSD-current, then you've got a much more
friendly interface that even uses the termios settings:


> 2. Not knowing how to set the ixon flag in the printcap, I tried to
> set it using the stty command. I enter the following "stty -f
> /dev/cuaa0 ixon".  However when I tried to list the settings( stty
> -f /dev/cuaa0) it did not indicate any change.

Which is correct.  A tty retains its settings only while it's open.
The "stty -f /dev/cuaa0 ixon" command opens the tty, sets the flag,
then closes it, at which point it reverts to its initial-state

What you want to do is use "stty -f /dev/cuaia0" which sets the ixon
flag for the initial-state of the device.  There's also a lock-state
entry, /dev/cuala0 which prevents a certain bit from being set or
cleared by other software.  Type "man 4 sio" for more information.

You usually put commands like "stty -f /dev/cuaia0 ixon" in the file
/etc/rc.serial, which is read and executed at bootup.  However, I'd
prefer using the /etc/printcap solution.  When you move a printer from
one computer to another and someone tries to use that serial port,
there'll be less confusion if the port doesn't have certain flags
already set or locked-in.

So many options!  That's Unix for you.

Sean Kelly                          
NOAA Forecast Systems Laboratory
Boulder Colorado USA      

Want to link to this message? Use this URL: <>