57

I am new to linux.

I am planning on setting up a server and although I like the regular Ubuntu desktop I like the Lubuntu one a little more especially for my file server needs.

What I want to know is when I use the CtrlAltF1 command to go back to the terminal does the GUI turn off until I use CtrlAltF7 again or does it just sit in the background like if you used Alt-Tab in windows OS to switch between windows?

The reason I ask is as I am still learning I still need a GUI on hand until I get more used to terminal.

I know there is commands to stop and start the lightdm but I was just curious what the keyboard shortcuts mentioned above do to the gui when switching between them.

69

When you switch to a "virtual terminal" by pressing Ctrl+Alt+F3 everything else remains as it was. So when you later press Alt+F2 (or Alt+Left or repeatedly Alt+Right) you get back to the GUI session and can continue your work.


In previous Ubuntu versions VT1 would be unused and the standard X session would run on VT7. Currently (at least from 18.04 onwards) VT1 is used for the display manager ("login screen"), the standard X session uses VT2. Hence we have VT3 as the first usable VT.

  • 3
    Using 18.04 this just logs me out. – Hellreaver Oct 8 at 13:57
  • How do we know which combo returns as? My pc worked with alt+right button – Zap Nov 16 at 14:21
  • @Hellreaver thanks for pointing this out - I adapted my answer for the current situation. – guntbert Nov 23 at 21:26
  • @guntbert Thanks! – Hellreaver Nov 23 at 21:27
7

If you ever logged in with two users on the same machine or started gui on another tty1 with startx, you'd notice something like this:

$ who                                                                          
xieerqi  tty1         2015-07-31 22:17
xieerqi  :0           2015-07-31 22:18 (:0)
xieerqi  pts/7        2015-07-31 22:18 (:0)

Here I have 3 logins - on tty1, on screen :0, and in gnome-terminal. With another user, it'd be reporting another display :1. So what's happening ? All the sessions are still active, GUI and tty are active at the same time. But switching between them makes linux switch who has control over keyboard (or more technically stdin device ) and screen (stdout) at the moment.

Now, if I'd kill all my GUI sessions (sudo pkill unity), then GUI would be disabled temporarily. Or if I stopped lightdm because it's a parent process of GUI (because I logged in there). And of course it could be restarted.

GUI is not disabled, in other-words, it just doesn't have control over keyboard and screen until you switch back with CtrlAltF7 or cycle through with AltL/R Arrow.

1

If you are using a desktop terminal, the following hotkey combination works.

Ctrl + Alt + d

A great desktop terminal is Deskterm.

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.