[lug] help starting simultaneous X servers

D. Stimits stimits at comcast.net
Wed Jan 4 17:25:47 MST 2006


...
> I want to be able to run simultaneous X servers on the same monitor
> using two different displays (eg :0 and :1).
> 
> At least I think I do. Maybe you all have better suggestions. What I
> really want to do is be able to switch "environments" with a hotkey

It sounds like what you want would not be two displays, unless you have 
two video cards and two monitors. In which case you would want 1 display 
(hardware) and 2 servers (software environments). If you use :0.0, it 
means first display of first server; if you use :0.1, it means second 
display (and hardware) of that same server. If you use :1.0, it means 
first display of second server...servers are software.

> (in this case hitting the CTRL-ALT-Fn). One environment might be my

If you look at /etc/inittab (at least this is on Fedora/KRUD and a 
number of others), you'll see the different consoles are controlled 
through there. Like for my system and most, it defaults to F1->F6 being 
a text console, and some sort of X11 setup runs and respawns on F7. You 
could add one to F8. I'm not positive how it assigns these things, but 
since consoles are manually set in the inittab, and "x" shows only its 
runlevel, I'm going to guess that either (a) X11 is automatically 
assigned to the next available slot, or (b) some minor variation in 
inittab will lock the X11/prefdm stuff to a particular console number.

Then I think you'd also name a different X11 config file, where that 
config file is pretty much the same as the original. I say *think* 
because I've always wanted to try this, but never did. I say that you'd 
use the same config xorg file because you're using just a single video 
card and monitor, rather than having two of each. I've never attempted 
to figure out what things must be configured separately, and which a 
pair of servers can share. If I were to try this though, the first thing 
I'd do is configure all servers to NOT use DRM/hardware accel, and only 
add that after if it works. I'd love to hear how it works out....

> I can get this working by switching to VT1, logging in and then
> issuing the commands. Everything works OK that way. But I cant do it
> from xterm. I figure that I either have to set something in the GDM
> config file, set something for xauth, or set something in analogy to
> the /etc/X11/xdm/Xservers file but I cant find any info on how to do
> so. Can somebody help me out?

You'll notice that the /etc/inittab points at a config file in the X11 
area. My guess is that this line and what it points at decides to set up 
an environment that avoids running more than one gdm/xdm/kdm. Changing 
that line and editing the file it points at might solve the problem (one 
reason I never try this is because I fear messing up something that 
works well already...it's just a curiosity to me).

D. Stimits, stimits AT comcast DOT net



More information about the LUG mailing list