LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   two xorg servers! (https://www.linuxquestions.org/questions/linux-general-1/two-xorg-servers-537741/)

danotrilogic 03-15-2007 10:55 AM

two xorg servers!
 
Hi everybody!

I'm very interested in launching two xorg servers on my computer.
I want to use two monitors, two keyboards and two mouses with the same computer independently, so two users can use the same computer at the same time, is that possible?
Can they use different user acounts?
Can I launch 2 different GDM sessions at the same time?
I think I will need two different graphic cards (and different drivers), or maybe one with two VGA outs?

Thanks.

PTrenholme 03-15-2007 11:07 AM

Why do you want/need two X servers?:scratch:

Most X servers can handle multiple screens and sessions, and the stty functionality lets multiple users connect to (and use) a running X server.

For example, the KDE display manager (KDM) configures the X server for support of four different sessions (using four different desktop environments if that’s what the users want) for as many as four different users.

danotrilogic 03-15-2007 11:11 AM

how do you manage the input devices?
 
OK, you're right.
But how to configure the input devices?
how one keyboard is used only in one desktop?
what would we have to do in the xorg.conf file?
any ideas?

SciYro 03-15-2007 01:55 PM

This sounds easy to do.

First, note that every hardware is called something different, so its easy to select what hardware to use. Its also possible to launch 2 X servers on the same computer, "startx -- :0" will start the first server, "startx -- :1" will launch the second (the first "startx" can just be "startx").

Next, configure the Xorg configuration. Create sections for all of your devices, leave the 'Layout' section out, this will produce a configuration that shouldn't really work with a plain "startx", or at least not very good. When starting X, you will have to select what devices should be used. Example:
Code:

startx -- -keyboard key1 -pointer mouse1 -screen screen1 :0
that will start the first X server, key1 being a keyboard identifier, same for all the other names (screen1, mouse1).

That should allow you to do what you want i think.

EDIT: yes, two different accounts can be active, each with their own server. GDM, im not sure, the only reason it might not is if GDM acts like a daemon-server, preventing others from spawning, but since its job as a display manager is to manage displays, it should be possible to have multiple instances running.

Yes, two different cards are required, im not sure how to get two different X servers to use the same card, perhaps by running three servers, with xvnc or something to output the two servers onto the third which controls the hardware (and uses xire-whatever its called to create a single screen, in which the two xvnc's run in such a way that they each occupy a different monitor fully).

danotrilogic 03-15-2007 03:34 PM

thanks!

I'm going to test something like that soon!
I think this configurations can be useful for schools and other kind of places, so one computer can be used independently by two students.

lurko 03-15-2007 08:34 PM

posted this link the other day for someone else, should be helpful to you as well danotrilogic.

Build a Six-headed, Six-user Linux System

A few more heads than you intend to use, but same deal.

edit: as I've suggested a couple times recently, what I would do differently than the guide is give all the Monitor, Device and Screen sections for each physical monitor the same Identifier. The guide has Identifiers like "screen1", "screen2", "device1", "device2", and "monitor1", "monitor2" - what I would do is label all the "1" Identifiers "CRT1" or "one" or whatever really, as long as they're all the same, and all the "2" Identifiers "CRT2" or "two". With multiple devices this makes the entire process 100% simpler. Hopefully my explanation was similar in that respect.


All times are GMT -5. The time now is 10:26 AM.