Monday, June 22, 2009

The Beautiful Agony Mediafire



The concept is a particular configuration of a computer in a way that allows your computer to be used by more than one person simultaneously. Since the current hardware is more than enough power for the requirements that may require management of multiple desktops, this configuration is particularly attractive in environments such paperwork. The main advantage is saving, not only energy but also in maintenance costs.

Until some time ago, such configurations were simple and required no change, recompile, or patching different parts of the system. In the most recent Linux kernel and includes all measures necessary to deal separately with the events from different keyboards eg. In this way, now you can get a multiterminal configuration simply by installing a kit and modifying a configuration file.

In the past I have prepared tutorials settings in Ubuntu 6.06 multiterminal and 8.4 , but this is the first time public that the tutorial also in Castilian.

The setup is very similar to version 8.04, with the difference that some software components have been updated and getting some improvement over previous versions. However, there are still some problems.





The team is the same as that used in the previous version:
Pentium 4 3GHz, 512MB of RAM and a 80GB hard drive. The video card is an ATI Radeon X300 PCIe Gigabyte with two outputs (VGA and DVI). In the DVI output using a VGA adapter so that finally we have two analog VGA monitors in the system. Monitors Conventional displays are LCD / TFT with a resolution of 1280x1024.

1 .- First, install Ubuntu 9.04 on the computer. We do this using a "live" (CD / DVD or USB). Since the major part of the support booting from USB devices, we recommend doing it with a USB-live because the installation process is much faster than we do from a CD or DVD.

2 .- Next, we update the system to have the latest packages available. We can do either with the graphical tools (Update Manager / Synaptic) or using the command line from a terminal:
 
$ sudo apt-get
update


3 .- Then, install some additional packages (xserver-xephyr and wmctrl). These packages are not included in the default installation, but we can find in the official repositories, so installation is simple. These packages are needed to get get multiterminal configuration we are looking for.

 
$ sudo apt-get install xserver-xephyr wmctrl


Before starting with the particular modifications multiterminal configuration, you should make the necessary adjustments and settings for the particular work setting, each user (settings network creation users, etc). Some Gnome tools and utilities do not work when working with multiple concurrent sessions. To detect multiple operating system sessions, you can not generate the necessary lock files required by the configuration tools.

is highly recommended to keep a copy of the configuration files in its initial state (/ etc/X11/xorg.conf and / etc / gdm / gdm.conf). These files are necessary if the user wants to return to the initial configuration (single user) team.

Once these tasks prior to initial setup, proceed to perform the specific computer configuration multiterminal.



Initially, after the default configuration, the system starts with the two screens in "clone." if we examine the output of xrandr can see the details of our current configuration. In our particular case, we get:

 

$ xrandr-q Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 1280 x 1200 VGA-0
connected 1280x1024 +0 +0 (normal left inverted right x axis and axis) 338mm x 270mm
1280x1024 60.0 * + 75.0 60.0 * 75.0

1152x864 1024x768 832x624 74.6 75.0 60.0


640x480 800x600 75.0 60.3 75.0 59.9 70.1 720x400

DVI-0 connected 1280x1024 +0 +0 (normal left inverted right x axis and axis) 338mm x 270mm
1280x1024 60.0 * + 75.0 60.0 *

1024x768 1152x864 75.0 60.0 75.0 70.1

800x600 832x624 74.6 72.2 75.0 60.3 75.0 72.8 59.9 640x480


720x400 70.1 S-video disconnected (normal left inverted right x axis and axis)


The next step is to modify / etc/X11/xorg.conf to indicate how to obtain an "extended desktop". If you have questions about this subject the wiki for ubuntu you can find additional information to manually configure and define multi systems.

In the latest versions of Linux, some aspects of device management are being modified and managed from different parts of the system, as hal and udev . We no longer need to specify anything related to mouse and keyboard in the xorg.conf file

After making our copy of xorg.conf inicial, we modify it to describe our setup with two monitors. We also include some convenient options (those listed in Section "ServerFlags") for a multiterminal system.

  
Section "Device"
Identifier "Card0"
BoardName "ATI Technologies Inc RV370 5B60 [Radeon X300 (PCIE)]"
Driver "ati"
BusID "PCI:1:0:0"
Option "Monitor-VGA-0" "Mon-VGA"
Option "Monitor-DVI-0" "Mon-DVI"
EndSection

