22

I was just happily typing away, trying out some Android development on my Ubuntu machine. I pressed Ctrl + Alt + F11 instead of Ctrl + F11 to run the program in Eclipse.

This made the screen go blank with a white flashing cursor and it stayed like that for a while, so I pressed Ctrl + Alt + F4 to get to a terminal I could use and remembered seeing somewhere startx to start the GUI again, so I tried that and had something I have also been trying commands like unity, unity start and unity restart, but they all seem to run, but I never get my GUI back.

The fact that it only happened to my user account is strange. If I use guest I can access the GUI, but if I try and log in to my account the screen goes black for a few seconds and then sends be back to the log in screen.

I have tried installing the Xubuntu desktop over the top of it, but it does the same thing with that desktop as well.

My knowledge of Linux is starting to get stretched at this point now.

What may have happened and how do I put it right? Maybe it's a user setting or something I could change?

Also could anyone tell me what Ctrl + Alt and F11 does?

I'm using the latest version of Ubuntu and ran the latest updates today as well.

When running startx, I get an error saying:

Fatal Server error@ server is already active for display 0 if this server is no longer running, remove /temp/.x0-lock and start again

Another thing I have tried is using Ctrl + Alt + F7 to bring back the GUI, but that doesn't seem to help either. It always sends me back to the log in screen (which is the GUI log in screen).

Brian
  • 221
  • 1
  • 2
  • 4

2 Answers2

22

Ctrl+Alt+F7 or Ctrl+Alt+F8 should find your GUI again.

The Ctrl+Alt+F# buttons bring up "TTYs" which are just terminal interfaces you can use without running gnome-terminal or another terminal program.

NOTE: In more recent Ubuntu systems, Ctrl+Alt+F1/F2 are the more correct keys to use - this answer was written back in 2012 with Ubuntu 12.04 and such being the current version and the answer is no longer accurate for more recent releases.

Thomas Ward
  • 74,764
  • It still doesn't take me back to where i want to be, yes i go back to the GUI, but its the log in screen. When i enter my password the screen goes blank and then sends me back to the login screen again. – Brian Jun 27 '12 at 13:45
  • Did you try rebooting? (in terminal, login with your username and passcode, then use sudo shutdown -r now) – Thomas Ward Jun 27 '12 at 13:47
  • I have, well i used halt first of all and i've used the reboot command but i doubt that'll make much of a difference. – Brian Jun 27 '12 at 13:48
  • 3
    I move between virtual terminals all of the time. I just used the ctrl+alt+f11 followed by ctrl+alt+f7 and it worked for me. There are times when I have to reenter my userid and password to get past a locked screen, but my session is still there with all my windows intact. Sometimes I'll be on the tty8 so I have to use the f8 sequence. I have to wonder whether if your session is somehow timing out and that is why it goes missing. – John S Gruber Jun 27 '12 at 17:50
  • I can confirm what @JohnSGruber said, I just tested earlier today going to ctrl+alt+f11, leaving it there, then going back to ctrl+alt+f7 for the GUI on a clean Ubuntu system and it was not a problem. – Thomas Ward Jun 27 '12 at 19:53
  • In 18.04+ its control, alt, and eithwr F1 and F2 to get to GUIs now. – Thomas Ward Aug 22 '20 at 23:14
11

Ctrl+Alt+F11 sort of puts the GUI to sleep, and puts you into a virtual terminal mode, something like the old fashion ttys.

Once in this mode you can choose between 6 different tty input screens. Each acting like it is an old-fashion tty. The different ttys can be chosen with Alt+F1 up to Alt+F7. Each of these virtual ttys will require that you log in with the old fashion Unix login that you would use from an old-fashion tty.

If you login to one of these and then try to restart the X-window server it won't let you because there is already a server running.

If you are in this virtual terminal mode you can use Alt+F1 through Alt+F6 to switch between the 6 different tty-like inputs. Each will look just the way you left it when you switched out. You can also use Alt+F7 to switch to the screen (not a tty) that is attached to the already running GUI.

Note there is a difference between Ctrl+Alt+ and just Alt+.

This mode is actually very useful if you are in something using full screen mode and you need access to a backend command shell.

BuZZ-dEE
  • 14,223
Mikey
  • 111