Filewatcher File Search
FTP Search
  
Directory 
  
Content Search 
   
pkg://tldp-howtos-txt-20061121-1.pkg.tar.gz:8937973/usr/share/doc/howto/txt/XFree-Local-multi-user-HOWTO  downloads

XFree Local Multi-User HOWTO

Svetoslav Slavtchev

<svetoslav (at) users.sourcefourge.net>

Aug 2004
Revision History                                                             
Revision 1.4            2004-08-14             Revised by: SS                
add some info on the new IsolateDevice XFree/X.org, drop some stalled        
comments about ruby-2.6 (a lot more must be removed - linux-2.6 is table now)
Revision 1.3            2003-11-11             Revised by: SS                
Ruby-2.6 is working :) , sync to new BRuby, add config file paths for Gentoo 
Revision 1.2            2003-09-17             Revised by: SS                
Lots, lots of stuff. the most major things: XFree-PrefBusID v3, input.rc (and
exp. service ruby_init), add "Known Limitations"                             
Revision 1.1            2003-07-14             Revised by: SS                
sync input agent with examples, a bit more about ruby, less Fix-Me's,        
additions to video compatibility                                             
Revision 1.0            2003-05-13             Revised by: TP                
Initial release, reviewed by LDP.                                            


 This HOWTO explains one of the ways to get a working, multiple, local X
user-capable PC system for up to 16 users. It is based on using a modified
Linux kernel with support for multiple independent users . The second way is
not covered here, but on the web page of it's author, the pioneer Miguel
Freitas.

-----------------------------------------------------------------------------
Table of Contents
1. Introduction
    1.1. About Backstreet Ruby/ Ruby
    1.2. About this document
    1.3. Related Documentation
    1.4. New versions of this document
    1.5. Copyright and License
    1.6. Disclaimer
    1.7. Credits/Contributors
    1.8. Feedback/Bug Reporting
   
   
2. Before we begin
    2.1. Known Limitations
    2.2. XFree configuration files
    2.3. Reusing Xinerama configured XFree
    2.4. Binary packages
   
   
3. Installing the kernel
    3.1. Installing the Backstreet Ruby/ Ruby-2.6 kernel
    3.2. Notes on building your own kernel
    3.3. Creating needed device files
    3.4. Notes on using multiple VT's & VGA console
    3.5. Keyboard numbering(order of detection)
   
   
4. Setting up the X servers
    4.1. Do I need a modified X server?
    4.2. Installing and Configuring XFree-PrefBusID
    4.3. Creating symbolic links
    4.4. Using independent keyboards with XFree
    4.5. Using independent mice with XFree
    4.6. For graphic cards without DRI
    4.7. Nvidia GLX & DRI
   
   
5. More on configuring input devices
    5.1. Finding the real devices
    5.2. Using hotplug with input.agent and input.rc
    5.3. Using XFree with event interface support
    5.4. Using the "Phys" descriptor and USB devices
   
   
6. Configuring display managers
    6.1. Configuring xdm and kdm
    6.2. Configuring gdm
   
   
7. Tweaking it
    7.1. Using independent sound cards
    7.2. Customising the login screen
    7.3. 1st X server configuration file
    7.4. Number X servers started by Display managers
    7.5. Dynamically switching the number of X servers
   
   
8. Known problems
    8.1. Hardware problems
    8.2. Software problems
   
   
9. Special notes on some distributions
    9.1. Mandrake
    9.2. Red Hat
    9.3. Debian
    9.4. SuSE
   
   
10. Final words
A. Video Compatibility list
    A.1. Graphic card pairs/triples that work perfectly
    A.2. Graphic card pairs/triples that work, but with some glitches
   
   
B. Example configuration files
    B.1. XFree86
    B.2. Display managers
    B.3. Configuration files for Input Agent
   
   
C. Scripts
    C.1. hotplug: input.agent
    C.2. hotplug: input.rc
    C.3. hotplug & XFree supporting event devices: input.agent
    C.4. Wrapper for starting X using Nvidia libGL.so
    C.5. For installing Nvidia drivers for parallel use with DRI
   
   
D. Experimental Backstreet Ruby configuration Script/ Service
    D.1. README.ruby_init explains how to configure and use the service.
    D.2. The global configuration file /etc/sysconfig/ruby.conf
    D.3. The ruby_init service /etc/init.d/ruby_init
    D.4. Modified hotplug input.agent /etc/hotplug/input.agent
   
   

-----------------------------------------------------------------------------
Chapter 1. Introduction

1.1. About Backstreet Ruby/ Ruby

Backstreet Ruby is a kernel patch for the Linux kernel. It is a back port to
Linux-2.4 of the Ruby kernel tree, which is developed by the Linux Console
Project. The aim of the Linux Console developers is to enhance and reorganize
the input, the console and the framebuffer subsystems in the Linux kernel, so
they can work independent from each other and to allow multi-desktop
operation. All this is done in the Ruby kernel tree which is based on the
development Linux-2.5 kernel. The new Input subsystem and the new Framebuffer
layer are already integrated in Linux-2.5 kernel, but as the main developer
of the Linux Console Project, James Simmons, is too busy with completing the
rewrite of the framebuffer layer in Linux-2.5, the multi-desktop operation
will not be integrated in the next stable Linux kernel (Linux-2.6).