Section "Monitor"
Identifier "Mon-VGA"
Option "DPMS"
EndSection

Section "Monitor"
Identifier "Mon-DVI"
Option "DPMS"
Option "Below" "Mon-VGA"
EndSection

Section "Screen"
Identifier "Screen-base"
Device "Card0"
Monitor "Mon-VGA"
DefaultDepth 24
Subsection "Display"
Depth 24
Modes "1280x1024"
Virtual 1280 2048
EndSubSection
EndSection

Section "ServerFlags"
# Even if mouse detection fails, X will start
Option "AllowMouseOpenFail" "yes"

# VT switching is disabled
Option "DontVTSwitch" "yes"

# X restart (Ctrl+Alt+Backspace) is disabled
Option "DontZap" "yes" EndSection



This time we chose a vertical distribution of the monitors. It was only as a test to see if 3D acceleration works by keeping the size of the virtual screen smaller (or equal) than a square of side 2048 pixels. If you prefer a horizontal layout, simply use leftOf or rather rightOf Below, in the section corresponding to the second monitor. In addition, you must adjust the virtual desktop size required depending on the desired distribution.

After making these changes, if you restart the X server will see a desk dealing with the two monitors vertically and with these features:

 

$ xrandr-q Screen 0: minimum 320 x 200, current 1280 x 2048, maximum 1280 x 2048 VGA-0
connected 1280x1024 +0 +0 (normal left inverted right x axis and axis) 338mm x 270mm
1280x1024 60.0 * + 75.0 60.0 * 75.0

1152x864 1024x768 832x624
75.0 60.0 74.6 75.0 60.3

800x600 640x480 720x400 70.1 75.0 59.9

DVI-0 connected 1280x1024 +1024 +0 (normal left inverted right x axis and axis) 338mm x 270mm
1280x1024 60.0 * + 75.0 60.0 *

1024x768 1152x864 75.0 75.0 70.1 60.0 74.6

832x624 800x600 640x480
72.2 75.0 60.3 75.0 72.8 59.9 70.1 720x400

S-video disconnected (normal left inverted right x axis and axis)


After changing the xorg.conf file and taking an extended desktop and covering the two monitors (whether utuilizamos a vertical or flat) the next step is to configure gdm to launch Xephyr two sessions, one for each position.

Previously, we have information about the input events (both keyboard and mouse) system.

 
$ ls-la / dev / input / by-path / pair of keyboard and mouse. The values \u200b\u200bwe obtain here will be used later to configure the input devices that correspond to each position.

Then create a launcher in order to run Xephyr with the appropriate parameters and linking each with its input events. To accomplish this, create a file to be used as a launch script. we can name and create the file as we find most convenient. In our case, we create it as / usr / sbin / Xephyr-path.sh

We choose an editor (vi, gedit, ...) to create the file in question, bearing in mind that you must have permissions to be executed by root (the owner of file).


$ sudo gedit / usr / sbin / Xephyr-path.sh
$ sudo chmod 744 / usr / sbin / Xephyr-path.sh



