Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a server laptop sitting around at home which is a pretty bland server, on which I generally leave the lid open and there is a login prompt always displayed.

However, I'd love to be able to display useful information on /dev/tty1 so whilst the server is just sitting there, rather than displaying a login prompt on the monitor, it could now display, for example, the current time and weather forecast for the day. Or something along those lines.

Does anyone know how to go about this? I've tried searching for answers but it's not really a common problem/question and this isn't my area of expertise.

share|improve this question
up vote 2 down vote accepted

You will have to have root access to do this, so su first.

Then, write a script to print whatever you want - for example, the date:

while /bin/true; do
sleep 1

Then, change your /etc/inittab (this may be different for different distros) to use the new program (which you should have chmod +x'd by now and placed in /usr/local/bin) to this:

# These are the standard console login getties in multiuser mode:
c1:12345:respawn:/usr/local/bin/ &> /dev/tty1 < /dev/tty1
c2:12345:respawn:/sbin/agetty 38400 tty2 linux

Remember to add the redirection operators ("&> /dev/tty1 < /dev/tty1") - init does not redirect output on its own.

Reboot and tty1 will show the output of the script after you are done booting.

share|improve this answer

Old trick to get you started:

while true; do tput clear; date +"%H : %M : %S" | figlet ; sleep 1; done

Figlet may not be installed by default but it's available for most distros (just tried on CentOS - had to yum install figlet)

Output example:

 ____   ___        ____  ___        _  ___  
|___ \ / _ \   _  | ___|/ _ \   _  / |( _ ) 
  __) | | | | (_) |___ \ (_) | (_) | |/ _ \ 
 / __/| |_| |  _   ___) \__, |  _  | | (_) |
|_____|\___/  (_) |____/  /_/  (_) |_|\___/ 

Edit: Just found this executable that displays an ASCII analogue clock:

share|improve this answer
props for the analogue clock, that's cool. – EricR May 3 '11 at 21:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .