Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

On a network appliance I am building, based on Ubuntu server I wish to perform the following customizations:

  1. Disable the VGA output so if one connect a screen nothing will appear. This however shall not affect the ability to connect to the machine with ssh and control it
  2. If that is not possible without re-compiling the kernel (action I wish to avoid as much as possible), I at least want that when machine boot completes, it will not show the login prompt, rather my own custom message.

How can I get either one of the above options

share|improve this question

1 Answer 1

up vote 6 down vote accepted

To disable textual login on virtual terminal tty1...tty6, you can modify /etc/init/tty1.conf (and the other from tty2.conf to tty6.conf), substituting the line

exec /sbin/getty -8 38400 tty1

with something like the following:

exec /sbin/getty -8 -n -l /usr/local/bin/tty-replacement 38400 tty1

where /usr/local/bin/tty-replacement can be a simple shell script like this:

#!/bin/sh

echo ""
echo "This is a message"
echo ""
read ans

This should not prevent ssh login, that has nothing to do with ttys.

Remember to make the shell script executable with

sudo chmod +x /usr/local/bin/tty-replacement
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.