[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Oh, yeah: Unable to switch to TTY from X



On Sat, Apr 21, 2007 at 12:54:33PM EDT, Andrew Sackville-West wrote:
> On Sat, Apr 21, 2007 at 12:56:33AM -0400, cga2000 wrote:
> > 
> > I have no idea why chvt worked for me and alway seems to work under
> > these circumstances .. and I do wish somebody knowledgeable explained
> > the X - vt switch once and for all.
> > 
> > After 5-6 years screwing around with computers .. I still have not clue
> > how this works.
> > 
> > Apparently, at least two things happen when you hit CTRL-Alt-Fn:
> > 
> > 1. your current X session is saved
> > 2. the context of your chosen vt is restored/activated.
> 
> as I understand it, all the VT's and any X sessions are running the
> whole time, its just a matter of which one has control of the
> screen/keyboard/pointer. YOu can verify this by starting a job in X
> that will take a long time and provide a progress bar. Switch away to
> a VT, wait a few and switch back. The progress bar will have
> advanced. IOW, the X session is still operating, it has merely been
> detached from the terminal. This is why you can have fun things like
> multiple X sessions on one machine with one attached to the local
> "terminal" (keybd, monitor, mouse) and the others attached to remote
> terminals via X forwarding or VNC etc. 

I tend to agree here.  Your progress bar belongs to whatever process is
running .. which the linux (in my case) kernel continues scheduling.
Said process is not aware of what you're up to and outputs his stuff to
the X server it is connected to .. and that X server updates some
page(s) of ram that map to the screen.  When you switch back to whatever
vt this X server controls .. part of the switch process is doing an
actual (physical) display of whatever that X server had in storage. 

Kinda makes sense in a rather vague sort of way.

> > The saving of your X session's context makes sense because you will
> 
> so, its not really saved, but rather it gives up control of the screen
> to another session.

Yes, a much better formulation.

> that's just my take on it.

Do you think I have to join some form of priesthood or something
before I get to know how it's done.  

Read the code, I guess that's the secret.

I do find it a little strange that in over five years of fooling around
with linux I have never come across any article .. howto .. wiki ..
whatever .. that explains this stuff in simple terms that moronic laymen
such as myself might understand.

Thanks,
cga



Reply to: