个人工具

“UbuntuHelp:Updated Version For Feisty”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
 
(未显示同一用户的7个中间版本)
第1行: 第1行:
{{From|https://help.ubuntu.com/community/Updated Version For Feisty}}
+
{{From|https://help.ubuntu.com/community/Updated_Version_For_Feisty}}
{{Languages|UbuntuHelp:Updated Version For Feisty}}
+
{{Languages|UbuntuHelp:Updated_Version_For_Feisty}}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+
<<Include(Tag/Unsupported)>>
<html>
+
<<Include(Tag/Deletion)>>
<head>
+
This page is a re-creation of the LTSP trouble-shooting page specifically aimed at the Feisty release. According to the maintainers some of these fixes are not required and should be treated as "dubious", however they work for us.
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+
== Introduction ==
<meta name="robots" content="index,nofollow">
+
We've found some bugs in a number of components in the Ubuntu LTSP kit, hopefully some of the developers will take a look at this page at some point and possibly integrate some of our fixes back into the mix. Until then however, below we detail how we got around some of the more interesting issues.
 +
We have tried to post fix requests where possible, however a number relate to "work in progress" and "fixes available in gutsy".
 +
== Getting Started ==
 +
First you need to edit your /etc/default/syslogd on the your server, make sure the "-r" option is listed in options. This will allow thin clients to send their syslog information to your server, this making it visible. Be warned, multiple thin clients booting at the same time can get interesting.
 +
== Getting set up with GDM ==
 +
Then you need to set up an environment for your thin clients, try the following;
 +
<pre><nowiki>
 +
ltsp-build-client            # this can take a while
 +
cd /opt/ltsp/i386
 +
chroot . /bin/bash
 +
apt-get install gdm          # a real login manager
 +
apt-get install nvidia-glx  #
 +
apt-get install ..          # any other drivers required by thin client HW
 +
vi /etc/lts.conf            # add "XSERVER=nvidia" or similar as appropriate
 +
update-initramfs -c -k all  # rebuild your ramfs with the new drivers
 +
</nowiki></pre>
 +
Now check that /opt/ltsp/i386/etc/X11/default-display-manager contains; <pre><nowiki>
 +
/usr/sbin/gdm
 +
</nowiki></pre>
 +
Then you will need some manual fixes; <pre><nowiki>
 +
chown root:gdm /var/lib/gdm
 +
chmod 1770 /var/lib/gdm
 +
</nowiki></pre>
 +
Then edit /etc/default/ltsp-client-setup and add the following;<pre><nowiki>
 +
rw_dirs="$rw_dirs /var/lib/gdm /var/run/network"
 +
copy_dirs="$copy_dirs /home"
 +
</nowiki></pre>
 +
Then edit /etc/X11/gdm/gdm.conf, comment out the "0=Standard" and uncomment the "0=Chooser".
 +
You should be pretty much good to go with gdm as your login manager. Why do we do this when there's the wonderful ldm login server which apparently we should be using instead?
 +
* LDM is generally 'rubbish' when compared to GDM
 +
* LDM does not let you select which server you connect to, critical if your allocated server is dead
 +
* LDM does not currently report "incorrect password", it just refreshes the screen with no error report
 +
* LDM does not follow the system themes, so your login screen does not match your user's theme
 +
== DHCP ==
 +
The DHCP setup can sometime become confusing as you can end up with more than one dhcpd.conf file. Make sure you have no duplicates lying around otherwise you could end up spending hours changing your dhcpd.conf and wondering what's wrong with the syntax, only to find it's not using the file you thought it was. Here's a working sample;
 +
<pre><nowiki>
 +
ddns-update-style none;
 +
ignore client-updates;
 +
default-lease-time              86400;
 +
max-lease-time                  86400;
  
 +
subnet 10.1.0.0 netmask 255.255.255.0 {
 +
  interface eth1;
 +
  range 10.1.0.100 10.1.0.199;
 +
  option domain-name "mydomain.co.uk";
 +
  option domain-name-servers 10.1.0.1;
 +
  option broadcast-address 10.1.0.255;
 +
  option routers 10.1.0.4;
 +
  option subnet-mask 255.255.255.0;
 +
  filename "/ltsp/pxelinux.0";
 +
  option root-path "/opt/ltsp/i386";
 +
}
 +
</nowiki></pre>
 +
== Sound Configuration ==
 +
This is now working (by default) on Feisty with both LDM and GDM (Apparently XDMCP is unsupported by LTSP5, which is why sound doesn't work .. but it works for us!)
 +
Don't spend too much time trying to get your desktop volume control working - it won't. Use application specific volume controls instead, or the volume knob on your speaker.
 +
== USB Client Printers ==
 +
(not worked on this yet - see previous version of document if you have a problem)
 +
== Graphics Problems ==
 +
(not worked on this yet - see previous version of document if you have a problem)
 +
== Failure to Launch ==
 +
There's a new problem of Feisty, people who've been running quite happily now find that when they run rdesktop and get a windows 2000 login, as soon as they click on anything interesting, their application (rdesktop) SEGV's. This is a REALLY NASTY bug to track down, so if your windows / rdesktop applications start falling over - start here!
 +
For some reason, it's caused by lack of bitmap depth on the client's X display. To fix, inside your chroot ltsp filesystem (/opt/ltsp/i386) edit /etc/lts.conf and add a section for your work station (or add to your default section;
 +
<pre><nowiki>
 +
X_COLOR_DEPTH = 24
 +
</nowiki></pre>
 +
Then reboot and see what happens .. 100% success rate here.
 +
If anyone has any more tips - please add them here!
 +
== Local Storage Devices ==
 +
Ok, we now have this working with GDM. (at this point we're way beyond worrying about LDM)
 +
This is what you need to do, on your server, edit /etc/X11/gdm/PreSession/Default <pre><nowiki>
 +
+CLIENT=`echo $DISPLAY | cut -d: -f1 `
 +
+LOCATION="/mnt/localdev/$CLIENT"
 +
+LOCALDEV="/var/lib/localdev"
 +
+mkdir -p ${LOCATION} && chown $USER ${LOCATION} && echo $USER > ${LOCALDEV}/${CLIENT}
 +
SESSREG=`gdmwhich sessreg`
 +
..
 +
</nowiki></pre>
 +
Then edit /etc/X11/gdm/PostSession/Default <pre><nowiki>
 +
+CLIENT=`echo $DISPLAY | cut -d: -f1 `
 +
+LOCATION="/mnt/localdev/$CLIENT"
 +
+LOCALDEV="/var/lib/localdev"
  
<title>Updated - Community Ubuntu Documentation</title>
+
+umount ${LOCATION}
 +
+killall -u ${USER} ltspfs
 +
+rm ${LOCALDEV}/${CLIENT}
 +
+rmdir ${LOCATION}
  
<script type="text/javascript">
+
exit 0
<!--// common functions
+
</nowiki></pre>
 +
Then edit /usr/share/gnome/default.session <pre><nowiki>
 +
7,RestartStyleHint=3
 +
7,Priority=52
 +
7,RestartCommand=/usr/local/bin/LDA-nautilus.sh
 +
</nowiki></pre>
 +
Then add LDA-nautilus.sh to your /usr/local/bin, here's my slightly modified version <pre><nowiki>
 +
#!/bin/bash
 +
# Copyright Henry Burroughs/ Hilton Head Preparatory School
 +
  
// We keep here the state of the search box
+
#      This program is free software; you can redistribute it and/or modify
searchIsDisabled = false;
+
#    it under the terms of the GNU General Public License as published by
 +
#    the Free Software Foundation; either version 2 of the License, or
 +
#    (at your option) any later version.
  
function searchChange(e) {
+
#    This program is distributed in the hope that it will be useful,
// Update search buttons status according to search box content.
+
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
// Ignore empty or whitespace search term.
+
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
var value = e.value.replace(/\s+/, '');
+
#    GNU General Public License for more details.
if (value == '' || searchIsDisabled) {
+
searchSetDisabled(true);
+
} else {
+
searchSetDisabled(false);
+
}
+
}
+
  
function searchSetDisabled(flag) {
+
#    You should have received a copy of the GNU General Public License
// Enable or disable search
+
#    along with this program; if not, write to the Free Software
document.getElementById('fullsearch').disabled = flag;
+
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
document.getElementById('titlesearch').disabled = flag;
+
}
+
  
function searchFocus(e) {
 
// Update search input content on focus
 
if (e.value == 'Search') {
 
e.value = '';
 
e.style.color = 'black';
 
searchIsDisabled = false;
 
}
 
}
 
  
function searchBlur(e) {
 
// Update search input content on blur
 
if (e.value == '') {
 
e.value = 'Search';
 
e.style.color = 'gray';
 
searchIsDisabled = true;
 
}
 
}
 
  
function actionsMenuInit(title) {
+
#----------Script Setup & Functions
// Initiliaze action menu
+
find_key() {
for (i = 0; i < document.forms.length; i++) {
+
        OUTPUT=""
var form = document.forms[i];
+
        for DIR in `gconftool-2 --all-dirs /desktop/gnome/connected_servers`
if (form.className == 'actionsmenu') {
+
        do
// Check if this form needs update
+
                $GCONF -a $DIR | grep "$DISPLAY_NAME" > /dev/null
var div = form.getElementsByTagName('div')[0];
+
                if [ $? == 0 ]
var label = div.getElementsByTagName('label')[0];
+
                then
if (label) {
+
                        OUTPUT="$DIR"
// This is the first time: remove label and do buton.
+
                fi
div.removeChild(label);
+
        done
var dobutton = div.getElementsByTagName('input')[0];
+
        echo $OUTPUT
div.removeChild(dobutton);
+
// and add menu title
+
var select = div.getElementsByTagName('select')[0];
+
var item = document.createElement('option');
+
item.appendChild(document.createTextNode(title));
+
item.value = 'show';
+
select.insertBefore(item, select.options[0]);
+
select.selectedIndex = 0;
+
 
}
 
}
}
 
}
 
}
 
//-->
 
</script>
 
  
<link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="/htdocs/ubuntu/css/common.css">
+
find_last_server() {
<link rel="stylesheet" type="text/css" charset="utf-8" media="screen" href="/htdocs/ubuntu/css/screen.css">
+
        LASTONE=`$GCONF --all-dirs /desktop/gnome/connected_servers | sort --reverse |cut -d'/' -f 5 | head -n 1`
<link rel="stylesheet" type="text/css" charset="utf-8" media="print" href="/htdocs/ubuntu/css/print.css">
+
        if [ "$LASTONE" != "" ]
<link rel="stylesheet" type="text/css" charset="utf-8" media="projection" href="/htdocs/ubuntu/css/projection.css">
+
                then
 +
                        NEWONE=`expr $LASTONE + 1`
 +
                else
 +
                        NEWONE=1
 +
        fi
  
<link rel="Start" href="/community/UserDocumentation">
 
<link rel="Alternate" title="Wiki Markup" href="/community/Updated?action=raw">
 
<link rel="Alternate" media="print" title="Print View" href="/community/Updated?action=print">
 
<link rel="Search" href="/community/FindPage">
 
<link rel="Index" href="/community/TitleIndex">
 
<link rel="Glossary" href="/community/WordIndex">
 
<link rel="Help" href="/community/HelpOnFormatting">
 
</head>
 
  
<body  lang="en" dir="ltr">
+
        echo $NEWONE
 +
}
  
<script xmlns="" src="https://ssl.google-analytics.com/urchin.js" type="text/javascript"></script>
+
delete_key() {
<script xmlns="" type="text/javascript"><![CDATA[
+
        KEY=`find_key`
_uacct = "UA-1018242-8";
+
        $GCONF --recursive-unset $KEY
urchinTracker();
+
}
]]></script>
+
<div id="header">
+
<div id="mastwrap"><div id="masthead">
+
<div id="logo"><a href="/community/UserDocumentation">Community Ubuntu Documentation</a></div>
+
 
+
<form id="searchform" method="get" action="">
+
<div>
+
<input type="hidden" name="action" value="fullsearch">
+
<input type="hidden" name="context" value="180">
+
<label for="searchinput">Search:</label>
+
<input id="searchinput" type="text" name="value" value="" size="20"
+
onfocus="searchFocus(this)" onblur="searchBlur(this)"
+
onkeyup="searchChange(this)" onchange="searchChange(this)" alt="Search">
+
<input id="titlesearch" name="titlesearch" type="submit"
+
value="Titles" alt="Search Titles">
+
<input id="fullsearch" name="fullsearch" type="submit"
+
value="Text" alt="Search Full Text">
+
</div>
+
</form>
+
<script type="text/javascript">
+
<!--// Initialize search form
+
var f = document.getElementById('searchform');
+
f.getElementsByTagName('label')[0].style.display = 'none';
+
var e = document.getElementById('searchinput');
+
searchChange(e);
+
searchBlur(e);
+
//-->
+
</script>
+
 
+
 
+
<div id="sisternav">
+
<ul>
+
<li id="plain">
+
<a href="https://help.ubuntu.com/6.06"
+
accesskey="t">6.06 LTS</a>
+
</li>
+
<li id="plain">
+
<a href="https://help.ubuntu.com/6.10"
+
accesskey="t">6.10</a>
+
</li>
+
<li id="plain">
+
<a href="https://help.ubuntu.com/7.04"
+
accesskey="t">7.04</a>
+
</li>
+
<li id="plain">
+
<a href="https://help.ubuntu.com/7.10"
+
accesskey="t">7.10</a>
+
</li>
+
<li id="current">
+
<a href="https://help.ubuntu.com/community"
+
accesskey="t">Community Docs</a>
+
</li>
+
</ul>
+
</div>
+
 
+
</div></div>
+
 
+
<ul class="extranav">
+
<li><a href="/community/UserDocumentation">User Documentation</a></li>
+
</ul>
+
 
+
</div>
+
 
+
<div id="page" lang="en" dir="ltr"><!-- start page -->
+
  
 +
CLIENT=`echo $DISPLAY | cut -d: -f1 `
 +
#----------End Script Setup & Functions
  
<h1 id="title"><a title="Click to do a full-text search for this title" href="/community/Updated?action=fullsearch&amp;value=linkto%3A%22Updated%22&amp;context=180">Updated</a></h1>
+
#-----------User Configurable Variables
<div lang="en" id="content" dir="ltr">
+
<a id="top"></a>
+
<div lang="en" id="content" dir="ltr">
+
<a id="top"></a>
+
<p><strong>This page does not exist yet. You can create a new empty page, or use one of the page templates. Before creating the page, please check if a similar page already exists.</strong> </p>
+
<a href="/community/Updated?action=edit">Create new empty page</a><p> </p>
+
<div>
+
<table>
+
<tr>
+
<td>
+
<p> <strong>Page templates:</strong> </p>
+
</td>
+
<td>
+
<p> <strong>Existing pages with similar names:</strong> </p>
+
</td>
+
</tr>
+
<tr>
+
<td style="vertical-align: top;">
+
<p> <ul>
+
<li><a href="/community/Updated?action=edit&amp;template=AideTemplate">AideTemplate</a></li>
+
<li><a href="/community/Updated?action=edit&amp;template=[[category:CategoryTemplate">CategoryTemplate</a></li>]]
+
<li><a href="/community/Updated?action=edit&amp;template=DocumentationTemplate">DocumentationTemplate</a></li>
+
<li><a href="/community/Updated?action=edit&amp;template=HelpTemplate">HelpTemplate</a></li>
+
<li><a href="/community/Updated?action=edit&amp;template=HilfeTemplate">HilfeTemplate</a></li>
+
<li><a href="/community/Updated?action=edit&amp;template=HomepageTemplate">HomepageTemplate</a></li>
+
<li><a href="/community/Updated?action=edit&amp;template=PagePersonnelleTemplate">PagePersonnelleTemplate</a></li>
+
<li><a href="/community/Updated?action=edit&amp;template=Pr%c3%a9sentationTemplate">PrésentationTemplate</a></li>
+
<li><a href="/community/Updated?action=edit&amp;template=SlideShowHandOutTemplate">SlideShowHandOutTemplate</a></li>
+
<li><a href="/community/Updated?action=edit&amp;template=SlideShowTemplate">SlideShowTemplate</a></li>
+
<li><a href="/community/Updated?action=edit&amp;template=SlideTemplate">SlideTemplate</a></li>
+
<li><a href="/community/Updated?action=edit&amp;template=SupportPapierD'UnePr%c3%a9sentationTemplate">SupportPapierD'UnePrésentationTemplate</a></li>
+
<li><a href="/community/Updated?action=edit&amp;template=ThuisbladTemplate">ThuisbladTemplate</a></li>
+
<li><a href="/community/Updated?action=edit&amp;template=TransparentTemplate">TransparentTemplate</a></li>
+
</ul>
+
</p>
+
</td>
+
<td style="vertical-align: top;">
+
<p> <ul>
+
<li><a href="/community/ClamAVUpdates">ClamAVUpdates</a></li>
+
<li><a href="/community/UbuntuUpdates">UbuntuUpdates</a></li>
+
<li><a href="/community/UpdatingADeb">UpdatingADeb</a></li>
+
</ul>
+
<ul>
+
<li><a href="/community/Updated_Version_For_Feisty">Updated Version For Feisty</a></li>
+
</ul>
+
<ul>
+
<li><a href="/community/KeepingUbuntuUpdated">KeepingUbuntuUpdated</a></li>
+
</ul>
+
</p>
+
</td>
+
</tr>
+
</table>
+
</div>
+
<a id="bottom"></a>
+
  
</div>
+
DISPLAY_NAME="My Disks"
<a id="bottom"></a>
+
LOCATION="/mnt/localdev/$CLIENT"
 +
LOCALDEV="/var/lib/localdev"
  
</div>
+
#----------End User Configurable Variables
 +
#----------Begin Main part of script----------------------
 +
GCONFOPTS=""
 +
#This part is under construction... in case it runs before gconfd is up and going
 +
#gconftool-2 -p || GCONFOPTS="--direct --config-source="
 +
GCONF="gconftool-2 $GCONFOPTS"
  
</div> <!-- end page -->
 
  
 +
#See if there is a host access file for this client, and if not, we delete any existing keys and stop here
 +
# This takes care of ssh, vnc, etc...mainly we let the LDA-automount-login.sh script handle it
 +
if [ ! -e $LOCALDEV/$CLIENT ]
 +
then
 +
        echo "Delete key: $LOCALDEV/$CLIENT"
 +
        delete_key
 +
        exit 0;
 +
fi
  
<div id="footer">
+
ltspfs ${CLIENT}:/var/run/drives ${LOCATION} &
  
<div id="ubuntulinks">
+
if [ "`find_key`" != "" ]
&copy; 2007 <a href="http://www.canonical.com">Canonical Ltd</a>. Ubuntu, Kubuntu, Edubuntu and Canonical are registered trademarks of Canonical Ltd.<br />
+
then
<a href="https://help.ubuntu.com/community/WikiGuide">Feedback</a> &mdash;
+
        $GCONF --type string --set `find_key`/uri "file://$LOCATION"
<a href="https://help.ubuntu.com/community/License">Legal</a> &mdash;
+
        exit 0;
<a href="https://help.ubuntu.com/community/Credits">Credits</a>
+
fi
<br />
+
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">
+
<img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/80x15.png" />
+
</a>
+
</div>
+
  
 +
#Otherwise, we need to create that key under the next newest one....
 +
LASTNUM=`find_last_server`
 +
$GCONF --type string --set /desktop/gnome/connected_servers/$LASTNUM/display_name "$DISPLAY_NAME"
 +
$GCONF --type string --set /desktop/gnome/connected_servers/$LASTNUM/icon "gnome-dev-removable"
 +
$GCONF --type string --set /desktop/gnome/connected_servers/$LASTNUM/uri "file://$LOCATION"
  
</div>
+
echo "Connected Server Update Done"
</body>
+
</nowiki></pre>
</html>
+
And you should be ready to rock and roll, with ONE main gotcha. You **need** to have entries in your hosts file on both the thin client environment and on the server for each of your clients. (if you don't already, you should!) If you don't do this, ltspfsd won't start on the client and you'll get nowhere.
 +
=== Security Warning ===
 +
By default, ltspfsd is started with a "-a" which means that anything you insert into a client USB socket or CD drive will be mountable by anyone on the network with enough knowledge. Bug #133635.
 +
== How to secure XDMCP ==
 +
The comment I hear is "we need LDM for security", my answer is "no you don't". Here's why;
 +
If you run your sessions over [[UbuntuHelp:OpenVPN|OpenVPN]], they are inherently secure, AND you get a proper login manager. The process goes something like this, on the server <pre><nowiki>
 +
apt-get install openvpn
 +
mv /usr/share/doc/examples/easy-rsa /usr/share/openvpn
 +
cd /usr/share/openvpn/easy-rsa
 +
(read docs, create keys etc)
 +
cd /etc/openvpn
 +
mkdir gdm
 +
vi gdm.conf
 +
---
 +
port 1194
 +
proto udp
 +
dev tun0
 +
ca gdm/ca.crt
 +
cert gdm/server.crt
 +
key gdm/server.key
 +
dh gdm/dh1024.pem
 +
server 10.99.0.0 255.255.255.0
 +
push "route 10.99.0.0 255.255.255.0"
 +
ifconfig-pool-persist gdm/ipp.txt
 +
status gdm/status.log
 +
keepalive 10 50
 +
comp-lzo
 +
persist-key
 +
persist-tun
 +
verb 3
 +
tran-window 3600
 +
tls-server
 +
passtos
 +
duplicate-cn
 +
---
 +
cp /usr/share/openvpn/easy-rsa/keys/{appropriate keys} gdm
 +
/etc/init.d/openvpn start
 +
</nowiki></pre>
 +
You should now have a tun0 interface on 10.99.0.1. Now a similar operation for the thin client's environment. On the server, generate a key called "workstation", then do <pre><nowiki>
 +
mkdir /opt/ltsp/i386/etc/openvpn/gdm
 +
cp /usr/share/openvpn/easy-rsa/keys/{ca.crt,workstation.key,workstation.crt} /opt/ltsp/i386/etc/openvpn/gdm
 +
chroot /opt/ltsp/i386 /bin/bash --login
 +
apt-get install openvpn
 +
vi /etc/openvpn/gdm.conf
 +
---
 +
client
 +
dev tun
 +
proto udp
 +
remote <raw IP of server> 1194
 +
resolv-retry infinite
 +
nobind
 +
persist-key
 +
persist-tun
 +
ca gdm/ca.crt
 +
cert gdm/workstation.crt
 +
key gdm/workstation.key
 +
ns-cert-type server
 +
comp-lzo
 +
verb 3
 +
---
 +
/etc/init.d/openvpn start
 +
</nowiki></pre>
 +
To cap it off, to make sure that the client accesses the server via the VPN, edit /etc/X11/gdm/gdm.conf (this is still in the thin client's virtual environment) and set chooser/Broadcast to false and Hosts=10.99.0.1. And you're away ...
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2009年5月12日 (二) 19:22的最新版本

<<Include(Tag/Unsupported)>> <<Include(Tag/Deletion)>> This page is a re-creation of the LTSP trouble-shooting page specifically aimed at the Feisty release. According to the maintainers some of these fixes are not required and should be treated as "dubious", however they work for us.

Introduction

We've found some bugs in a number of components in the Ubuntu LTSP kit, hopefully some of the developers will take a look at this page at some point and possibly integrate some of our fixes back into the mix. Until then however, below we detail how we got around some of the more interesting issues. We have tried to post fix requests where possible, however a number relate to "work in progress" and "fixes available in gutsy".

Getting Started

First you need to edit your /etc/default/syslogd on the your server, make sure the "-r" option is listed in options. This will allow thin clients to send their syslog information to your server, this making it visible. Be warned, multiple thin clients booting at the same time can get interesting.

Getting set up with GDM

Then you need to set up an environment for your thin clients, try the following;

 ltsp-build-client            # this can take a while
 cd /opt/ltsp/i386
 chroot . /bin/bash
 apt-get install gdm          # a real login manager
 apt-get install nvidia-glx   #
 apt-get install ..           # any other drivers required by thin client HW
 vi /etc/lts.conf             # add "XSERVER=nvidia" or similar as appropriate
 update-initramfs -c -k all   # rebuild your ramfs with the new drivers
Now check that /opt/ltsp/i386/etc/X11/default-display-manager contains;
 /usr/sbin/gdm
Then you will need some manual fixes;
 chown root:gdm /var/lib/gdm
 chmod 1770 /var/lib/gdm
Then edit /etc/default/ltsp-client-setup and add the following;
 rw_dirs="$rw_dirs /var/lib/gdm /var/run/network"
 copy_dirs="$copy_dirs /home"

Then edit /etc/X11/gdm/gdm.conf, comment out the "0=Standard" and uncomment the "0=Chooser". You should be pretty much good to go with gdm as your login manager. Why do we do this when there's the wonderful ldm login server which apparently we should be using instead?

  • LDM is generally 'rubbish' when compared to GDM
  • LDM does not let you select which server you connect to, critical if your allocated server is dead
  • LDM does not currently report "incorrect password", it just refreshes the screen with no error report
  • LDM does not follow the system themes, so your login screen does not match your user's theme

DHCP

The DHCP setup can sometime become confusing as you can end up with more than one dhcpd.conf file. Make sure you have no duplicates lying around otherwise you could end up spending hours changing your dhcpd.conf and wondering what's wrong with the syntax, only to find it's not using the file you thought it was. Here's a working sample;

 ddns-update-style none;
 ignore client-updates;
 default-lease-time              86400;
 max-lease-time                  86400;

 subnet 10.1.0.0 netmask 255.255.255.0 {
   interface eth1;
   range 10.1.0.100 10.1.0.199;
   option domain-name "mydomain.co.uk";
   option domain-name-servers 10.1.0.1;
   option broadcast-address 10.1.0.255;
   option routers 10.1.0.4;
   option subnet-mask 255.255.255.0;
   filename "/ltsp/pxelinux.0";
   option root-path "/opt/ltsp/i386";
 }

Sound Configuration

This is now working (by default) on Feisty with both LDM and GDM (Apparently XDMCP is unsupported by LTSP5, which is why sound doesn't work .. but it works for us!) Don't spend too much time trying to get your desktop volume control working - it won't. Use application specific volume controls instead, or the volume knob on your speaker.

USB Client Printers

(not worked on this yet - see previous version of document if you have a problem)

Graphics Problems

(not worked on this yet - see previous version of document if you have a problem)

Failure to Launch

There's a new problem of Feisty, people who've been running quite happily now find that when they run rdesktop and get a windows 2000 login, as soon as they click on anything interesting, their application (rdesktop) SEGV's. This is a REALLY NASTY bug to track down, so if your windows / rdesktop applications start falling over - start here! For some reason, it's caused by lack of bitmap depth on the client's X display. To fix, inside your chroot ltsp filesystem (/opt/ltsp/i386) edit /etc/lts.conf and add a section for your work station (or add to your default section;

X_COLOR_DEPTH = 24

Then reboot and see what happens .. 100% success rate here. If anyone has any more tips - please add them here!

Local Storage Devices

Ok, we now have this working with GDM. (at this point we're way beyond worrying about LDM)

This is what you need to do, on your server, edit /etc/X11/gdm/PreSession/Default
+CLIENT=`echo $DISPLAY | cut -d: -f1 `
+LOCATION="/mnt/localdev/$CLIENT"
+LOCALDEV="/var/lib/localdev"
+mkdir -p ${LOCATION} && chown $USER ${LOCATION} && echo $USER > ${LOCALDEV}/${CLIENT}
SESSREG=`gdmwhich sessreg`
..
Then edit /etc/X11/gdm/PostSession/Default
+CLIENT=`echo $DISPLAY | cut -d: -f1 `
+LOCATION="/mnt/localdev/$CLIENT"
+LOCALDEV="/var/lib/localdev"

+umount ${LOCATION}
+killall -u ${USER} ltspfs
+rm ${LOCALDEV}/${CLIENT}
+rmdir ${LOCATION}

exit 0
Then edit /usr/share/gnome/default.session
7,RestartStyleHint=3
7,Priority=52
7,RestartCommand=/usr/local/bin/LDA-nautilus.sh
Then add LDA-nautilus.sh to your /usr/local/bin, here's my slightly modified version
#!/bin/bash
# Copyright Henry Burroughs/ Hilton Head Preparatory School
# [email protected]

#       This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.

#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.

#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA



#----------Script Setup & Functions
find_key() {
        OUTPUT=""
        for DIR in `gconftool-2 --all-dirs /desktop/gnome/connected_servers`
        do
                $GCONF -a $DIR | grep "$DISPLAY_NAME" > /dev/null
                if [ $? == 0 ]
                then
                        OUTPUT="$DIR"
                fi
        done
        echo $OUTPUT
}

find_last_server() {
        LASTONE=`$GCONF --all-dirs /desktop/gnome/connected_servers | sort --reverse |cut -d'/' -f 5 | head -n 1`
        if [ "$LASTONE" != "" ]
                then
                        NEWONE=`expr $LASTONE + 1`
                else
                        NEWONE=1
        fi


        echo $NEWONE
}

delete_key() {
        KEY=`find_key`
        $GCONF --recursive-unset $KEY
}

CLIENT=`echo $DISPLAY | cut -d: -f1 `
#----------End Script Setup & Functions

#-----------User Configurable Variables

DISPLAY_NAME="My Disks"
LOCATION="/mnt/localdev/$CLIENT"
LOCALDEV="/var/lib/localdev"

#----------End User Configurable Variables
#----------Begin Main part of script----------------------
GCONFOPTS=""
#This part is under construction... in case it runs before gconfd is up and going
#gconftool-2 -p || GCONFOPTS="--direct --config-source="
GCONF="gconftool-2 $GCONFOPTS"


#See if there is a host access file for this client, and if not, we delete any existing keys and stop here
# This takes care of ssh, vnc, etc...mainly we let the LDA-automount-login.sh script handle it
if [ ! -e $LOCALDEV/$CLIENT ]
then
        echo "Delete key: $LOCALDEV/$CLIENT"
        delete_key
        exit 0;
fi

ltspfs ${CLIENT}:/var/run/drives ${LOCATION} &

if [ "`find_key`" != "" ]
then
        $GCONF --type string --set `find_key`/uri "file://$LOCATION"
        exit 0;
fi

#Otherwise, we need to create that key under the next newest one....
LASTNUM=`find_last_server`
$GCONF --type string --set /desktop/gnome/connected_servers/$LASTNUM/display_name "$DISPLAY_NAME"
$GCONF --type string --set /desktop/gnome/connected_servers/$LASTNUM/icon "gnome-dev-removable"
$GCONF --type string --set /desktop/gnome/connected_servers/$LASTNUM/uri "file://$LOCATION"

echo "Connected Server Update Done"

And you should be ready to rock and roll, with ONE main gotcha. You **need** to have entries in your hosts file on both the thin client environment and on the server for each of your clients. (if you don't already, you should!) If you don't do this, ltspfsd won't start on the client and you'll get nowhere.

Security Warning

By default, ltspfsd is started with a "-a" which means that anything you insert into a client USB socket or CD drive will be mountable by anyone on the network with enough knowledge. Bug #133635.

How to secure XDMCP

The comment I hear is "we need LDM for security", my answer is "no you don't". Here's why;

If you run your sessions over OpenVPN, they are inherently secure, AND you get a proper login manager. The process goes something like this, on the server
apt-get install openvpn
mv /usr/share/doc/examples/easy-rsa /usr/share/openvpn
cd /usr/share/openvpn/easy-rsa
(read docs, create keys etc)
cd /etc/openvpn
mkdir gdm
vi gdm.conf
---
port 1194
proto udp
dev tun0
ca gdm/ca.crt
cert gdm/server.crt
key gdm/server.key
dh gdm/dh1024.pem
server 10.99.0.0 255.255.255.0
push "route 10.99.0.0 255.255.255.0"
ifconfig-pool-persist gdm/ipp.txt
status gdm/status.log
keepalive 10 50
comp-lzo
persist-key
persist-tun
verb 3
tran-window 3600
tls-server
passtos
duplicate-cn
---
cp /usr/share/openvpn/easy-rsa/keys/{appropriate keys} gdm
/etc/init.d/openvpn start
You should now have a tun0 interface on 10.99.0.1. Now a similar operation for the thin client's environment. On the server, generate a key called "workstation", then do
 mkdir /opt/ltsp/i386/etc/openvpn/gdm
 cp /usr/share/openvpn/easy-rsa/keys/{ca.crt,workstation.key,workstation.crt} /opt/ltsp/i386/etc/openvpn/gdm
 chroot /opt/ltsp/i386 /bin/bash --login
 apt-get install openvpn
 vi /etc/openvpn/gdm.conf
---
client
dev tun
proto udp
remote <raw IP of server> 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca gdm/ca.crt
cert gdm/workstation.crt
key gdm/workstation.key
ns-cert-type server
comp-lzo
verb 3
---
 /etc/init.d/openvpn start

To cap it off, to make sure that the client accesses the server via the VPN, edit /etc/X11/gdm/gdm.conf (this is still in the thin client's virtual environment) and set chooser/Broadcast to false and Hosts=10.99.0.1. And you're away ...