More TTY friendly core code. Still broken tty switch to other graphical
ttys though.
TODO: logind support, reopen input devices