This is the bit about the tty not working