The file in question They will have a content like this (changing the parameter XkbLayout depending on the user's keyboard language):


 $ cat / usr / sbin / Xephyr-path.sh 




# / bin / bash

# 200906 - Josean
 # http:/ / netpatia.blogspot.com / 

trap "" USR1

Xephyr = / usr / bin / Xephyr
DISPLAY =: 0
 XAUTHORITY = / var / lib / gdm /: 0.Xauth 

args = ()

while [! -Z "$ 1"];
do if [["$ 1" == "kbdpath"]]; then

shift if [! -Z "$ 1"]; then
args args =("${ [@]}" "keybd")
args args =("${ [@]}" "evdev,, device = / dev / input / by-path / $ 1, xkbrules = xorg, evdev = xkbmodel, xkblayout = es ")

fi elif [[" $ 1 "==" mousepath "]]; then

shift if [! -Z "$ 1"]; then
args args =("${ [@]}" "mouse")
args args =("${ [@]}" "evdev,, device = / dev / input / by-path / $ 1 ")
en
else
args args =("${ [@]}" "$ 1")
# echo "+ + + args $ 1 + + +">> / tmp / logXephyr
fi
shift
done

# Next line is just to create a log file with the invocation parameters, for debug Purposes
# echo $ Xephyr-ac "$ {args [@]}">> / tmp / logXephyr
exec $ Xephyr-ac" $ {args [@]}"



After creating this script, continue with modifications in the file / etc / gdm / gdm.conf

In the [servers] of gdm.conf comment on the rules governing the initial distribution and define what is necessary for the new distribution. Modify the file to launch the X base and two sessions Xephyr (one per position) X running on the base.



# ********************************************* *******************************
[servers]


# 0 = Standard # # Means That
DISPLAY " : 0 "will start an X server as defined in the
# [server-Standard] section.
 # *********************************************** ***************************** 

# Multiseat setup (200906)

0=Xephyr0
1=Xephyr1
2=Xephyr2

[server-Xephyr0]
name=Xephyr0
command=/usr/bin/X -br -dpms -s 0
handled=false
flexible=false

[server-Xephyr1]
name=Xephyr1
command=/usr/sbin/Xephyr-path.sh -br -screen 1280x1024 -kbdpath platform-i8042-serio-0-event-kbd -mousepath platform-i8042-serio-1-event-mouse
handled=true
flexible=false

[server-Xephyr2]
name=Xephyr2
command=/usr/sbin/Xephyr-path.sh -br -screen 1280x1024 -kbdpath pci-0000:00:1d.2-usb-0:2:1.0-event-kbd -mousepath pci-0000:00:1d.2-usb-0:1:1.0-event-mouse
handled=true Flexible = false


# ******************************************* *********************************



see that this is the script and you have to indicate what input devices (physical points of connection) are under each post.

The second change in gdm.conf file is related to the authentication request. In this part there are some tasks that still need to be done manually. We

encontramso with
known problem of placing each
properly Xephyr session for each user to see your session on your monitor. The current version of Xephyr does not support the geometry parameter
including many X applications, so that you can not tell Xephyr the place where you have to drop. To avoid this problem, create a script that will be called instead of making a direct call to script identification request to login (greeter).

This script will invoke a series of commands for each window position Xephyr in the desired location. To do this we will use the profits xwininfo, wmctrl. with them we can identify a Xephyr window and move to the second monitor, so we solve the problem of overlap between session windows. This is why the previously installed the package wmctrl.

In the [daemon] of gdm.conf change the reference to "greeter" original a reference to this new script. The script in question not only invoked the request for identification, but will deal with Xephyr window to place each in its proper position:

# ******************* ************************************************** ******* [daemon]

# The greeter for attached (non-xdmcp) logins. Change gdmlogin to gdmgreeter
# to get the new graphical greeter.
# Greeter = / usr / lib / gdm / gdmgreeter
Greeter = / usr / sbin / Xephyr-login.sh
 # ********************** ************************************************** **** 



As indicated above, create the script responsible for requesting identification (in our case we have called / usr / sbin / Xephyr-login.sh). This script will be invoked by the user gdm, so we created the script as the property of the user, giving only execute permissions for it.



$ sudo gedit / usr / sbin / Xephyr-login.sh
$ sudo chown gdm: gdm / usr / sbin / Xephyr-login.sh
$ sudo chmod 744 / usr / sbin / Xephyr-login.sh


The script you just created should look like this:

 
$ cat / usr / sbin / Xephyr-login.sh



# / bin / bash
# / usr / sbin / Xephyr -login.sh

XAUTHORITY = / var / lib / gdm /: XEP
 0.Xauth = $ (xwininfo-root-children-display: 0  
# assign values \u200b\u200bto positional parameters to Obtain the id (first parameter) of the Xephyr window
set $ {XEP}
DISPLAY =: 0 wmctrl-i-r $ 1-e 0,0,1024, -1, -1
/ usr / lib / gdm / gdmlogin
 


In our case, we move in one of the sessions vertical 1024 pixels (remember that our distribution is two 1280x1024 screens aligned vertically).

We should be invoked when the session ID instead run the new script (which also includes the identification of application). From the user point of view, what you see is each of the screens running on identification one of the monitors. The rest of the transactions go unnoticed for the user.

Version 9.04 of this configuration multiterminal get some improvements over previous versions:
* vertical scroll wheel mouse 'running properly.
* The keyboard LEDs operate independently without mixing.


Updated 2009/06/22: Minor changes




0 comments:

Post a Comment