This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
user:jr018429:portfolio:hpc_0_eoce_0x2_preparation [2011/05/18 12:58] – [References] jr018429 | user:jr018429:portfolio:hpc_0_eoce_0x2_preparation [2011/05/18 13:42] (current) – [Background] jr018429 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <WRAP centeralign round graybg box 96%> | ||
+ | <WRAP muchbigger> | ||
+ | <WRAP bigger> | ||
+ | </ | ||
+ | ======Objective====== | ||
+ | The object of this project is to set up and verify a multi-seat Linux configuration (one machine, many users).\\ | ||
+ | ======Materials/ | ||
+ | To do this project, you will need to have successfully completed: | ||
+ | * Linux/*BSD Desktop Install | ||
+ | The materials required for this project are:\\ | ||
+ | |||
+ | ^Description^Quantity^ | ||
+ | |PC to be multiseat host|1| | ||
+ | |LCDs|multiple| | ||
+ | |keyboards|multiple| | ||
+ | |mice|multiple| | ||
+ | |Linux Desktop install CD|1| | ||
+ | |USB docking stations|multiple| | ||
+ | |||
+ | ======Background====== | ||
+ | Lately, computing has concerned itself with the idea of a single computing resource allocated to a single user. However, with this approach, computing resources are usually wasted. There are exceptions to the one resource per user rule, a multi-tasking system for example, allows for multiple logins, there can still only be one physical user at the computer' | ||
+ | According to the Web page from which the pictures and instructions were taken, a multi-seat configuration "is great for education, libraries, internet cafes, etc — anywhere where you have clusters of client machines with light 3D/video app demands, and want the simplicity and savings of just one server machine with many terminals connected." | ||
+ | ======Requirements/ | ||
+ | **Requirements**\\ | ||
+ | The instructor' | ||
+ | Configure and document the process of setting up a Linux machine to serve as the host machine to support multiple physical users.\\ | ||
+ | \\ | ||
+ | **Functionality**\\ | ||
+ | Regarding this project, once the setup and installation are complete, the instructor asks the student to explore the following functionality: | ||
+ | * graphical login on each head | ||
+ | * no interference between seats | ||
+ | * administration | ||
+ | * adding new software | ||
+ | * configuring settings for all users | ||
+ | * screen capture by administrator | ||
+ | * screen broadcasting | ||
+ | * individual USB flash drive access | ||
+ | * per-seat audio | ||
+ | \\ | ||
+ | **Analysis**\\ | ||
+ | Regarding this project, the instructor asks the student to lookout for the following things:\\ | ||
+ | * How is overall CPU load with respect to the number of heads? | ||
+ | * idle | ||
+ | * active | ||
+ | * Is there a sweet spot with regards to number of seats and host hardware? | ||
+ | \\ | ||
+ | If possible, the instructor wants the student to try the configuration with both a 32-bit machine and a 64-bit machine (how well can the older 32-bit machine handle the load, how much more work can the newer 64-bit machine adequately handle?).\\ | ||
+ | \\ | ||
+ | ======Procedure====== | ||
+ | {{: | ||
+ | The photos both above and below and the instructions below were taken from http:// | ||
+ | \\ | ||
+ | **1. DisplayLink framebuffer driver**\\ | ||
+ | udlfb is in the staging tree of Linux kernels 2.6.32 and later. We'll install the latest version here. First, make sure you have git installed with "sudo apt-get install git-core", | ||
+ | < | ||
+ | sudo apt-get install module-assistant | ||
+ | sudo module-assistant prepare | ||
+ | git clone http:// | ||
+ | cd udlfb | ||
+ | make | ||
+ | sudo make install | ||
+ | sudo depmod -a | ||
+ | </ | ||
+ | Now, when you plug in a DisplayLink device, you should see a "green screen" | ||
+ | \\ | ||
+ | **2. DisplayLink X server**\\ | ||
+ | This will get the X server installed, ready for use by later scripts.\\ | ||
+ | < | ||
+ | sudo apt-get install pkg-config xorg-dev | ||
+ | cd ~git | ||
+ | git clone http:// | ||
+ | cd xf-video-udlfb | ||
+ | ./configure | ||
+ | make | ||
+ | sudo make install | ||
+ | </ | ||
+ | \\ | ||
+ | We now need to create or modify a few scripts and configuration files. You'll need to use sudo to edit files in these system directories. You can cut/paste the text below, or download the files with "git clone http:// | ||
+ | \\ | ||
+ | **3. udev script**\\ | ||
+ | Create a file called / | ||
+ | < | ||
+ | # set all DisplayLink devices to configuration 1 | ||
+ | # see http:// | ||
+ | ATTR{idVendor}==" | ||
+ | |||
+ | # aliases for display, kbd, mouse attached to specific hubs | ||
+ | |||
+ | KERNEL==" | ||
+ | KERNEL==" | ||
+ | KERNEL==" | ||
+ | KERNEL==" | ||
+ | |||
+ | # Handle when keyboard and mouse are one more hub downstream. Relying on pnp order to have already set up mouse, keyboard on upstream hub if we're daisy-chaining | ||
+ | KERNEL==" | ||
+ | KERNEL==" | ||
+ | </ | ||
+ | \\ | ||
+ | The udev subsystem will run this script automatically each time a USB device is attached.\\ | ||
+ | \\ | ||
+ | **4. usbseat.sh script**\\ | ||
+ | Create a file / | ||
+ | < | ||
+ | #!/bin/bash | ||
+ | # takes the "seat number" | ||
+ | # the seat number is the kernel device id of the hub the seat's devices are sitting off of | ||
+ | # called once for every usb device that MIGHT be part of a seat, when they arrive or remove | ||
+ | |||
+ | if [[ !(-n `/bin/pidof gdm`) ]]; then | ||
+ | exit 0 | ||
+ | fi | ||
+ | |||
+ | seat_running=`/ | ||
+ | |||
+ | # $ACTION environment variable is set by udev subsystem | ||
+ | case " | ||
+ | ' | ||
+ | if [[ -n " | ||
+ | / | ||
+ | fi | ||
+ | ;; | ||
+ | *) | ||
+ | # A device which might be part of a seat has been added | ||
+ | |||
+ | # if we already have a running seat for this #, exit | ||
+ | if [[ -n " | ||
+ | exit 0 | ||
+ | fi | ||
+ | |||
+ | if [[ -e / | ||
+ | |||
+ | # We have a newly complete seat. Start it. | ||
+ | TMPFILE=`/ | ||
+ | /bin/sed " | ||
+ | / | ||
+ | / | ||
+ | fi | ||
+ | ;; | ||
+ | esac | ||
+ | |||
+ | exit 0 | ||
+ | </ | ||
+ | \\ | ||
+ | **5. X config file**\\ | ||
+ | Create file / | ||
+ | < | ||
+ | Section " | ||
+ | Option " | ||
+ | Option " | ||
+ | Option | ||
+ | Option " | ||
+ | Option " | ||
+ | Option " | ||
+ | EndSection | ||
+ | |||
+ | Section " | ||
+ | Load " | ||
+ | EndSection | ||
+ | |||
+ | Section " | ||
+ | ModulePath | ||
+ | ModulePath | ||
+ | EndSection | ||
+ | |||
+ | Section " | ||
+ | Identifier " | ||
+ | driver | ||
+ | Option " | ||
+ | EndSection | ||
+ | |||
+ | Section " | ||
+ | Identifier " | ||
+ | Driver " | ||
+ | Option " | ||
+ | Option " | ||
+ | Option " | ||
+ | Option " | ||
+ | EndSection | ||
+ | |||
+ | Section " | ||
+ | Identifier " | ||
+ | Driver " | ||
+ | Option " | ||
+ | Option " | ||
+ | Option " | ||
+ | Option | ||
+ | Option " | ||
+ | EndSection | ||
+ | |||
+ | Section " | ||
+ | Identifier " | ||
+ | EndSection | ||
+ | |||
+ | Section " | ||
+ | Identifier " | ||
+ | Device " | ||
+ | Monitor " | ||
+ | EndSection | ||
+ | |||
+ | Section " | ||
+ | Identifier " | ||
+ | Screen 0 " | ||
+ | InputDevice " | ||
+ | InputDevice " | ||
+ | EndSection | ||
+ | </ | ||
+ | \\ | ||
+ | **6. fbcon workaround**\\ | ||
+ | [update: this step is no longer needed with the latest udlfb from git or in kernels 2.6.37+]\\ | ||
+ | \\ | ||
+ | fbcon is a standard Linux kernel module, which aggressively assumes it can open any framebuffer device and take it over for use as a text terminal. Unfortunately, | ||
+ | < | ||
+ | blacklist font | ||
+ | blacklist tileblit | ||
+ | blacklist bitblit | ||
+ | blacklist fbcon | ||
+ | </ | ||
+ | This file will not take effect until you run\\ | ||
+ | < | ||
+ | sudo update-initramfs -u | ||
+ | </ | ||
+ | \\ | ||
+ | Now, when you reboot and run " | ||
+ | \\ | ||
+ | **7. xrandr workaround**\\ | ||
+ | [update: this workaround is not needed when running xf86-video-fbdev or with recent displaylink X servers with this patch]\\ | ||
+ | \\ | ||
+ | The DisplayLink X server currently has limited RANDR support, but later versions of GDM assume better. So for the time being, a workaround is required to get GDM applications (including gdmlogin) to display properly within the actual screen area -- otherwise they tend to think the screen has a strange rotation, and display themselves completely off it.\\ | ||
+ | \\ | ||
+ | Add these lines into / | ||
+ | < | ||
+ | XRANDR=`gdmwhich xrandr` | ||
+ | if [ " | ||
+ | $XRANDR -o 0 | ||
+ | fi | ||
+ | </ | ||
+ | \\ | ||
+ | **8. / | ||
+ | Add the following lines to your / | ||
+ | < | ||
+ | oldIFS=$IFS | ||
+ | IFS=/ | ||
+ | for seat in / | ||
+ | set $seat | ||
+ | / | ||
+ | done | ||
+ | IFS=$oldIFS | ||
+ | </ | ||
+ | \\ | ||
+ | **9. / | ||
+ | In recent versions of X, the system largely assumes that you'll only run one X server, and it will own all devices. So to support multiseat with multiple X servers easily, we need to have two configurations: | ||
+ | \\ | ||
+ | Add these lines to your / | ||
+ | < | ||
+ | # Allow usbseat to override the config | ||
+ | if [ -f / | ||
+ | for usbseat in / | ||
+ | seatid=${usbseat## | ||
+ | if [ -e "/ | ||
+ | CONFIG_FILE=" | ||
+ | fi | ||
+ | done | ||
+ | fi | ||
+ | </ | ||
+ | \\ | ||
+ | **10. Create / | ||
+ | This is the alternative gdm.conf that will be used when a USB terminal is present at boot:\\ | ||
+ | < | ||
+ | [daemon] | ||
+ | DynamicXServers=true | ||
+ | FlexibleXServers=0 | ||
+ | Greeter=/ | ||
+ | |||
+ | [security] | ||
+ | |||
+ | [xdmcp] | ||
+ | |||
+ | [gui] | ||
+ | |||
+ | [greeter] | ||
+ | |||
+ | [chooser] | ||
+ | |||
+ | [debug] | ||
+ | |||
+ | [servers] | ||
+ | 0=inactive | ||
+ | </ | ||
+ | \\ | ||
+ | {{: | ||
+ | Now, when you boot with USB terminal(s) attached, graphical logins will come up on all of those, while your primary display will remain a text console.\\ | ||
+ | |||
+ | ======References====== | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// |