[ubuntu-za] Line feed on terminals
charl.wentzel at vodamail.co.za
Fri Feb 26 07:29:35 GMT 2010
On Fri, 2010-02-26 at 00:18 +0200, Neil Muller wrote:
> On Thu, Feb 25, 2010 at 11:12:11PM +0200, Charl Wentzel wrote:
> > Is there something I can call from rc.local that would change the
> > behaviour of a virtual terminal (similar to that once someone has logged
> > in)? I've looked at the setterm man page, but couldn't find anything
> > there.
> You're looking for stty, specifically "stty sane" .
Great thanks! Adding "stty -F /dev/tty(n) sane" to rc.local for each
terminal on which I would like to run output did the trick!
> Personally, though, I'd be firing soemthing like this off on it's own
> virtual console using openvt, which should remove any need for fiddling
> with the tty settings.
Agreed this would be better, but I don't think it will work in this
case. The programs are not all started from rc.local. A single program
is started up and then forks and replaces it children with different
programs. This is done based on a setup file which defines what is
needed for that specific system configuration.
Each of the indidual programs then redirects its own input and output to
what ever input/output files is specified in the configuration file.
This is done by reopening the stdin, stdout and stderr file descriptors.
In this case these input/output files are virtual terminals.
Rather complicated but very flexible.
More information about the ubuntu-za