LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Display logs instead of TTY? (https://www.linuxquestions.org/questions/linux-server-73/display-logs-instead-of-tty-614370/)

tweakmyknob 01-17-2008 05:43 PM

Display logs instead of TTY?
 
I've seen this before, and it's been very handy in the past, however I've not yet set it up.


I'm installing a server, with no GUI and I'd like to have a couple of log files display automatically instead of a login prompt for the first 4 TTY's.


Any help with this would be greatly appreciated.

Thanks,

-Tweak



OS: Ubuntu Server on x86

ilikejam 01-17-2008 06:34 PM

Hi.

Have a look in /etc/inittab

Replace the mingetty commands lines you want with whatever you need, e.g.
4:2345:respawn:/usr/bin/tail -f /var/log/secure > /dev/tty4

Dave

Brian1 01-17-2008 06:36 PM

I don't know where I found this just pulled it out of my notes but this may make some sense. I just paste what I have in that sticky note.
Code:

# Set tty10 to full screen.
stty -F /dev/tty10 rows 48 columns 128
# Start logging of firewall on tty10.
echo "Firewall logging show on tty10."
tail --follow /var/log/firewall | arno-fwfilter >/dev/tty10 &
# Set tty9 to full screen.
stty -F /dev/tty9 rows 48 columns 128
# Start logging of /var/log/messages on tty9.
echo "/var/log/messages shown on tty9."
tail --follow /var/log/messages >/dev/tty9 &
# Set tty11 to full screen.
stty -F /dev/tty11 rows 48 columns 128
# Start tcpdump on tty11
echo "tcpdump shown on tty11."
tcpdump -vv >/dev/tty11 &


 Question  How to open a program and send it to another shell
I know there's a way to do what I'm trying to do, but I'm just too noobie to do it.

Here's the thing: I want open multiple simple text files with less from one of the terminals that you get when you do <ctrl>+<alt>+<F?>(I don't how do you call these kind of terminals), but each file must be open in one different terminal, so when I hit ctrl+alt+F1 I see the first file, then if I hit <ctrl>+<alt>+<F2> the second an so on...

I will only have to open a maximum of 5 files so there'll be plenty terminals to do that.

Brian


All times are GMT -5. The time now is 06:32 PM.