*BSD News Article 39429


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!yarrina.connect.com.au!news.mira.net.au!otis.apana.org.au!serval.net.wsu.edu!netnews.nwnet.net!ns1.nodak.edu!news.uoknor.edu!constellation!paladin.american.edu!gatech!howland.reston.ans.net!news.cac.psu.edu!news.pop.psu.edu!hudson.lm.com!news.galt.com!phred.ws.cc.cmu.edu!alex
From: alex@pc.cc.cmu.edu (alex wetmore)
Newsgroups: comp.os.386bsd.questions
Subject: Re: Meta Keys, Syslog, and Virtual Terminals
Date: 12 Dec 1994 14:55:19 GMT
Organization: Phred Networking
Lines: 38
Message-ID: <3cho8n$1jp@dagny.galt.com>
References: <1994Dec12.102256.5447@bay.cc.kcl.ac.uk>
NNTP-Posting-Host: phred.ws.cc.cmu.edu
X-Newsreader: TIN [version 1.2 PL2]

> 3) At the moment syslog messages seem to go to all virtual terminals
> that I am logged into, or sometimes I get a message repeated three
> times in a row, presumably because I am logged in more than once (as
> root). How can I change this? How can I arrange for all system
> messages to go to an unused VT? What stops me switching to a VT
> unless a getty is running on it?

If you change any lines that refer to /dev/console in /etc/syslog.conf
to refer to /dev/ttyvX where X is an empty virtual console (I use ttyv4)
it will send the messages to there.  For instance I have the line:

news.info;local0.*;*.notice;*.info;mail.*;kern.debug    /dev/ttyv4

in there.  

Now you can then make /etc/ttys run cat on the device instead of getty.
Use something like:
ttyv4 "/usr/bin/cat" noterm on secure

(i think that should work, I've changed console drivers to one that doesn't
restrict access to console drivers that are closed).  Otherwise you could
do:
ttyv4   "/usr/libexec/getty syslog"     pc3  on secure

And then make a syslog entry in /etc/gettytab that looks like:
syslog:\
        :im=:lm=:ht:np:sp#115200:

Which will make getty be completely quiet, but you can still log into the
terminal.

I chose ttyv4 because I used ttyv0 to ttyv3 for login consoles, v4 for
syslog, and everything else is reserved for X sessions.  This works out
nicely if you map alt-j, alt-k, alt-l and alt-; to switch between your
consoles, and then you can use alt-' to switch to the syslog console.  
Nice keys if you are a typist (much easier to use then alt-f1, alt-f2, etc).

alex