Linux Console – Return to GUI from Text Console with Multiple X11 Servers

consolelinuxttyxorg

I know the thread How to get out of TTY and into X session apparently about similar thing as here, and Command line to return to the GUI after Ctrl-Alt-F1 about chvt.
I have Ubuntu 14.04 LTS. I run X11 in tty7 and one X11 started by startx -- & in tty1.
I do Ctrl+Alt+F7 and Ctrl+Alt+F1 and seeing the terminal details of X11, not GUI.

Some thoughts:

  1. How can you return to the GUI of X11 in TTY1? drewbenn is correct: X11 GUI is spawned on the next-available TTY in F8, where GUI visible.
  2. The GUI of TTY1 is much slower than in TTY7, which is probably because of two X11 servers running separaterly. How can you prevent many X11 instances in the future?
    Can you somehow use some workplaces of TTY7 in TTY1, saving resourses?

Best Answer

Usually the X server runs on the first tty that was available when it started. (Under Linux, the X server does not run on the same console where you ran startx.) Many distributions set up 6 text mode consoles, so the first X server ends up on tty7 (Ctrl+Alt+F7). If there's a second X server, it ends up on tty8 (Ctrl+Alt+F7), etc. You can also use Alt+SysRq to return to the previous console (this only works from a text mode console, not from X).

In principle, you should be able to run as many X servers as you have memory for. (Well, that and I think by default the maximum number of virtual consoles is 63.) However, video drivers sometimes have bugs. They're rather complex beasts, and it doesn't help that the hardware manufacturers rarely give out detailed enough specs to driver writers. Depending on your exact video card model and driver version, there may be bugs. Running multiple X servers at the same time is likely to have undergone little testing, and may well have been considered an unnecessary burden.

There's rarely any point in running multiple X servers on the same machine as the same user. (The main exception that comes to mind is if you're testing something.) If you want to switch between independent sets of windows on the same console in the same desktop environment, you can use virtual desktops, known variously as workspaces, desks, tags, etc. Most window manager and desktop environments support multiple virtual desktops. There's no standard interface: each has its own key and mouse bindings to switch between desktops, and its own graphical artifacts. However there's a common kind of visual widget: look for a small panel that represents a rectangular grid showing miniatures of your windows.

Related Question