Thursday, May 10, 2007

Ubuntu consoles missing (no F1-F6 consoles)?

This has been bothering me for some time, but not enough to sort out the problem. Today I got tired of looking at the pretty startup splash screen and wanted to have my console logins back so traced the problem to /etc/event.d/tty{1-6} files. The example file below shows a clear error in the last two lines (from the tty2 file, but same in all 6 files):

# tty2 - getty
#
# This service maintains a getty on tty2 from the point the system is
# started until it is shut down again.

start on runlevel 2
start on runlevel 3

stop on runlevel 0
stop on runlevel 1
stop on runlevel 4
stop on runlevel 5
stop on runlevel 6

respawn                                             <<< ERROR!
/sbin/getty 38400 tty2exec /sbin/getty 38400 tty2   <<< ERROR!
The last two lines are reversed for one and the last line itself is a mesh of two commands, just need to clean them up to look like this:
...
exec /sbin/getty 38400 tty2
respawn

Do this for all tty# files and you will have your consoles back under CTRL+ALT+{1-6}. ;-)