I'm currently logged in (locally) to a machine and was running in a TTY session without having started an X server. I accidentally hit Ctrl-Alt-F7 bringing me to where the graphical shell would be if it was running. The trouble is, I can't get back. I assume going to another TTY is forbidden using the standard Ctrl-Alt-F to protect students who have logged in to KDE or whatever, locked the screen, but don't realize that anyone could come along and Ctrl-Alt-F1 into their TTY session. The trouble is that there is no X server running, and so I can't exit from it, and am stuck in the Ctrl-Alt-F7 TTY which just has a cursor blinking at the top left of the screen.

Is there another way to switch currently-viewed TTY? How can I get out of this?

Things that do not work:

  • Ctrl-Alt-Backspace
  • Alt-Shift-Sysrq-REISUB

If the machine is remotely accessible (via ssh or otherwise), run chvt 1 as root.

Still, you can't switch to a VT that hasn't been allocated, so perhaps X was running and got wedged? It might not be possible to escape from that.

  • X was not running, the VT I'm trying to switch to has indeed been allocated. I should add that I do not have root. This is a lab machine at my university – Mala Dec 3 '10 at 18:27
  • @Mala: Then something (if not X) is running on that VT, because you can definitely switch out of allocated-but-unused VTs easily. If you don't have root and Alt-SysRq nor the normal VT switch shortcuts don't work I think it's hopeless. – ephemient Dec 3 '10 at 18:45

What about Alt+Left and Alt+Right?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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