[brlug-general] Multiple concurrent X sessions

Kevin Kreamer kevin at kreamer.org
Sun Mar 4 23:25:01 CST 2007


Joe Fruchey wrote:
> First off, I've never really messed with virtual terminals, so I don't
> know what's supposed to happen. If I switch to anything above vt07, I
> get a black screen with a blinking cursor.
> 
> Switching to vt06...
> Logging in...
> startx -- :1 > x.txt
> Switching  to vt07
> ps -aux shows processes with user#2
> Switching to vt06...
> 
> OH!
> 
> Running X from vt06 switches to vt09. So 1-6 are textmode terminals
> and 7-12 are graphical? Whaddya know? When I switched back to vt06, X
> wasn't crashed, I was just seeing all the status messages.
> 
> Thanks.

No prob.  As with everything else in Linux, it's configurable :-) You
set which terminals are textmode in /etc/inittab.  Since the default is
to start 6 gettys, almost everyone has textmode terminals on vts 1-6.
When you run X, it attaches itself to the next available virtual
terminal which, again because of the magic of defaults, is almost
universally vt7.  Running another as you did with :1 attaches to the
next available after vt7.  The black screen with the blinking cursor is
when nothing is attached to the terminal.

Given that X is traditionally the one case where a "user space" process
has direct hardware access, I've heard of video card driver issues
causing X crashes (and even kernel crashes in some cases), especially
when doing video resets in the process of switching terminals.  It
sounded as if that was happening in your case; it's good that it wasn't.

> Another issue: If I'm using screen 1 and I put in a CD/DVD, it plays
> on screen 0. How do I get it to play on the current screen? (FC6 btw)

In Unix, everything is a file.  This questions boils down to who has
permissions on the relevant files, and who opened them up first.
Probably the gnome or kde (or whichever) audio multiplexer on screen 0
is grabbing /dev/dsp, /dev/audio, /dev/cd, and the like, and so the
sound is going there.  Killing it and running the process under screen
1's user might work.

> And Will, FC6 doesn't have built-in user switching.

Maybe you just don't have the option visible.  Take a look at

http://wadeberrier.blogspot.com/2007/02/switch-user-in-opensuse-102.html

and see if it helps.

Kevin



More information about the General mailing list