Text last updated 26-July-2005
26-July-2005 Update
I just received the following email from MK in Germany:
Hi!
We patched our Debian Testing installation with your changes presented
on http://www.busam.com/redhat9/xfree.html as we want to connect several
displays attached to doors to one computer using SiS USB VGA adapters.
These displays provide a touchscreen "mouse" but no keyboard each.
We built a patch file as this is MUCH easier than handling the complete
source files provided on your website. It'd be nice if you could add the
patch (attached) to the files on your website.No need to give credits (I'm privacy paranoid ;-).
Thanks!
MKHere is the link to the diff file he sent: download diff
Thanks MK!!!!
Below is a summary of some work I did to allow multiple simultaneous XFree86 sessions under Linux, for example multiple users or background sessions. I never got it working the way I wanted so I haven't finished this project. Because it still might be useful to others as a starting point, I'm leaving this page on the web.
My interest was to run MythTV in a background session and use XFree86 with my CRT, keyboard, and mouse in the normal manner, including being able to switch virtual terminals.
The code I tried is based on the excellent efforts of Miguel Freitas. I suggest that you check out Miguel's web site for background information. I'm not going to repeat his information but only describe what I am doing that is different.
My goal was to have one XFree86 binary that will support the "standard" XFree86 operating modes and the following variations:
1. Miguel's second layout (2nd CRT, USB keyboard, and mouse)
2. Miguel's first layout (Main CRT, keyboard, and mouse)
3. Background use (2nd CRT or TV, no keyboard, no mouse)
Miguel's first layout (if I understand it correctly) disables VT switching so I couldn't use it for my main CRT. In my environment, I wanted to control my background MythTV session using an infrared remote control.
Since one XFree86 binary will support all modes, I replaced the XFree86 binary (e.g. /usr/X11R6/bin/XFree86) that came with my distribution - after renaming it for backup in case I want to go back to it. The mode in which an instance of XFree86 will operate is controlled by the layout and configuration parameters in XF86Config.
It seemed that I got the multiple configurations to run based on the XF86Config file but I never got it to run without the 2nd keyboard and mouse. Since I didn't have a USB keyboard or mouse I didn't even fully verify that I could run two sessions simultaneously.
For each configuration you will use, create a ServerLayout in your XF86Config file (e.g. /etc/X11/XF6Config). Follow the normal rules with the following modifications to the InputDevice sections for Keyboard. You will likely have a different Input Device Keyboard section for each different mode or instance of XFree86 that you plan to run.
For a "standard" XFree86 there are no modifications to the keyboard section. You can have one layout that uses this mode of operation.
For all of the variations mentioned above, add the following line to the keyboard section:
Option "MultiUser" "yes"
In addition you need to change the keyboard driver line as follows:
1. For Miguel's second layout, change the protocol to be "usbev", such as:
Option "Protocol" "usbev"
2. For Miguel's first layout, leave the protocol line as before
3. For Background, change the protocol to be "none", such as:
Option "Protocol" "none"
That's it!
I have not created packages or compressed files. Click here to get a directory listing of my current XFree86 binary, XF86Config, and the source files that I have modified. Use at your own risk. (BTW: All of the code I changed is marked by a comment that starts with MU. So in vi, just do a search for *MU (those 3 characters) to find all my code changes.)
Make sure your new version of XFree86 has the correct permissions. Check your original distribution copy for the necessary permissions.
My system base at the time was RedHat's kernel-2.4.20-18.9 and XFree86-4.3.0-2.src.rpm.
I'm interested in your comments, help, corrections, etc. Email me at vince@busam.com.