So Backstreet Ruby brings to the current stable Linux kernel (Linux-2.4) the
enhanced input subsystem and the ability to use multiple graphic cards and
multiple keyboards independently, in order to make multiple local XFree users
on a single PC system possible.

You can have multiple independent graphic cards and multiple independent
mice, but in order for multiple users to interact with the system, they do
need independent keyboards as well. Multiple independent keyboards is the
feature that Linux-2.4 (and in the future Linux-2.6) lacks, and this is what
Backstreet Ruby adds to the stable Linux kernel Linux-2.4.

The entire work on back porting Ruby to Linux-2.4 is done by Aivils Stoss. <
Aivils.Stoss (at) unibanka.lv>

Aivils got recently his hands on Ruby, and now Ruby is fully functional[1]
too, so if you prefer the Linux-2.6 kernel you might use Ruby instead of
Linux-2.4 + Backstreet Ruby.

Visit his web site for more information on the patch itself, on the current
status, how to build a kernel using his patch or how to build modified
XFree86 server.

You can find it here:[http://startx.times.lv/] http://startx.times.lv

There are also several mirrors

 1. in the United States:
   
    [http://people.debian.org/~andreas/aivils/] http://people.debian.org/
    ~andreas/aivils/
   
 2. in Germany:
   
    [http://www.schuldei.org/aivils/] http://www.schuldei.org/aivils/
   
 3. in the United Kingdom:
   
    [http://karlovo.demon.co.uk/~svetlio/aivils/] http://karlovo.demon.co.uk/
    ~svetlio/aivils/
   

The address of the Linux Console Project is: [http://linuxconsole.sf.net]
http://linuxconsole.sf.net
-----------------------------------------------------------------------------

1.2. About this document

This document explains how to configure your system for multiple local XFree
users using the enchanted console/input subsystem in the Backstreet Ruby/
Ruby-2.6 kernel .

I will use :

  * "Backstreet Ruby" or "BRuby" to refer to the back port to Linux 2.4
   
  * "Ruby" or "Ruby-2.6" to refer to the original Ruby kernel tree for Linux
    2.6
   

Every mention of Backstreet Ruby should be replaceable by Ruby/ Ruby-2.6
unless else mentioned.

Note Note                                                                    
     Currently it is not possible to set up systems for multiple console     
     users.                                                                  

There are two ways of setting up multiple local XFree users:

 1. Modify the kernel to ignore input from USB keyboards and add the handling
    of USB keyboards to a modified Xserver. This solution was developed by
    Miguel Freitas. Visit his page on the topic at [http://
    cambuca.ldhs.cetuc.puc-rio.br/multiuser/] http://
    cambuca.ldhs.cetuc.puc-rio.br/multiuser/, for instructions on how to set
    up such a system.
   
 2. Use the Backstreet Ruby kernel which supports independent keyboards.
   

I'll concentrate on configuring a system for multiple local XFree users using
the Backstreet Ruby kernel, but there are parts which can be used also on a
system using the solution from Miguel Freitas.

Note Note                                                                    
     This document is not intended to be a replacement of the existing       
     documentation on the Backstreet Ruby home page ([http://startx.times.lv 
     /] http://startx.times.lv), but rather, this is a HOWTO, explaining the 
     way to a working X multi-user PC system. If you encounter any problems  
     you'll probably need to consult the more detailed information there.    
                                                                             
     The document is based on the file system layout of the Mandrake-Linux   
     distribution, but I tried to make it distribution-independent by        
     including information about the differences to other mainstream         
     distributions like Debian, Red Hat and SuSE Linux.                      
-----------------------------------------------------------------------------

1.3. Related Documentation

  * The Linux Console Project
   
    [http://linuxconsole.sourceforge.net] http://linuxconsole.sourceforge.net
   
  * The Backstreet Ruby home page
   
    [http://startx.times.lv/] http://startx.times.lv/
   
  * XFree with support for the new input layer by Zephaniah Hull
   
    (seems the patches are obsolated, and were removed from the site)
   
    [http://people.debian.org/~warp/evdev/] http://people.debian.org/~warp/
    evdev/
   
  * Miguel Freitas' page on multiple local XFree users
   
    [http://cambuca.ldhs.cetuc.puc-rio.br/multiuser/] http://
    cambuca.ldhs.cetuc.puc-rio.br/multiuser/
   
  * Russian multi-terminal project Gorinich
   
    [http://www.ctc.msiu.ru/zg/main.html] http://www.ctc.msiu.ru/zg/main.html
   
  * Step by step instructions by Jean-Daniel Pauget
   
    [http://disjunkt.com/dualhead/] http://disjunkt.com/dualhead/
   
  * Multi-seat XFree solution under Linux with framebuffers, by Frode Trydal
   
    [http://www.itsopen.net/projects/x-hack/] http://www.itsopen.net/projects
    /x-hack/
   

-----------------------------------------------------------------------------
1.4. New versions of this document

You can find the latest stable version of this How-To at The Linux
Documentation Project web site:

[http://tldp.org/HOWTO/XFree-Local-multi-user-HOWTO/index.html] http://
tldp.org/HOWTO/XFree-Local-multi-user-HOWTO/

and the latest unstable version :

[http://karlovo.demon.co.uk/~svetlio/ruby-contrib/how-to/
XFree_local_multi-user-HOWTO/] http://karlovo.demon.co.uk/~svetlio/
ruby-contrib/how-to/XFree_local_multi-user-HOWTO/
-----------------------------------------------------------------------------

1.5. Copyright and License

  This document, XFree-Local-multi-user-HOWTO, is copyrighted (c) 2003 by 
Svetoslav Slavtchev.

  Permission is granted to copy, distribute and/or modify this document under
the terms of the GNU Free Documentation License, Version 1.1 or any later
version published by the Free Software Foundation; with no Invariant
Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of
the license is available at [http://www.gnu.org/copyleft/fdl.html]   http://
www.gnu.org/copyleft/fdl.html.

  Linux is a registered trademark of Linus Torvalds.

  NVIDIA is a registered trademark of NVIDIA Corporation.
-----------------------------------------------------------------------------

1.6. Disclaimer

  No liability for the contents of this document can be accepted. Use the
concepts, examples and information at your own risk. There may be errors and
inaccuracies, that could be damaging to your system. Proceed with caution,
and although this is highly unlikely, the author(s) do not take any
responsibility.

  All copyrights are held by their by their respective owners, unless
specifically noted otherwise. Use of a term in this document should not be
regarded as affecting the validity of any trademark or service mark. Naming
of particular products or brands should not be seen as endorsements.
-----------------------------------------------------------------------------

1.7. Credits/Contributors

  In this document, I have the pleasure of acknowledging:

  * James Simmons <jsimmons (at) transvirtual.com >
   
    for working so hard on Linux console project, for developing the new
    framebuffer, VT/console subsystem
   
  * Vojtech Pavlik<vojtech (at) suse.cz>
   
    for rewriting the input subsystem and working hard on the Linux console
    project
   
  * Aivils Stoss <Aivils.Stoss (at) unibanka.lv>
   
    for back porting Ruby to linux-2.4 and providing his back port and
    experiences to the world
   
  * Andreas Schuldei <andreas (at) schuldei.org>
   
    for providing Debian packages, comments about Debian
   

-----------------------------------------------------------------------------
1.8. Feedback/Bug Reporting

Feedback is most certainly welcome for this document. Send your additions,
comments and criticisms to the following email address : <svetoslav (at)
users.sourcefourge.net>.

In case you experiance troubles in configuring the system, feel free to
contact me or the linuxcosnole mailing list.

Please send as much details as possible, the most important information would
be (from a running Backstreet Ruby kernel):

  * output from dmesg
   
  * output from lsmod
   
  * output from cat /proc/bus/console/*/*
   
  * contents of /proc/bus/input/devices
   
  * contents of /proc/bus/usb/devices
   
  * contents of the XFree configuration file(s) /etc/X11/XF86Config(-4)
   
  * contents of the XFree86 log files /var/log/XFree86.[n].log
   

-----------------------------------------------------------------------------
Chapter 2. Before we begin

-----------------------------------------------------------------------------
2.1. Known Limitations

XFree does not support DRI acceleration on multiple graphic cards. The only
way to get multiple accelerated X sessions is to use Nvidia's closed source
driver and GL library or a single card using DRI and multiple cards using
Nvidia's closed source drivers. XFree extensions not dependent on DRI should
work.

Most of the multiheaded graphic cards can be used only for a single user/
display. In order to start independent X servers the heads have to be
explicitly addressable (which can not be done with most of the cards). It
should be possible to use cards with explicitly addressable heads for
independent displays, but this has not yet been tested.

In the following cases it might be possible to use a single multiheaded card
for multiple independent displays :

  * The card(s) have different PCI Bus ID's for the different heads
   
    (for example Matrox MMS G200/G450)
   
  * The card(s) register frame buffer device for each head (only with the
    Linux-2.5/2.6 patch)
   
    Have in mind that the XFree frame buffer driver does not support
    acceleration and most of the XFree extensions.
   
    (for example Matrox G400DH, G450DH, G550DH)
   

Using/configuring independent devices for the independent screens/users is
pretty hard or not explored. Exceptions are the input devices, graphic cards
and sound thanks artsd. Some examples of such unexplored areas:

  * External storage device (USB/Firewire hard disks, CD/DVD drives, ZIP/
    Floppy drives, memory sticks, ....
   
  * USB/Firewire printers, scanners, cameras ...
   

In case you succeed in configuring such devices for independent usage by
multiple users, please share with us how you did it.

Note Note                                                                    
     This doesn't mean that the devices won't work, but that every user will 
     have access to all devices.                                             

Currently under Backstreet Ruby/ Ruby you can have a maximum of 16 Virtual
Terminals (8 for Backstreet Ruby released before 7 Oct 2003). This means that
without hotplug configured if you are using USB keyboards with fancy keys you
are limited to maximum of 8 independent users ( for older versions Backstreet
Ruby - 4 users). So do use hotplug if you are going to setup a system for
more then 4 users ( even systems with 2 attached USB keyboards benefit from
using hotplug).

If you are using hotplug the maximal number of independent users is 16 for
Backstreet Ruby / Ruby-2.6 and 8 for older versions Backstreet Ruby.
-----------------------------------------------------------------------------

2.2. XFree configuration files

You should configure each of your video cards to work properly with a single
X server, which is actually beyond the scope of this document. You should
refer to the documentation that came with your distribution, but some general
hints couldn't hurt.

The easiest way would be to use the same kind of monitors & video cards, you
could then configure only the first card/monitor pair, make copies of this
configuration file for the number of video cards you have, and then only
adjust the BusID "PCI:x:xx:x" field in the configuration file. You can do
this with the help of lspci, XFree86 -scanpci -verbose , or other similar
distribution-specific tools.

You could use a similar approach if you have only monitors or video cards of
the same type.

Most modern distributions also have advanced tools for easier configuration
of Xinerama. You can use these tools to set up the system for Xinerama and
then use this configuration file for generating the configuration files for
the different X servers. You can use an example configuration file, replacing
video card and monitor section, by the corresponding sections from the
Xinerama XFConfig-4 file.

Other useful resources:

  * [http://www.tldp.org/HOWTO/XFree86-HOWTO/index.html] The Linux XFree86
    HOWTO
   
  * [http://www.tldp.org/HOWTO/XFree86-Video-Timings-HOWTO/index.html]
    XFree86 Video Timings HOWTO
   
  * [http://www.tldp.org/HOWTO/XWindow-Overview-HOWTO/index.html] X Window
    System Architecture Overview HOWTO
   
  * [http://www.tldp.org/HOWTO/XWindow-User-HOWTO/index.html] The X Window
    User HOWTO
   

-----------------------------------------------------------------------------
2.3. Reusing Xinerama configured XFree

If you have a system configured for Xinerama, you can easily adjust the XFree
configuration file so you can use it for multiple users.

This will allow you to easily switch between a multi-user environment and a
Xinerama multi-monitor environment.

What is Xinerama and how does the system configured using this HOWTO differ
from a system using the Xinerama extensions in XFree?

The Xinerama extensions were introduced to the XFree86 system in version 4.0.
Xinerama is an extension to XFree86 Release 6 Version 4.0 (X4.0) which allows
applications and window managers to use the two (or more) physical displays
as one large virtual display. In case Xinerama is not used, applications can
only reside on one of the displays and can not be moved between the two.
Window managers had to be specially written to support the two displays. With
Xinerama, window managers and applications don't have to be specially written
to support the larger "Virtual Desktop" Xinerama creates.

Just the opposite, the primary goal of a system configured according to this
HOWTO is to offer multiple independent displays for several users on a single
PC system.

For more information on Xinerama read:

  * [http://www.tldp.org/HOWTO/Xinerama-HOWTO/index.html] Xinerama-HOWTO,
    Using Xinerama to MultiHead XFree86 v.4.0+
   

-----------------------------------------------------------------------------
2.4. Binary packages

Binary rpms of modified XFree servers are currently available for Mandrake
8.2/ 9/ 9.1/ 9.2, Red Hat 8/ 9, SuSE 8.1. If you're running other rpm-based
distributions please help me to prepare and rebuild packages, so other users
can get pre-compiled binaries. Currently the binary rpm packages are not
mirrored and are only available from [http://karlovo.demon.co.uk/~svetlio/
ruby-contrib] http://karlovo.demon.co.uk/~svetlio/ruby-contrib.

Binary packages for Debian Sid are also available thanks to Andreas Schuldei
at [http://www.schuldei.org/debian/bruby] http://www.schuldei.org/debian/
bruby, or as apt repository "deb http://www.schuldei.org/debian/bruby ./ ".
-----------------------------------------------------------------------------

Chapter 3. Installing the kernel

Note The installation of Ruby-2.6 is not fully covered, partly because there 
     are almost no differences compared to the installation of Linux-2.6     
     kernel, partly because I have not gathered enough experience with       
     Ruby-2.6 yet, so any comments and questions are welcomed.               
                                                                             
     If you are going to use Ruby-2.6, please do install Linux-2.6 without   
     the Ruby-2.6 patch first and configure your system for it, in order to  
     avoid tracking "Ruby-2.6 Bugs" which are actually due to a not properly 
     configured system because of the Linux-2.4 -> Linux-2.6 changes. A good 
     starting point is probably [http://www.codemonkey.org.uk/docs/          
     post-halloween-2.6.txt] http://www.codemonkey.org.uk/docs/              
     post-halloween-2.6.txt" .                                               

-----------------------------------------------------------------------------
3.1. Installing the Backstreet Ruby/ Ruby-2.6 kernel

Now it's time to install the kernel.

The easiest way would be to pull an already prepared binary kernel; there are
packages for some distributions (currently only Mandrake and Debian) or a
source package, and rebuild it on your system.

If for some reason you cannot use them or have problems using them you can
also build your own kernel with the Backstreet Ruby/ Ruby-2.6 patch. For more
information how to do this visit the Backstreet Ruby page on building and
installing the kernel: [http://startx.times.lv] http://startx.times.lv (or
some of the mirrors) -> Documentation -> Quick Kernel.

(If you are new to Linux, reading "The Linux Kernel HOWTO", [http://tldp.org/
HOWTO/Kernel-HOWTO.html] http://tldp.org/HOWTO/Kernel-HOWTO.html, could be
very helpful.)

You can find binary kernel packages for Mandrake at [http://
karlovo.demon.co.uk/~svetlio/ruby-contrib/] http://karlovo.demon.co.uk/
~svetlio/ruby-contrib/.

Debian binary kernel packages are available at [http://www.schuldei.org/
debian/bruby] http://www.schuldei.org/debian/bruby, or as apt repository "deb
http://www.schuldei.org/debian/bruby ./ "

Note Note                                                                        
       * If you are going to use USB input devices, it's recommended to use the  
         hid driver instead of usbkbd/ usbmouse.                                 
                                                                                 
       * Upon loading the hid driver, you might get the following error message: 
                                                                                 
         [root@svetljo RPM]# modprobe hid                                        
         modprobe: Can't locate module keybdev which is needed for hid           
         [root@svetljo RPM]#                                                     
                                                                                 
         The reason is that in some version of the module-utils package this     
         dependency is hardcoded, but overrideable, so you should override it by 
         adding "above hid usbcore" to your /etc/modules.conf                    
                                                                                 
                                                                                 
-----------------------------------------------------------------------------

3.2. Notes on building your own kernel

There are some things I would like to mention, although I won't go in
details, as the Backstreet Ruby page on compiling the kernel discusses this
topic.

 1. You have to follow this order:
    Input support                                                            
    Virtual Terminal support                                                 
    Console drivers                                                          
                                                                             
   
    for all required options to be available/selectable.
   
 2. You have to use built in input support:
    Input device support --> Input devices (needed for keyboard, mouse,..)   
    Input device support --> Mouse support                                   
                                                                             
   
 3. I would suggest you also include at least one keyboard (built in - not as
    a module). You can also use modules, but I find it safer to be able to
    use a keyboard instead of trying to find a PC with ssh (or something
    similar) to load the required modules.
   
    For AT/PS2 keyboards, turn on (not modules):
    Input device support --> Serial i/o support                              
    Input device support --> i8042 PC Keyboard controller                    
    Input device support --> Keyboards                                       
    Input device support --> AT keyboard support                             
                                                                             
   
    For a USB keyboard turn on (not modules):
    Input device support --> Keyboards                                       
    USB support --> support for USB                                          
    USB support --> USB Host Controller Drivers                              
    USB support --> USB Human Interface Device (full HID) support            
    USB support --> HID input layer support                                  
                                                                             
   
 4. If you are new to Linux, do not try to patch an already patched kernel
    (heavily patched kernels like the ones that ship with most
    distributions). Use a kernel from [http://www.kernel.org] www.kernel.org,
    and take a look at the [http://www.tldp.org/HOWTO/Kernel-HOWTO/] Linux
    Kernel HOWTO.
   

Note Note                                                                    
     In Backstreet Ruby (the patch for a 2.4 Linux kernel) does not support  
     frame buffer devices , and for that reason is disabled.                 
                                                                             
     In Ruby (the patch for 2.6 Linux kernel) if you want to disable/ change 
     to modules support for PS2 input devices, you have to first activate/   
     enable "General setup --> Remove kernel features (for embedded systems)"
-----------------------------------------------------------------------------

3.3. Creating needed device files

If you are not using the devfs file system, you might need to create several
device files needed for the new input sub-system in the Backstreet Ruby
kernel:

Note Note                                                                    
     Most current distributions should already provide the necessary device  
     files, so try booting Backstreet Ruby without creating the device files 
     and in case you don't miss input devices omit this section. Any         
     distribution that came with XFree-4.3.0 and linux-2.4.20 should provide 
     these device files.                                                     
cd /dev                                                                      
mkdir input.old                                                              
mv mouse js? input.old                                                       
mkdir input                                                                  
cd input                                                                     
mknod js0 c 13 0                                                             
mknod js1 c 13 1                                                             
mknod js2 c 13 2                                                             
mknod js3 c 13 3                                                             
mknod mouse0 c 13 32                                                         
mknod mouse1 c 13 33                                                         
mknod mouse2 c 13 34                                                         
mknod mouse3 c 13 35                                                         
mknod mice c 13 63                                                           
mknod event0 c 13 64                                                         
mknod event1 c 13 65                                                         
mknod event2 c 13 66                                                         
mknod event3 c 13 67                                                         
cd ..                                                                        
ln -s input/js0 js0                                                          
ln -s input/js1 js1                                                          
ln -s input/mice mouse                                                       
                                                                             

If you use devfs, all required devices will be created automatically by
devfs.

Mandrake is an example of one distribution that uses devfs. Debian does not
use devfs by default, but the kernel supports devfs; in order to activate
devfs you have to add "devfs=mount" to the "append" line of your boot loader
and install devfsd (the devfs demon). Distributions that do not use devfs are
Red Hat and SuSE.

You can check whether devfs is used by issuing the following commands:

  * To check whether support for devfs is enabled in your kernel
   
    cat /proc/filesystems | grep devfs
   
  * To check whether devfs is used/mounted
   
    mount | grep devfs
   

If you get an empty string this means that devfs is not used; if you get
something like the following output, devfs is activated:
[root@mc contrib]# cat /proc/filesystems | grep devfs                        
nodev   devfs                                                                
nodev   usbdevfs                                                             
[root@mc contrib]# mount | grep devfs                                        
none on /proc/bus/usb type usbdevfs (rw)                                     
none on /dev type devfs (rw)                                                 
[root@mc contrib]#                                                           
                                                                             
-----------------------------------------------------------------------------

3.4. Notes on using multiple VT's & VGA console

As the frame buffer layer is not back-ported to Linux-2.4, only the primary
graphic card is initialized during the boot process. Secondary graphic cards
can only be initialized by an X server, so under Backstreet Ruby you will
have a single VGA text console on the primary graphic card.

Ruby for Linux-2.6 supports framebuffer devices and single framebuffer
console (which takes over the VGA console), but support for multiple VT's
through framebuffer consoles is not yet ready.

To keep VGA console properly working it is important first to be started the
XFree instance which will drive the graphic card which is used for VGA
console(the graphic card defined as primary in BIOS).
-----------------------------------------------------------------------------

3.5. Keyboard numbering(order of detection)

In the following chapters you will read about 1st keyboard, 2nd keyboard and
so on, so here I will explain what is meant by n-th keyboard.

When a keyboard device is found, it is bound to a free VT (given that there
are free VT's). The first keyboard found will be bound to VT0 (tty1-tty16),
the second to VT1 (tty17), the third to VT2 (tty18).

Note Note                                                                    
     Older versions of the bruby patch (released before Oct 7 2003) use :    
                                                                             
     first keyboard found => VT0 (tty0-tty7)                                 
                                                                             
     second => VT1 (tty8-tty15)                                              
                                                                             
     third => VT2 (tty16-tty23)                                              

The order of detecting the keyboards depends on the configuration of your
kernel :

  * If you are using kernel with integrated USB input the USB keyboard
    devices will be registered first, then the AT/PS2 keyboards will follow
    when the modules are loaded
   
  * If you are using kernel with integrated PS2 input the AT/PS2 keyboard
    devices will be registered first, then the USB keyboards will follow when
    the modules are loaded
   
  * If you are using kernel with integrated PS2 & USB input the AT/PS2
    keyboard devices will be registered first, then the USB keyboards will
    follow
   

But there are some caveats:

Most USB keyboards represent themselves as more than one keyboard; it is
common that the multimedia keys or the number-pad identify themselves as a
different keyboard device. So if you are running a kernel with integrated USB
input and have one USB keyboard with multimedia keys and one PS2 keyboard,
the USB keyboard will be bound to VT0(real keyboard) and VT1(multimedia
keys), the PS2 keyboard will be bound to VT2 (in case you have enough DUMB
consoles).

There are several ways to work around these issues. Here I'll explain the
easiest way to follow. It's definitely not the best one, but the shortest
explanation, and I just want to make it clear to you that the problem is not
that big. The better solutions will follow later in their own section.

All you need to do is to start the Backstreet Ruby/ Ruby kernel with dumbcon=
n , where n is the sum of your AT/PS2 keyboards plus the sum of your USB
keyboards multiplied by 2 (I suppose this is the maximum number of interfaces
a USB keyboard registers), so all keyboards will be bound to a VT. Now you
should find out which VT's the real keyboards are bound to (the keyboards
excluding the multimedia keys) and start X using the appropriate tty ranges.
Thanks to the proc interface integrated in Backstreet Ruby, you can easily
find the assignment of keyboards to VT's. Each VT creates a file /proc/bus/
console/[n]/keyboard (n is the number of the VT, for VT0 n will be 00, for
VT1 - 01, ... , for VT11 - 11); reading this file will give you the assigned
keyboard.

[root@svetljo root]# cat /proc/bus/console/*/*                               
usb-00:10.1-1.1/input0                                                       
usb-00:10.1-1.1/input1                                                       
isa0060/serio0/input0                                                        
tells us that:

  * USB keyboard (real) is bound to VT0
   
  * USB keyboard (multimedia keys) is bound to VT1
   
  * PS2 keyboard is bound to VT2
   

Now we can start X on the VT's with real keyboards, in this case VT0 and VT2.

Of course in this simple example with only 2 keyboards (one USB and one PS2)
the problem could be easily avoided by using a kernel with primary PS2 input
support. The PS2 keyboard would be found first and bound to VT0, the USB
keyboard would follow and it's real keyboard interface would be bound to VT1,
so there is no need for additional dumb consoles (for the multimedia
interfaces of USB keyboards).
-----------------------------------------------------------------------------

Chapter 4. Setting up the X servers

Now its time to configure XFree.
-----------------------------------------------------------------------------

4.1. Do I need a modified X server?

Note Note                                                                    
     For some video cards you can skip this part. Before installing the      
     modified X server check the Video Compatibility list to determine       
     whether you need one. Currently there are reports for working           
     configurations without using a modified X server for Voodoo Graphics as 
     primary and Voodoo3 or Nvidia TNT2 as secondary.                        

"Why should a modified X server be used?" - The reason is that XFree is
designed to serve a single user and this design requires a single X server to
drive all available graphic cards. So when an unmodified X server starts, it
disables access to graphic cards for other X servers. Hence we have to modify
XFree to make it possible more then one X server to run at the same time.

  * "The experimental way": you can use the "hackvideo"(ignoring pci_disable
    XFree commands) feature of the Backstreet Ruby kernel. This will allow
    you to use the XFree server that came with your distribution (no need for
    installing modified XFree server).
   
    Q: "Why experimental?"
   
    A: Well, you have to find out whether it works with your combination of
    graphic cards. There are some combination that works flawlessly, but the
    majority of tested combinations have problems with this setup.
   
   
  * "The surer way": you have to install XFree server modified with the
    Prefered Bus ID patch.
   
    Q: "Why surer?"
   
    A: Because it works with all "supported graphic cards", solves a lot of
    stability problems and makes it possible to use VGA console on the
    primary graphic card.
   
   

If you decide first to try without installing a modified X server, follow
these steps:

 1. To enable this feature you have to add this to your XFree configuration
    file:
    Section "ServerFlags"                                                    
    ...                                                                      
    Option "PciOsConfig" "1"                                                 
    ...                                                                      
    EndSection                                                               
   
   
 2. and to inform the kernel to filter unnecessary PCI commands:
    [root@mc contrib]#echo  "1"> /proc/bus/pci/hackvideo                     
   
   
 3. If you want this to be done automatically on every boot you have to add :
    if [ -x /proc/bus/pci/hackvideo ];then                                   
          /bin/echo "1"> /proc/bus/pci/hackvideo                             
    fi                                                                       
   
    to your init scripts, preferably somewhere at the end of /etc/rc.d/
    rc.sysinit (so the command is executed before X is started)
   
   
 4. If you want to disable this functionality you have to:
    [root@mc contrib]# echo "0"> /proc/bus/pci/hackvideo                     
   
   

Note Note                                                                    
     This functionality exists in the Backstreet Ruby kernel since 15. May   
     2003 and in Ruby-2.6 since 29. Sep 2003 , but will never be added to the
     official linux kernel as it is a small hack to spare you installing     
     modified X server.                                                      
                                                                             
     It is still recommended to install modified X server.                   
-----------------------------------------------------------------------------

4.2. Installing and Configuring XFree-PrefBusID

 1. Install the modified XFree server.
   
      + Install an already built, but not packaged, modified X server and
        create the necessary symbolic links. You can get such binaries from
        the Backstreet Ruby home page, at [http://startx.times.lv] http://
        startx.times.lv.
       
      + Help us (as well other people using your distribution) in building an
        rpm or binary for your distribution (we lack systems installed with
        all available distributions, so we are not able to build packages for
        every distribution).
       
      + To patch and rebuild XFree from source using the instructions on the
        Backstreet Ruby page. Go to the Documentation section, at [http://
        startx.times.lv] http://startx.times.lv (or some of the mirrors) ->
        Documentation -> Quick XFree.
       
   
 2. Find the BusID of your graphic cards
   
    Note Note                                                                
         For AGP cards, something similar to "1:0:0"                         
                                                                             
         For PCI cards, something similar to "0:xx:0"                        
   
      + In most cases you will find the BusID already set in the device
        section of the XFree configuration file.
       
        (Virtually always in case XFree is configured for Xinerama.)
       
      + If it is missing you can use lspci, XFree86 -scanpci -verbose or
        other similar tools that came with your distribution.
       
        With lspci look for "VGA compatible controller" or other similar
        tools that came with your distribution.
        root@svetljo mnt]# lspci | grep "VGA compatible controller"                           
        00:0d.0 VGA compatible controller: nVidia Corporation NV17 [GeForce4 MX 420] (rev a3) 
        01:00.0 VGA compatible controller: ATI Technologies Inc Radeon RV200 QW [Radeon 7500] 
        [root@svetljo mnt]#                                                                   
       
        With XFree86 -scanpci -verbose , or in case XFree is already running 
        XFree86 :1 -scanpci -verbose and look for your graphic cards:
        [root@svetljo mnt]# XFree86 :1 -scanpci -verbose                                               
        ......                                                                                         
        (0:13:0) unknown card (0x1462/0x8852) using a nVidia Corporation NV17 [GeForce4 MX 420]        
        ......                                                                                         
        (1:0:0) unknown card (0x1002/0x0f2a) using a ATI Technologies Inc Radeon RV200 QW [Radeon 7500]
       
   
 3. Configure XFree-PrefBusID. You have the following choices with the same
    effect:
   
      + Use the XFree config file option "SingleCard" , requires as argument
        a boolean value(true/false), added in patch version 3
       
        For use in multi-user environment set to true, for standard XFree
        behavior(single X server allowed) to false or comment out/ delete the
        line.
       
        Note This functionality is inlcuded the xorg-x11 packages for        
             Mandrake and in Debian Sid XFree86 packages.                    
       
      + Use the XFree config file option "PrefBusID" , requires as argument a
        valid BusID, added in patch version 2
       
        For use in multi-user environment include the option with a valid
        BusID, for standard XFree behavior(single X server allowed) comment
        out or delete.
       
        Note This functionality is inlcuded the xorg-x11 packages for        
             Mandrake and in Debian Sid XFree86 packages, but the option name
             is changed to "IsolateDevice"                                   
       
      + Use the XFree command line option -prefbusid x:x:x , requires as
        argument a valid BusID, initial release of the patch
       
        For use in multi-user environment pass the option with a valid BusID
        to XFree at start-up, for standard XFree behavior(single X server
        allowed) don't specify the option.
       
        Note This functionality is inlcuded the xorg-x11 packages for        
             Mandrake and in Debian Sid XFree86 packages, but the option name
             is changed to -isolateDevice x:x:x                              
       
   
    Note Note                                                                
           * For Mandrake and Debian users:                                  
                                                                             
             the XFree configuration files are normally /etc/X11/XF86Config-4
                                                                             
           * For Red Hat, Gentoo, SuSE users:                                
                                                                             
             the XFree configuration files are normally /etc/X11/XF86Config  
                                                                             
                                                                             
   
      + using the "SingleCard" option
        Section "ServerLayout"                                               
                Identifier     "X0"                                          
                Screen      0  "Screen0" 0 0                                 
                InputDevice    "Mouse0" "CorePointer"                        
                InputDevice    "Keyboard0" "CoreKeyboard"                    
                Option         "SingleCard" "true"                           
        EndSection                                                           
        Section "ServerLayout"                                               
                Identifier     "X1"                                          
                Screen      0  "Screen1" 0 0                                 
                InputDevice    "Mouse1" "CorePointer"                        
                InputDevice    "Keyboard0" "CoreKeyboard"                    
                Option         "SingleCard" "true"                           
        EndSection                                                           
       
        Note Note                                                            
             The BusID have to be specified in the "Device" Section of the   
             XFree configuration file.                                       
             Section "Device"                                                
                 Identifier  "nv"                                            
                 VendorName  ""                                              
                 BoardName   ""                                              
                 Driver      "nvidia"                                        
                 # Clock lines                                               
                                                                             
                 # Uncomment following option if you see a big white block   
                 # instead of the cursor!                                    
                 #    Option      "sw_cursor"                                
                 Option      "NoLogo" "On"                                   
                 BusID       "PCI:0:13:0"                                    
             EndSection                                                      
                                                                             
       
      + using the "PrefBusID/IsolateDevice" option (requires as argument a
        valid BusID)
        Section "ServerLayout"                                               
                Identifier     "X0"                                          
                Screen      0  "Screen0" 0 0                                 
                InputDevice    "Mouse0" "CorePointer"                        
                InputDevice    "Keyboard0" "CoreKeyboard"                    
                Option "PrefBusID" "1:0:0"                                   
        EndSection                                                           
        Section "ServerLayout"                                               
                Identifier     "X1"                                          
                Screen      0  "Screen1" 0 0                                 
                InputDevice    "Mouse1" "CorePointer"                        
                InputDevice    "Keyboard0" "CoreKeyboard"                    
                Option "PrefBusID" "0:13:0"                                  
        EndSection                                                           
                                                                             
       
        or for Debian Sid's XFree86 and Mandrake's xorg-x11
        Section "ServerLayout"                                               
                Identifier     "X0"                                          
                Screen      0  "Screen0" 0 0                                 
                InputDevice    "Mouse0" "CorePointer"                        
                InputDevice    "Keyboard0" "CoreKeyboard"                    
                Option "IsolateDevice" "1:0:0"                               
        EndSection                                                           
        Section "ServerLayout"                                               
                Identifier     "X1"                                          
                Screen      0  "Screen1" 0 0                                 
                InputDevice    "Mouse1" "CorePointer"      
Results 1 - 1
Help - FTP Sites List - Software Dir.
Searching half a billion files worldwide
© 1997-2009 MARUHN Internet Solutions