Multiple Terminals on a Single Computer via Open Source Software
Joshua Wong
11/07/2008
Executive Summary:
Most computers are sitting unused at any given time. Normally this is not a problem in most first world countries where computers are affordable. Utilizing a computer 100% is not necessary as there is a surplus of computing power available. However, in third world countries, resources are very limited and no such surplus exists. One way to increase the utilization of a computer is to allow multiple users to use the computer at the same time. This paper will focus on a software method to convert any compatible personal computer into a community computer.
Key Words: Multiseat, multitermal, Linux, multiple terminals, MDM, Userful
Introduction:
The idea of having multiple terminals on a single workstation is something that has existed since the invention of computers. Early computer were very expensive, and impractical for one person to use for themselves. Companies would buy one very large powerful computer and numerous dumb terminals to connect to it. As time passed, computers became cheaper and it became practical to give each employee their own computer. This helps reduce downtime due to equipment failure, a bad computer no longer affects everyone. The technology of the third world is lagging far behind the first world countries. Many areas lack the resources to have multiple computers for a school. By having multiple terminals on a single computer, the cost of the system is significantly reduced. This will be referred to as multiseat for the rest of the paper.
Objective:
Using open source applications and software create a multiseat solution that can be deployed on any compatible hardware. This solution must support a minimum of 2 seats per computer, with support for multimedia. The upper limit of the number of seats should only be limited by the power of the computer.
Background:
There are already packages that allow multiple terminals on a single computer, but they have drawbacks. The best software based package available, Userful Desktop Multiplier, works perfectly from a technical standpoint. But, the cost of the software prevents hinders its deployment in poor areas. Other solutions are Windows based, and typically require some additional hardware. There are some guides to doing multiseat of Linux but most of them are out of date and incompatible with recent changes in the X server.
Method:
The open source method used is the multiseat display manager, aka MDM, maintained by the Center for Scientific Computing and Free Software, aka C3SL. MDM is not an actual display manager like GDM, XDM, or KDM. It is a collection of scripts and programs that detect the hardware of the computer and creates the proper configuration files for a multiseat environment. Originally, multiseat was a very long and tedious process requiring a detailed knowledge of the X windowing system. Now it has been reduced to simply installing the MDM package, and making sure all the configuration files are in order. MDM works best with Debian based distributions, but in theory it can work with other distributions.
The first step is to obtain the proper hardware. For a multiseat system, it is recommended to have at least a dual core processor. The advantage of a dual core processor is that it allows the operating system to perform background tasks without affecting users. As far as RAM is concerned, 512 MB to 1024 MB of ram per user is a good estimate, less can be used, but it may cause problems if multiple memory intensive applications, such as Firefox are used. A motherboard with multiple PCI slots is required. It doesn’t matter if the slots are PCI or PCI-E, but it is recommended to have multiple identical slots, so one can have multiple identical video cards. The video cards will either make or break the system. It is strongly recommended to use Nvidia cards, as they have better driver support in Linux. However, because multiseat systems typically do not deal with 3d graphics, any graphics card would work. The only restriction is there can be no mixing and matching.The video cards should all be the same model. State of the art video cards and ancient cards should be avoided due to kernel and driver issues. For each seat, there should be one monitor, keyboard, mouse, headset, and USB hub. The USB hub helps keeps all the wires organized and ensures a sufficient number of USB ports.
The next step is to pre-configure the system for multiseat support. A good test of if the system is properly set up is to launch an instance of Gnome or KDE. If all the screens are cloned with the same image, have independent desktops, or have one giant desktop, the xorg.conf file was properly written. If this does not happen, tweak the xorg.conf file until the all the displays are working. Additional details can be found by accessing the xorg.conf man page. Also test all the keyboards and mice, each of them should be able act on the session. The MDM software requires a few dependencies to run these are gettext, discover, xephyr. If MDM needs to be compiled, git-core, libcairo, and fakeroot are required. After all the dependencies are installed, MDM should be installed.
Once MDM is started, it will probe the system to detect all the keyboards and mice. After detection, it will start an X server for each display. A generic X server is started with all keyboards and mice available. Once that server is started, the user is instructed to press keys on corresponding keyboards and mice. After all mice and keyboards have been assigned, Xephyr is started for each seat. This creates a virtual X server that is listening only to one keyboard and one mouse. In theory this creates multiple independent sessions. However, a lot can go wrong here. The MDM software is still very young, and there are numerous bugs. There are workarounds posted for some of the issues, but this usually requires trial and error. If bug are encountered, it is recommended to use rcconf and disable MDM and GDM from starting on bootup. Sometimes launching and closing an xsession before launching MDM will solve some of the problems.
MDM for the moment does not deal with assigning audio devices to each station. At the time this paper was written, a viable method of assigning audio devices has not been discovered. Each station is capable of playing audio files, but for now, there is no control of where the audio output is going. A solution is anticipated within the next month.
Conclusion:
Multiseat on Linux system has been greatly simplified from the original methods, but it is still a difficult procedure. The people at C3SL are working hard to improve their software, but they still have a long way to go. As it stands now, MDM is an acceptable solution to multiseat but it is far from a complete solution.
References
MDM,
Chris Tyler,Multiseat X Under 11R6.9/7.0,
Chris Tyler, Multiseat Sound,
Userful Multiplier,