My xorg session is on tty1 and if I want to issue a command from tty (because I cannot do it from xorg session for some reasons), I press Ctrl+Alt+F2, for example, and type a command. But I cannot start graphical applications from any tty except first since there is no xorg session in it. Then I am curious how can I switch to tty1 where xorg session is running and back to the session?
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. You can in fact run multiple X sessions on different ttys and switch between them. You need a valid
Check first that If there isn't a display manager doing something totalitarian, you should get a plain black window with a big X mouse cursor. Left clicking should give a crude looking menu from which you can now "Quit"; but before that CtrlAltF1 will take you to the other X session on tty1 (and F2 gets you back, etc.). |
|||||
|
|
You can switch tty as you have described by pressing:
You can also use Alt+Left/Right Note that different distros assign these differently. RHEL 6, for example, assigns the X server to tty1 and a "dumb terminal" to tty2-7, while RHEL 5 assigns dumb terminals to tty1-6, and x.org to tty7. Some x.org setups also make switching to any random dumb terminal more difficult; RHEL 5.5, for example, has a dedicated x.org key to switch to tty1, and from there you can get to tty2-6 easily. |
||||
|
|
|
Alternatively, you can use the |
||||
|
|