On 2008-06-23, Theodore Wynnychenko <[EMAIL PROTECTED]> wrote: > So, I think the place for me to modify this process is by changing the > variable to execute getty in /etc/ttys to instead launch minicom? I tried > this, but (i guess, obviously) it did not work.
getty takes care of setting up the terminal on the port that init(8) gives it on the command line. If you want to run other software you'll need to do that yourself. And as you assume, you must also set environment variables if your software needs them. Here's a simple example of a script that just displays systat on a terminal that you could run in place of a getty: #!/bin/sh TERM=vt220 /usr/bin/sudo -u nobody /usr/bin/systat vmstat < /dev/$1 > /dev/$1 You can't do this straight in /etc/ttys since init(8) doesn't pass the command to a shell, it exec()'s it directly. (If you run this on ttyC0, note that it will hide syslog messages that would be displayed there, so someone thinking of using it to obscure the login prompt from casual users should consider the downside). If you have problems, look at /var/log/authlog, if you see "getty repeating too quickly" message, the program exited straight away for some reason. In that case you might obtain clues by redirecting stdout/stderr to a file and looking for error messages.

