I have a mini2440 ARM computer with a small screen and currently have it booting Debian Squeeze. I'm communicating with it over a serial connection using minicom
. When the thing boots it gives me a login prompt over the serial, and on the small screen. If I plug in a USB keyboard I'm able to log in and use the small screen terminal.
I'm trying to understand the idea of terminals or consoles in Linux. How does the system know to give me a login prompt over the serial connection? Can I redirect a program's output called from the serial session to the screen? Can I make the screen mirror what I see over serial? I'm just very confused about what processes handle this and why the login system was designed like this.
I'd greatly appreciate any overview or useful references. Thanks
Best Answer
The system is allowing you to log in over serial because you have a line like this in
/etc/inittab
:That says to run a a getty on ttyS0 in runlevels 2 and 3, and to respawn it when it exists. 9600 is of course the bits per second, and vt100 is the terminal type. You'll also notice gettys on tty1–6 as well, those are the kernel VGA virtual consoles (which is probably connected to the small screen).
You can write to the VGA console running your program on it, or alternatively opening it (generally after commenting out the inittab lines running getty there). You could also use the frame buffer libraries (or the kernel framebuffer interface directly). Could even start X on it, I suppose.
Not sure what the easiest way to mirror the output on both ttys is.