tag:blogger.com,1999:blog-84664115553524498112024-03-05T10:36:35.444-08:00Before after Xaphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.comBlogger50125tag:blogger.com,1999:blog-8466411555352449811.post-88965837685315020142013-10-05T11:58:00.001-07:002013-10-05T11:58:01.991-07:00Long time, no seelightdm-1.6.2-1 is there. And so is Xephyr 1.12.4-6.2+b2.<br />
The latter works with the usual procedure. The former does change the procedure a bit. The patch referring to removing stale files does not apply at all. I just don't use it any more... and as far as I know there has been some activity in the lightdm project regarding removing any stale files at runtime. So now only the patch adding the "common-vt" option is required.<br />
Below is what I applied:<br />
<br />
<span style="font-family: "Courier New", Courier, monospace;">diff --git a/src/lightdm.c b/src/lightdm.c<br />index 7f67ea7..840aee1 100644<br />--- a/src/lightdm.c<br />+++ b/src/lightdm.c<br />@@ -1056,6 +1056,8 @@ main (int argc, char **argv)<br /> config_set_boolean (config_get_instance (), "LightDM", "start-default-seat", TRUE);<br /> if (!config_has_key (config_get_instance (), "LightDM", "minimum-vt"))<br /> config_set_integer (config_get_instance (), "LightDM", "minimum-vt", 7);<br />+ if (!config_has_key (config_get_instance (), "LightDM", "common-vt"))<br />+ config_set_boolean (config_get_instance (), "LightDM", "common-vt", FALSE);<br /> if (!config_has_key (config_get_instance (), "LightDM", "guest-account-script"))<br /> config_set_string (config_get_instance (), "LightDM", "guest-account-script", "guest-account");<br /> if (!config_has_key (config_get_instance (), "LightDM", "greeter-user"))<br />diff --git a/src/vt.c b/src/vt.c<br />index 62839d9..810e73e 100644<br />--- a/src/vt.c<br />+++ b/src/vt.c<br />@@ -117,15 +117,23 @@ vt_get_min (void)<br /> gint<br /> vt_get_unused (void)<br /> {<br />+ static gint common_number = -1;<br />+<br />+ gboolean common_vt;<br /> gint number;<br /><br /> if (getuid () != 0)<br /> return -1;<br /><br />+ common_vt = config_get_boolean (config_get_instance (), "LightDM", "common-vt");<br />+ if (common_vt && common_number > 0)<br />+ return common_number;<br />+<br /> number = vt_get_min ();<br /> while (vt_is_used (number))<br /> number++;<br /> <br />+ common_number = number;<br /> return number;<br /> }</span><br />
<span style="font-family: "Courier New", Courier, monospace;"></span><br />
<br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: Arial, Helvetica, sans-serif;">And it works, as of October 5th, 2013.</span></span>aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-65537417271657961532013-05-25T11:58:00.001-07:002013-05-25T11:58:33.715-07:00lightdm 1.6.0-3<div style="font-family: "Courier New",Courier,monospace;">
OK, the patches almost apply; below there is the new patch.</div>
<div style="font-family: "Courier New",Courier,monospace;">
Confirmed, works. </div>
<div style="font-family: "Courier New",Courier,monospace;">
<br /></div>
<div style="font-family: "Courier New",Courier,monospace;">
Description: <short summary of the patch><br /> Xephyr-multiseat requires that all X servers are run on the same vt.<br /> .<br /> lightdm (1.6.0-3) unstable; urgency=low<br /> .<br /> * debian/control:<br /> - drop valac-0.18 dependency for now since it's not available in sid<br /> anyway. closes: #707176<br />Author: Yves-Alexis Perez <corsac@debian.org><br />Bug-Debian: http://bugs.debian.org/707176<br /><br />---<br />The information above should follow the Patch Tagging Guidelines, please<br />checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here<br />are templates for supplementary fields that you might want to add:<br /><br />Origin: <vendor|upstream|other>, <url of original patch><br />Bug: <url in upstream bugtracker><br />Bug-Debian: http://bugs.debian.org/<bugnumber><br />Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber><br />Forwarded: <no|not-needed|url proving that it has been forwarded><br />Reviewed-By: <name and email of someone who approved the patch><br />Last-Update: <YYYY-MM-DD><br /><br />--- lightdm-1.6.0.orig/src/lightdm.c<br />+++ lightdm-1.6.0/src/lightdm.c<br />@@ -974,6 +974,8 @@ main (int argc, char **argv)<br /> config_set_boolean (config_get_instance (), "LightDM", "start-default-seat", TRUE);<br /> if (!config_has_key (config_get_instance (), "LightDM", "minimum-vt"))<br /> config_set_integer (config_get_instance (), "LightDM", "minimum-vt", 7);<br />+ if (!config_has_key (config_get_instance (), "LightDM", "common-vt"))<br />+ config_set_boolean (config_get_instance (), "LightDM", "common-vt", FALSE);<br /> if (!config_has_key (config_get_instance (), "LightDM", "guest-account-script"))<br /> config_set_string (config_get_instance (), "LightDM", "guest-account-script", "guest-account");<br /> if (!config_has_key (config_get_instance (), "LightDM", "greeter-user"))<br />--- lightdm-1.6.0.orig/src/xserver-local.c<br />+++ lightdm-1.6.0/src/xserver-local.c<br />@@ -318,9 +318,13 @@ got_signal_cb (Process *process, int sig<br /> static void<br /> stopped_cb (Process *process, XServerLocal *server)<br /> {<br />+ guint display_number;<br />+ gchar *path;<br />+<br /> g_debug ("X server stopped");<br /><br />- xserver_local_release_display_number (xserver_get_display_number (XSERVER (server)));<br />+ display_number = xserver_get_display_number (XSERVER (server));<br />+ xserver_local_release_display_number (display_number);<br /> <br /> if (xserver_get_authority (XSERVER (server)) && server->priv->authority_file)<br /> {<br />@@ -345,6 +349,10 @@ stopped_cb (Process *process, XServerLoc<br /> plymouth_quit (FALSE);<br /> }<br /><br />+ path = g_strdup_printf ("/tmp/.X%d-lock", display_number);<br />+ g_unlink (path);<br />+ g_free (path);<br />+<br /> DISPLAY_SERVER_CLASS (xserver_local_parent_class)->stop (DISPLAY_SERVER (server));<br /> }<br /><br />--- lightdm-1.6.0.orig/src/vt.c<br />+++ lightdm-1.6.0/src/vt.c<br />@@ -125,15 +125,23 @@ vt_get_min (void)<br /> gint<br /> vt_get_unused (void)<br /> {<br />+ static gint common_number = -1;<br />+<br />+ gboolean common_vt;<br /> gint number;<br /><br /> if (getuid () != 0)<br /> return -1;<br /><br />+ common_vt = config_get_boolean (config_get_instance (), "LightDM", "common-vt");<br />+ if (common_vt && common_number > 0)<br />+ return common_number;<br />+<br /> number = vt_get_min ();<br /> while (vt_is_used (number))<br /> number++;<br /> <br />+ common_number = number;<br /> return number;<br /> }<br /><br /></div>
aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-90079519274602409512013-05-16T12:09:00.001-07:002013-05-16T12:09:20.360-07:00Jessie is here!The king has died, long live the king! Wheezy is released to be the next, rock-solid stable Debian. And so it is time to move to the new testing.<br />
<br />
Jessie is here, with ligthdm 1.2.3-1. The usual patches do apply, although with some fuzz, but "patch" still handles this ok.<br />
<br />
Confirmed, works.<br />
<br />aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-10214063202730648632013-03-06T11:38:00.001-08:002013-03-06T11:38:49.910-08:00Xephyr 1.12.4-5Works. Usual rebuild with --enable-kdrive-evdev is required.aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-37498709275528624512013-02-27T09:33:00.000-08:002013-02-27T09:33:45.060-08:00Another dist-upgradeDebian wheezy as of 27th February 2013 with udev 175-7.1 works.<br />
<br />
However, my Xephyr-seat-X scripts sometimes do not function correctly: it turns out, that when the Xephyr is run, there is no DISPLAY :0. I solved the problem twofold: 1) I added a "sleep 5" before Xephyr is invoked and 2) used "Option" "NoLogo" "true" entry in my xorg.conf's "Device" section for nvidia.<br />
I think that drawing a logo and keeping it visible for some time creates some delays, so probably it is better not to draw it.<br />
<br />aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-53826183983052221112013-01-06T11:37:00.001-08:002013-01-06T11:37:05.429-08:00policykit-1 0.105-3Recently one of the critical packages has been upgraded.<br />
Works ok.aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-59622795903820694932012-12-11T12:50:00.001-08:002012-12-11T12:50:27.813-08:00Xephyr 1.12.4-4Confirmed - works after compiling with -enable-kdrive-evdev.aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-76688694972544478432012-11-20T04:08:00.001-08:002012-11-20T04:08:19.082-08:00Good news!The Xephyr in xserver-xephyr 1.12.4-3 now contains <span id="goog_1978523240"></span><a href="http://beforeafterx.blogspot.com/2012/10/still-1.html">a patch restoring correct command line parsing<span id="goog_1978523241"></span></a>, so now only --enable-kdrive-evdev is required in the control file.aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-33381595088036392082012-11-05T12:48:00.000-08:002012-11-05T12:48:22.519-08:00Another upgradeThis time it is lightdm: the latest version in wheezy is 1.2.2-4.<br />
The same procedure is still valid: apply the <a href="http://beforeafterx.blogspot.com/2012/08/lightdm-12-debian-wheezy.html">two patches</a>, rebuild and voila.aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-26049756664189714662012-10-24T11:23:00.003-07:002012-10-24T11:24:50.668-07:00Still + 1The latest Wheezy update as of this writing still contains a buggy Xephyr, version xorg-server-1.12.4. The patch<br />
<br />
http://patchwork.freedesktop.org/patch/12146/<br />
<br />
still needs to be applied. But Xephyr needs to be recompiled with -enable-kdrive-evdev anyway for our purposes, so applying this one-liner won't hurt. Other than that, it works fine. aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-61118407743261219402012-10-08T09:17:00.001-07:002012-10-24T11:21:06.295-07:00Too much patch will kill you<div>
In the recent Debian wheezy there is a new Xephyr which has broken options parsing due to a mismerged patch. The bug is fixed by Keith Packard, I will post more soon.<br />
<br />
<br />
http://lists.debian.org/debian-x/2012/10/msg00071.html<br />
<br />
<br />
http://patchwork.freedesktop.org/patch/12146/<br />
<br />
Looks like the patch is not going to make it soon to Wheezy, so there you go, you can use the patch from freedesktop. <br />
<br />
</div>
aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-89457573275797988522012-09-24T11:50:00.001-07:002012-09-24T11:50:27.232-07:00helper-functions<span style="font-family: "Courier New", Courier, monospace;">. /etc/default/multiseat<br /><br />#<br /># private implementation of get_sect<br />#<br /># get given section's contents from the given config file<br />#<br /># $1 filename<br /># $2 section number<br />#<br />__get_sect()<br />{<br /> cat $1 | awk -v sect=$2 '<br /> BEGIN {<br /> SECT="^\\[" sect "\\]"<br /> NEXT_SECT="^\\[" (sect + 1) "\\]"<br /> }<br /> $0 ~ SECT, $0 ~ NEXT_SECT {<br /> if ($0 ~ SECT)<br /> next;<br /> if ($0 ~ NEXT_SECT)<br /> next;<br /> if (substr($1, 1, 1) == "#")<br /> next;<br /> print<br /> }<br /> '<br />}<br /><br />#<br /># private implementation of get_conf<br />#<br /># get given key's contents from the given section<br /># from the given config file<br />#<br /># does not work for tables in the config file<br />#<br /># $1 filename<br /># $2 section name<br /># $3 key name<br />#<br />__get_conf()<br />{<br /> __get_sect $1 $2 | awk -F"=" -v key=$3 '<br /> BEGIN {<br /> KEY=key<br /> }<br /> $1==KEY {<br /> print substr($0, index($0, "=") + 1)<br /> }<br /> '<br />}<br /><br />#<br /># private implementation of get_num_seats<br />#<br /># get number of seats from the default config file<br />#<br /># $1 filename<br />#<br />__get_num_seats()<br />{<br /> cat $1 | awk '<br /> BEGIN {<br /> count=0<br /> }<br /> /^\[[0-9]*\]/ {count++}<br /> END {<br /> print count - 1<br /> }<br /> '<br />}<br /><br />#<br /># get given section's contents from the default config file<br />#<br /># $1 section name<br />#<br />get_sect()<br />{<br /> __get_sect $CONFIG $1<br />}<br /><br />#<br /># private implementation of get_table<br />#<br /># $1 filename<br /># $2 section number<br /># $3 table name<br /># $4 size/entry switch [-size => size, <number> for entry]<br />#<br />__get_table()<br />{<br /> SIZE=0;<br /> ENTRY=-1<br /><br /> if [ $4 == "-size" ];<br /> then<br /> SIZE=1;<br /> else<br /> ENTRY=$4<br /> fi<br /><br /> RESULT=`__get_sect $1 $2 | awk -v table=$3 -v get_size=$SIZE -v entry=$ENTRY '<br /> BEGIN {<br /> print BEGIn<br /> TABLE=table "\\\=" "\\\("<br /> GET_SIZE=get_size<br /> ENTRY=entry<br /> size=0<br /> }<br /> $0 ~ TABLE, /^\)/ {<br /> if ($0 ~ TABLE)<br /> next;<br /> if ($0 ~ /^\)/)<br /> next;<br /> if (substr($1, 1, 1) == "#")<br /> next;<br /> if (get_size == 0 && size == entry){<br /> print<br /> exit<br /> }<br /> size++;<br /> }<br /> END {<br /> if (get_size)<br /> print size; <br /> }<br /> '`<br /> RESULT=`echo $RESULT | sed 's/^[ \t]*//g'`<br /><br /> echo $RESULT<br />}<br /><br />#<br /># get given key's contents from the given section<br /># from the default config file<br />#<br /># does not work for tables in the config file<br />#<br /># $1 section name<br /># $2 key name<br />#<br />get_conf()<br />{<br /> __get_conf $CONFIG $1 $2<br />}<br /><br />#<br /># get number of seats from the default config file<br />#<br />get_num_seats()<br />{<br /> __get_num_seats $CONFIG<br />}<br /><br />#<br /># get size of a given table in the given section of the config file or<br /># get specified entry of the table<br />#<br /># $1 section number<br /># $2 table name<br /># $3 size/entry switch [-size => size, <number> for entry]<br />#<br />get_table()<br />{<br /> __get_table $CONFIG $1 $2 $3<br />}</span>aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-18353850251174136422012-09-24T11:49:00.002-07:002012-09-24T11:52:08.969-07:00Escape characters alive foreverThe multiseat config is never managed once and for ever...<br />
<br />
I wanted the scripts to be as little dependent as possible, so for parsing the multiseat.conf file I used only bash&sed&awk, no fancy tools like python. The helper-functions have been written in the mawk dialect of awk, and the awk found in Debian used to be mawk. Alas, no longer. So there are two options to consider: modify the helper-functions, so that mawk is used explicitly instead of awk (and make sure mawk is installed), or modify the helper-functions to speak gnu awk found in Debian now. I chose the second option. In fact only some escaping craziness differs. Instead of one backslash now two or three (!) are required here and there. You can find the new script <a href="http://beforeafterx.blogspot.com/2012/09/helper-functions.html">here</a>.aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-30845934448389540352012-08-23T12:45:00.000-07:002012-08-23T12:45:08.925-07:00Multiseat - final thoughts (so far)Now I am happily running an up-to-date Debian Wheezy. However, some precautions must be made when upgrading. I wrote such a script:<br />
<div style="font-family: "Courier New",Courier,monospace;">
<br /></div>
<div style="font-family: "Courier New",Courier,monospace;">
<br /></div>
<span style="font-family: "Courier New",Courier,monospace;">#!/bin/bash</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">SENSITIVE="wmctrl xserver-xephyr lightdm policykit"</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">PACKAGES=`apt-get --dry-run dist-upgrade | awk '/^The following packages will be upgraded:/,/^[1-9]./' | tail -n +2 | head -n -1`</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">echo "Searching sensitive packages:"</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">echo</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">echo $SENSITIVE</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">echo</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">echo "in:"</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">echo</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">echo $PACKAGES</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">echo</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">FOUND=0</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">for i in $SENSITIVE; do</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> echo $PACKAGES | grep $i 2>&1 >/dev/null && echo Found: $i && FOUND=1</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">done</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">if [ $FOUND -eq 0 ]; then</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">echo No sensitive packages found in upgrade.</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">fi</span><br style="font-family: "Courier New",Courier,monospace;" /><br />
The script can be run after apt-get update to see if any of the packages enumerated in "SENSITIVE" are to be upgraded this time. If yes, care must be taken.<br />
<br />
Policy kit needs a paragraph of its own. At this moment Debian Wheezy comes with policykit-1 version 0.105. This is the last version in which the actions' permissions are customized using .pkla files. From 0.106 on (0.107 is the latest now) the format and naming of the directories and files has changed.<br />
<br />
Another thing is systemd, which one day can become The Right Way of doing things.aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com8tag:blogger.com,1999:blog-8466411555352449811.post-48241799298036933892012-08-23T12:28:00.000-07:002012-08-23T12:28:27.363-07:00USB in multiseatHere is how I configured my machine in order for users @ multiseat can mount USB drives.<br />
<br />
First of all, in modern Debian distributions there is polkit-1. The policy kit infrastructure consists of, among others, a D-BUS service org.freedesktop.PolicyKit1 implemented as /usr/lib/policykit-1/polkitd. The service is used on behalf of user applications wanting to talk to privileged processes, the latter being described by so called actions stored in /usr/share/polkit-1/actions/. Policy kit's job is either to grant permission for an application to talk to a privileged process, or not. Each action, apart from the service it describes, provides default permissions for different kinds of sessions: active sessions, inactive sessions and any kind of sessions. For example, org.freedesktop.udisks.policy file contains descriptions of a number of actions related to disks (like mount/unmount and such).<br />
<br />
It turns out, that of the n + 1 X sessions (Xinerama + n seats), only the Xinerama session happens to be ACTIVE. All other sessions, started through Xephyrs, are PASSIVE. And by default PASSIVE sessions are not allowed to mount USB drives, which is expressed by <allow_inactive>no</allow_inactive> in org.freedesktop.udisks.policy. Nor are they allowed to suspend the machine, see org.freedesktop.upower.policy. In different places advice can be found to edit .policy files. Don't! It is not the right way to do it. Instead, create files in /etc/polkit-1/localauthority/50-local.d/. I use the following two:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">10-org.freedesktop.upower.pkla:</span><br />
<div style="font-family: "Courier New",Courier,monospace;">
[Suspend/hibernate permissions]<br />Identity=unix-group:power<br />Action=org.freedesktop.upower.suspend<br />ResultAny=yes<br />ResultInactive=yes<br />ResultActive=yes</div>
<div style="font-family: "Courier New",Courier,monospace;">
<br /></div>
<div style="font-family: "Courier New",Courier,monospace;">
20-org.freedesktop.udisks.pkla:</div>
<span style="font-family: "Courier New",Courier,monospace;">[Storage Permissions]</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Identity=unix-group:storage</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Action=org.freedesktop.udisks.change;org.freedesktop.udisks.drive-detach;org.freedesktop.udisks.drive-eject;org.freedesktop.udisks.filesystem-mount;org.freedesktop.udisks.filesystem-unmount-others</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">ResultAny=yes</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">ResultInactive=yes</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">ResultActive=yes</span><br />
<br />
In order for this setup to work, the users in question must belong to groups power and storage.<br />
<br />
<br />
I handle mounting USB drives manually, that is, in a file manager drives show up automatically after plugging in, but one of the users (each time it can be a different user) must explicitly mount them for him/herself. In LXDE's pcmanfm->Edit->Preferences->Volume management "Mount removable media automatically when they are inserted" and "Mount mountable volumes automatically on program startup" are unchecked. In other words, the multiseat users must collaborate to decide who mounts the newly inserted USB drive. If it were to happen automatically, the user whose file manager mounts the drive first wins the race. And race is not what we want here.<br />
<br />
As you might have noticed, I use LXDE. Gnome-3 looks to heavy. And besides, with Xephyr's lack of GLX support, only the classic appearance is available, so I choose the lighter alternative.aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-60770964012877126142012-08-23T11:50:00.002-07:002012-08-23T11:50:44.154-07:00Debian Wheezy - on hard diskI just wanted to let you know that as of today, 23rd August 2012, I am using the most up-to-date Debian Wheezy with lightdm and LXDE, installed to the hard disk of my computer. It just works.<br />
<br />aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-43238492163939864302012-08-18T15:14:00.001-07:002012-08-18T15:14:13.119-07:00XephyrRemember me <a href="http://beforeafterx.blogspot.com/2012/05/gdm3-sucks.html">complaining</a> I was not Keith Packard?<br />
<br />
I am still not ;P<br />
<br />
But I am kind of closer to a good solution with an up-to-date Xephyr.<br />
<br />You know, at my Faculty of Electronics and Information Technology I in fact learnt just one thing, everything else follows from that: "It works better when turned on" (a small addendum to it is that "computerization of a mess makes a bigger mess"). And this (not being turned on) is the very reason of Wheezy's Xephyr not handling evdev protocol.<br />
<br />
So how can it be turned on? Fortunately, it is fairly simple: do apt-get source xserver-xephyr, then apt-get buid-dep xserver-xephyr, and then edit xorg-server-<some numbers>/debian/rules: after --enable-kdrive \ add a new line which reads --enable-kdrive-evdev \.<br />
<br />
Then dpkg-buildpackage -uc -us, after some 15 minutes the build stopped with an error regarding libGL; however in xorg-server-1.12.3/debian/xserver-xephyr/usr/bin/Xephyr there was a new Xephyr binary. I tested it and it works ok!<br />
<br />
I know that this is a kind of a poor man's solution: the package should build nicely to the end. It is desired to at least know and understand why the build stops and whether it should worry us. Nevertheless, it seems that Xephyr should not be a showstopper for the multiseat config, that is, we are not forced to use a binary from an ancient distribution.aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-52406490729377767752012-08-18T14:43:00.001-07:002012-08-18T14:46:08.582-07:00Configuration of ligthdm 1.2The configuration is pretty similar to that of lightdm 1.0. The changes are indicated <span style="color: red;">in red</span>.<br />
<br />
<div style="color: black;">
/</div>
<div style="color: black;">
| </div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">+-/etc</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| +-/default</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| | |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| | +-<a href="http://beforeafterx.blogspot.com/2011/02/multiseat-setup-defaultmultiseat.html">multiseat</a></span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| +-/lightdm</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| | |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| | +-<a href="http://beforeafterx.blogspot.com/2012/08/multiseat-setup-lightdmconf.html" style="color: red;">lightdm.conf</a></span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| +-/X11</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| | |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| | +-<a href="http://beforeafterx.blogspot.com/2011/02/multiseat-setup-xorgconf.html">xorg.conf</a></span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| +-/init.d</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| | |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| | +-<a href="http://beforeafterx.blogspot.com/2012/08/multiseat-setup-initdmultiseat.html" style="color: red;">multiseat</a></span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| +-/udev</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| | |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| | +-/rules.d</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| | |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| | +-<a href="http://beforeafterx.blogspot.com/2011/02/multiseat-setup-00-multiseatrules.html">00-multiseat.rules</a></span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| +-/multiseat</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| +-<a href="http://beforeafterx.blogspot.com/2011/02/multiseat-setup-multiseatconf.html">multiseat.conf</a></span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| +-/scripts</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| +-<a href="http://beforeafterx.blogspot.com/2011/02/multiseat-setup-helper-functions.html">helper-functions</a></span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| +-<a href="http://beforeafterx.blogspot.com/2011/02/multiseat-setup-match-and-name.html">match-and-name</a></span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| +-<a href="http://beforeafterx.blogspot.com/2012/08/multiseat-setup-multiseat-greeter-1.html" style="color: red;">multiseat-greeter-1</a></span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| +-<span style="color: red;">multiseat-greeter-<n></span> </span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| +-<a href="http://beforeafterx.blogspot.com/2012/05/multiseat-setup-fake-greeter.html">fake-greeter</a></span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| +-<a href="http://beforeafterx.blogspot.com/2012/08/multiseat-configuration-xephyr-seat-1.html" style="color: red;">Xephyr-seat-1</a></span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| +-<span style="color: red;">Xephyr-seat-<n></span> </span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">| </span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;">+-/usr</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;"> |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;"> +-/share</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;"> |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;"> +-/xgreeters</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;"> |</span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;"> +-<a href="http://beforeafterx.blogspot.com/2012/08/multiseat-setup-multiseat-greeter.html" style="color: red;">multiseat-greeter-1.desktop</a></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> +-<span style="color: red;">multiseat-greeter-<n>.desktop</span> </span></div>
<div style="color: black;">
<span style="font-family: "Courier New",Courier,monospace;"> |</span></div>
<div style="color: red;">
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;"> +-</span><a href="http://beforeafterx.blogspot.com/2012/05/multiseat-setup-xineramadesktop.html" style="color: red;"><span style="color: black;">xinerama.desktop</span></a></span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: black;">The lithdm.conf is different than in lightdm 1.0, because it explicitly specifies a distinct xserver-command for each seat, the same with greeter-session.</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: black;"><br /></span></span>
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: black;">The xserver-command for the seat <n> references its corresponding Xephyr-seat-<n> script, which, in turn, has its seat number hardcoded. The greeter-session for the seat <n> references its corresponding multiseat-greeter-<n>.desktop file, which has a hardcoded reference to its corresponding multiseat-greeter-<n>, which in, turn, has its seat number hardcoded.</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: black;"><br /></span></span>
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: black;">The /etc/init.d/multiseat is changed now because it has a LSB-style header, making it suitable for a dependency-based boot. To create appropriate symlinks call</span></span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: black;">$ update-rc.d multiseat defaults</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: black;"><br /></span></span>
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: black;"><br /></span></span></div>
aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-17241301392164896652012-08-18T14:42:00.003-07:002012-08-18T14:42:36.127-07:00Multiseat setup - multiseat-greeter-1.desktop[Desktop Entry]<br />Name=LightDM GTK+ Greeter<br />Comment=This runs the GTK+ greeter, it should only be run from LightDM<br />Exec=/etc/multiseat/scripts/multiseat-greeter-1<br />Type=Application<br />X-Ubuntu-Gettext-Domain=lightdmaphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-77271026933941815792012-08-18T14:41:00.001-07:002012-08-18T14:41:09.715-07:00Multiseat setup - multiseat-greeter-1#!/bin/bash<br />#<br />#multiseat wrapper around ligthdm greeter in order to position 1 Xephyr instance<br />#<br />. /etc/multiseat/scripts/helper-functions<br /><br />PRIMARY=`get_conf 0 PRIMARY`<br />SEAT=1<br /><br />if [ $SEAT != $PRIMARY ]; then<br /> XEP=`XAUTHORITY=/var/run/lightdm/root/:0 xwininfo -root -children -display :0 | grep "Xephyr on :$SEAT" --max-count=1`;<br /> XEPHYR_WIN_ID=`echo ${XEP} | cut -d' ' -f1`;<br /> DISPLACEMENT=`get_conf $SEAT DISPLACEMENT`<br /> DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 wmctrl 2>&1 -v -i -r ${XEPHYR_WIN_ID} -e 0,${DISPLACEMENT},-1,-1;<br />fi<br /><br />XAUTHORITY=/var/run/lightdm/root/:$SEAT<br />DISPLAY=:$SEAT<br />exec /usr/sbin/lightdm-gtk-greeteraphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-50198853009191481862012-08-18T14:38:00.003-07:002012-08-18T14:39:01.634-07:00Multiseat setup - Xephyr-seat-1#!/bin/bash<br />
#<br />
# $1 - display number of this Xephyr<br />
<br />
. /etc/multiseat/scripts/helper-functions<br />
<br />
trap "" usr1<br />
<br />
XEPHYR=/root/Xephyr-new<br />
export DISPLAY=:0<br />
export XAUTHORITY=/var/run/lightdm/root/:0<br />
<br />
SEAT=1<br />
<br />
SIZE=`get_conf $SEAT SIZE`<br />
KEYBOARD=`get_conf $SEAT KEYBOARD`<br />
LAYOUT=`get_conf $SEAT LAYOUT`<br />
MOUSE=`get_conf $SEAT MOUSE`<br />
DPI=`get_conf $SEAT DPI`<br />
<br />
exec $XEPHYR -retro -screen ${SIZE} -keybd evdev,,device=/dev/input/${KEYBOARD},xkbrules=evdev,xkbmodel=evdev,xkblayout=${LAYOUT} -mouse evdev,,device=/dev/input/${MOUSE} -dpi ${DPI} $1aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-14314183281173292662012-08-18T14:36:00.001-07:002012-08-18T14:36:25.197-07:00Multiseat setup - init.d/multiseat#!/bin/sh<br />### BEGIN INIT INFO<br /># Provides: multiseat<br /># Required-Start: bootlogs<br /># Required-Stop:<br /># Default-Start: 1 2 3 4 5<br /># Default-Stop:<br /># Short-Description: Trigger udev rules<br /># Description: For some reason the rules for multiseat config need to be<br /># fired once more and later than at the very beginning.<br />### END INIT INFO<br /><br /><br />/sbin/udevadm trigger<br />aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-23774462495731846672012-08-18T14:34:00.002-07:002012-08-18T14:34:30.223-07:00Multiseat setup - lightdm.conf[LightDM]<br />
greeter-user=root<br />
user-authority-in-system-dir=false<br />
common-vt=true<br />
<br />
[SeatDefaults]<br />
xserver-allow-tcp=false<br />
greeter-hide-users=true<br />
user-session=lightdm-xsession<br />
session-wrapper=/etc/X11/Xsession<br />
<br />
[Seat:0]<br />
xserver-command=X -br -dpms -s 0 -novtswitch<br />
greeter-session=xinerama<br />
<br />
[Seat:1]<br />
xserver-command=/etc/multiseat/scripts/Xephyr-seat-1<br />
greeter-session=multiseat-greeter-1<br />
<br />
[Seat:2]<br />
xserver-command=/etc/multiseat/scripts/Xephyr-seat-2<br />
greeter-session=multiseat-greeter-2<br />
<br />aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com1tag:blogger.com,1999:blog-8466411555352449811.post-2695207145200826542012-08-18T13:59:00.000-07:002012-08-18T14:57:37.736-07:00lightdm 1.2, debian WheezyThe time has come and lightdm 1.2 is in Wheezy. There is no way but making it work. The good news is that I did it; I have a working system prepared as a customized Debian Live on a USB stick. The not so good news (but not so terribly bad either) is that the configuration is a little less elegant. However, there are only 2 small patches to lightdm to make it work. Actually, these are the same as the first 2 patches out of the 4 used in lightdm 1.0.<br />
<br />
Here is the story: the 2 patches deal with removing unused lock files from /tmp (their presence influences the choice of the display number in subsequent runs of lightdm) and with adding an option to use the same vt for all X servers. This is the same as with lightdm 1.0. The difference is that the 2 remaining patches have not been applied. They don't apply at all, they are not even close, because the architecture of lightdm changed since 1.0 and the processes are started in a different way while the 2 remaining patches added an option to pass seat numbers to X servers and to greeters; both X servers and greeters are started as new processes. But there is a satisfying workaround: do not even try applying them, the trade-off being a less elegant configuration.<br />
<br />
In the lightdm 1.0 solution there is one central multiseat.conf, which is used both by udev to name event interface nodes in /dev/input and by multiseat scripts to associate keyboards/mice with seats and to move X servers into their corresponding positions within one big Xinerama screen. The multiseat scripts were generic, so they needed to be told (in an invocation parameter) which seat they relate to; the solution was also nicely scalable - there was only one file, the multiseat.conf, which needed to be edited to specify the keyboards/mice matching to their seats. In the lightdm 1.2 solution the scripts cannot be told which seat they relate to (because lightdm is not patched to do so, for the reasons explained earlier), so some of them are copied, in as many instances as there are seats, and by their construction they relate to a fixed seat. The good thing is that the patches which have been applied are really simple, so it might be easier to make it to the lightdm mainline.<br />
<br />
You can get the changes from here:<br />
<br />
<tt class="command">bzr branch
<span class="branch-url">lp:~andrzejtp2010/lightdm/lightdm-1.2-xephyr-multiseat</span></tt><br />
<br />
<tt class="command"><span class="branch-url"></span></tt><tt class="command">bzr diff -r1493 > multiseat.patch</tt><br />
<br />
<tt class="command">and follow the build instruction from <a href="http://beforeafterx.blogspot.com/2012/05/gdm3-sucks.html">here</a>. </tt><br />
<br />
<a href="http://beforeafterx.blogspot.com/2012/08/configuration-of-ligthdm-12.html">Stay tuned</a>.aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0tag:blogger.com,1999:blog-8466411555352449811.post-89873101336808609622012-05-25T12:49:00.002-07:002012-08-18T01:16:24.729-07:00Multiseat setup - Configuring lightdmThere are two pieces of information: a good one and a bad one. The good one is that I did successfully run a Xephyr-based multiseat setup using lightdm as display manager. The bad one is that I managed to modify lightdm from the 1.0 series. It is happily found in Debian wheezy now, but newer releases will likely make it into testing eventually.<br />
<br />
Anyway, lets get to configuring it!<br />
<br />
The tree of the installed files looks very similar to the layout used for gdm2. The changed/modified entries are indicated <span style="color: red;">in red</span>.<br />
<br />
<span style="color: red;">/</span><br />
<span style="color: red;">| </span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">+-</span>/etc</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> +-/default</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> | |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> | +-<a href="http://beforeafterx.blogspot.com/2011/02/multiseat-setup-defaultmultiseat.html">multiseat</a></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> +-/<span style="color: red;">lightdm</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> | |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> | +-<a href="http://beforeafterx.blogspot.com/2012/05/multiseat-setup-lightdmconf.html"><span style="color: red;">lightdm.conf</span></a></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> +-/X11</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> | |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> | +-<a href="http://beforeafterx.blogspot.com/2011/02/multiseat-setup-xorgconf.html">xorg.conf</a></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> +-/init.d</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> | |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> | +-<a href="http://beforeafterx.blogspot.com/2011/02/multiseat-setup-initdmultiseat.html">multiseat</a></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> +-/udev</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> | |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> | +-/rules.d</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> | |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> | +-<a href="http://beforeafterx.blogspot.com/2011/02/multiseat-setup-00-multiseatrules.html">00-multiseat.rules</a></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> +-/multiseat</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> <span style="color: red;"> </span> |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> <span style="color: red;"> </span> +-<a href="http://beforeafterx.blogspot.com/2011/02/multiseat-setup-multiseatconf.html">multiseat.conf</a></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> <span style="color: red;"> </span> |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> <span style="color: red;"> </span> +-/scripts</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> <span style="color: red;"> </span> |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> <span style="color: red;"> </span> +-<a href="http://beforeafterx.blogspot.com/2011/02/multiseat-setup-helper-functions.html">helper-functions</a></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> <span style="color: red;"> </span> |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> <span style="color: red;"> </span> +-<a href="http://beforeafterx.blogspot.com/2011/02/multiseat-setup-match-and-name.html">match-and-name</a></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> <span style="color: red;"> </span> |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> <span style="color: red;"> </span> +-<a href="http://beforeafterx.blogspot.com/2012/05/multiseat-setup-multiseat-greeter.html" style="color: red;">multiseat-greeter</a></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> <span style="color: red;"> </span> |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> <span style="color: red;"> </span> +-<a href="http://beforeafterx.blogspot.com/2012/05/multiseat-setup-fake-greeter.html"><span style="color: red;">fake-greeter</span></a></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> <span style="color: red;"> </span> |</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> <span style="color: red;"> </span> +-<a href="http://beforeafterx.blogspot.com/2012/05/multiseat-setup-xephyr-seat.html" style="color: red;">Xephyr-seat</a></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">|</span> </span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;">+-/usr</span></span><br />
<div style="color: red;">
<span style="font-family: "Courier New",Courier,monospace;"> |</span></div>
<div style="color: red;">
<span style="font-family: "Courier New",Courier,monospace;"> +-/share</span></div>
<div style="color: red;">
<span style="font-family: "Courier New",Courier,monospace;"> |</span></div>
<div style="color: red;">
<span style="font-family: "Courier New",Courier,monospace;"> +-/xgreeters</span></div>
<div style="color: red;">
<span style="font-family: "Courier New",Courier,monospace;"> |</span></div>
<div style="color: red;">
<span style="font-family: "Courier New",Courier,monospace;"> +-<a href="http://beforeafterx.blogspot.com/2012/05/multiseat-setup-multiseat.html" style="color: red;">multiseat-greeter.desktop</a></span></div>
<div style="color: red;">
<span style="font-family: "Courier New",Courier,monospace;"> |</span></div>
<div style="color: red;">
<span style="font-family: "Courier New",Courier,monospace;"><span style="color: red;"> +-</span><a href="http://beforeafterx.blogspot.com/2012/05/multiseat-setup-xineramadesktop.html" style="color: red;">xinerama.desktop </a></span></div>
<br />
Now let me explain the files.<br />
<br />
lightdm.conf uses the three options added by the patches found on the branch in Launchpad. In <span style="font-family: "Courier New",Courier,monospace;">[LightDM]</span> there is <span style="font-family: "Courier New",Courier,monospace;">common-vt=true</span>. It means that all the X servers will use the same vt number. Since in a multiseat setup there are at least two seats, I used a convention that the default seat options are for the Xephyr seats proper, while the X server which covers all the monitors will use a dedicated configuration section of its own. The <span style="font-family: "Courier New",Courier,monospace;">xserver-pass-seat-name<span style="font-family: inherit;"><span style="font-family: "Courier New",Courier,monospace;">=true</span> option means that </span></span>the command used to start the X server (<span style="font-family: "Courier New",Courier,monospace;">xserver-command</span>) will be added a parameter whose value is the number of the DISPLAY for this X instance. The <span style="font-family: "Courier New",Courier,monospace;">greeter-pass-seat-id=true</span><span style="font-family: inherit;"> means that the command used to start the greeter (found in the Exec </span>entry of the .desktop file) will be added parameters whose values are the number of the DISPLAY for this X instance and the seat name as found in lightdm.conf. E.g., if there are [Seat:1] and [Seat:2], then the seat names will be 1 and 2. Thanks to the <span style="font-family: "Courier New",Courier,monospace;">greeter-pass-seat-id=true</span><span style="font-family: inherit;"> </span><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: inherit;">option the multiseat-greeter is simpler and it moves only the Xephyr of interest to its desired position. The Xauthority files are also different than in the gdm-based setup. The fake-greeter just sleeps. But, in order to cleanly shut down, it handles the TERM signal and kills the sleep command if a signal is received. Thanks to the </span></span><span style="font-family: "Courier New",Courier,monospace;"></span><span style="font-family: "Courier New",Courier,monospace;">xserver-pass-seat-name<span style="font-family: inherit;"><span style="font-family: "Courier New",Courier,monospace;">=true</span> </span></span><span style="font-family: inherit;">option the Xephyr-seat is also a bit simpler, as it expects seat name and display number as parameters. The desktop files are used to specify the command to be run as a greeter.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">The fake greeter is a kind of a hack. In fact it would be best to force lightdm not to start a greeter at all, just X server.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">All works similar to the gdm2 case. Only the configuration of the display manager and location and names of Xauthority files are different.</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: inherit;"><br /></span></span>
aphttp://www.blogger.com/profile/18337525119113731365noreply@blogger.com0