I remember switching between TTYs on Ubuntu Linux and being able to switch back and forth between an active X session (Unity/KDE/XFCE) and a terminal on another numbered TTY thing / virtual console. I expected the same thing to work in Slackware Linux, but it doesn't appear to and I'm trying to figure out why.

I'm running Slackware 14.2 on a ThinkPad. KDE is my default desktop environment (the one started by startx).

If I start an X session via startx on TTY1 (the default), switch to TTY2 via Ctrl Alt F2 and then switch back with Alt F1 (or Ctrl Alt F1), I don't see my X session, I see the shell session that I ran startx from. I can interact with the X process and suspend, interrupt, or kill it, but I can't "give it control of my monitor" again after switching away from TTY1 initially initially.

I tried running exec startx from my login shell instead of just startx, but I still don't see my X session when switching back to TTY1.

In addition to the fact that I've switched between a GUI and console in Ubuntu before using Ctrl Alt F{1,2,3,4,5,6,7}, this question suggests to me that it should be possible to switch between a virtual console containing a X session and one without an X session in it:

How to switch between tty and xorg session

Excerpt taken from one of the answers:

Because X is running on tty1, but not on tty2. A tty is a "virtual terminal", meaning it is supposed to represent an actual physical screen and keyboard, etc. The terminals are all on simultaneously, but since you only have enough hardware to interface with one at a time, that's what you get.

This suggests that X does actually run "on" a virtual console, but I'm not exactly sure what that means.


X takes up a new slot in the kernel data structures that are used for the virtual consoles, exactly for the reason to allow Ctrl Alt Number to switch between the consoles and the X session.

This virtual console is not the console you started X from, but a different one. It is usually passed as an argument in form of vt1, vt2 etc. to the X server. So if you do something like ps axu | grep X, you should be able to see which virtual console the X session runs on.

On many distributions, this is virtual console 7 (and not 1), so you'll have to use Ctrl Alt 7 to switch to it. I'm not sure what Slackware uses as current default, however.

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.