Jump to content

virtual consoles


saturnian

Recommended Posts

The keystrokes for getting into and out of a virtual console can vary from one distro to the next, and even from one distro release to the next, I'm finding!

 

For example, yesterday I got out of tty2 in Antergos by using Ctrl+Alt+F7. Today, in Debian Stretch (on that computer, I have only GNOME installed, if that matters), the same keystroke didn't work for getting me out of the virtual console, but Ctrl+Alt+F1 took me back to the login screen!

 

Anyone know the best way to find distro-specific, releasse-specific info about using virtual consoles?

Link to comment
Share on other sites

I am seeing different results from the same keystrokes in Stretch with GNOME on one laptop and Stretch with Xfce on another. For example, from within the GNOME session, Ctrl+Alt+F1 logs me out of the GNOME session. From within Xfce, Ctrl+Alt+F1 takes to me to tty1.

 

Another example, from tty3 on the GNOME system, Ctrl+Alt+F7 doesn't appear to do anything, and I don't see how to get back to the GNOME session, except I can use Ctrl+Alt+F1, which takes me back to the the login screen. But from tty2 on the Xfce system, Ctrl+Alt+F7 takes me back to the Xfce session.

 

But then I realized something about the GNOME session:

 

steve[~]$ who
steve tty2 	 2017-11-27 18:57 (:0)

 

So I can use Ctrl+Alt+F2 to return to the GNOME session. And that's why Ctrl+Alt+F7 does nothing there. A light came on! A dim light, but it's a light.

Link to comment
Share on other sites

So, I think that what's happening here is that in GNOME (in Debian 9, at least), the login screen uses tty1 and gnome-shell uses tty2. So Ctrl+Alt+F1 takes me back to the login screen, Ctrl+Alt+F2 takes me back to the GNOME session, and for a virtual console I can use Ctrl+Alt+F3 up to Ctrl+Alt+F7 (tty3 up to tty7).

 

But in Xfce in Debian 9, the graphical desktop uses tty7, so Ctrl+Alt+F7 takes me back to the desktop session -- and tty1 and tty2 are available (Ctrl+Alt+F1 or Ctrl+Alt+F2 will get me a virtual console).

 

I haven't found an easy way, other than by trial and error, to determine that the login screen (like in the case of GNOME) is using one of the consoles. I wonder if that sort of thing happens with other DEs besides GNOME.

Link to comment
Share on other sites

Ah, yes -- thanks, raymac46. Also: https://askubuntu.co...top-environment

 

For now, GNOME users could install lightdm and switch from using gdm3 to lightdm, if desired. Then the display manager and the desktop session would go back to using the same virtual console (I'm guessing that would be tty7 again). In any case, I see what's happening, and that things might be set up differently in the future.

Link to comment
Share on other sites

Yes well aside from the usual GNOMEie arrogance of wanting to do stuff differently from the rest of the civilized world, it's no biggie as far as I am concerned. Still lots of consoles left and as many terminals as I would want. :w00tx100:

Link to comment
Share on other sites

Yep. For example, I'm in Openbox in Arch at the moment, but tty1 doesn't seem to work. I noticed the same thing in Antergos, where I also use Openbox. Here's a shot of the screen I see after using the Ctrl+Alt+F1 keystroke. But tty2-6 work fine, and Ctrl+Alt+F7 gets me back to the desktop, so no big deal, I guess.

 

arch-tty1.jpg

Link to comment
Share on other sites

securitybreach

Yep. For example, I'm in Openbox in Arch at the moment, but tty1 doesn't seem to work. I noticed the same thing in Antergos, where I also use Openbox. Here's a shot of the screen I see after using the Ctrl+Alt+F1 keystroke. But tty2-6 work fine, and Ctrl+Alt+F7 gets me back to the desktop, so no big deal, I guess.

 

arch-tty1.jpg

 

That is completely normal as your display manager (LightDM) was started in TTY1 and openbox is running via TTY7.

Link to comment
Share on other sites

That is completely normal as your display manager (LightDM) was started in TTY1 and openbox is running via TTY7.

 

Do you know why the same thing doesn't happen in Debian (with LightDM and Openbox), where tty1 is available (and I can get to a virtual console with Ctrl+Alt+F1)?

 

And in Arch, why do I get a wall of text (when I use Ctrl+Alt+F1) instead of the login screen itself? Also, it's interesting that from the login screen in Arch (not yet logged into a desktop session), I can go to (for example) tty2, but then Ctrl+Alt+F7 brings me back to the login screen, while Ctrl+Alt+F1 takes me to what I've shown in the above shot.

 

In cases where the display manager is using a different virtual console than the graphical desktop is using (or, is that always the case?), how is the user supposed to know that, other than by trial and error? Seems like all I can do is use Ctrl+Alt+F(n) and see what happens.

 

One way or another, I can get to a virtual console, and I can get back to the graphical desktop or back to the login screen. But the keystrokes used to do those things can vary between distros, and also it can depend on the DE/WM (and display manager) being used. That's what I'm seeing here.

Link to comment
Share on other sites

securitybreach

Well if I am not mistaken, this was how it has always been and those other distros just changed things. When you boot, tty1 is always the first one to load hence why you see the startup stuff on it. By default, Xorg is always started on tty7. I have always manually started X and if I am not mistaken, it has been this way since 2001 when I first started using Linux.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...