<div dir="ltr">Hi John and everyone,<br>Thanks for this post, I am also looking for the solution too.<br>I am deploying a lab with Edubuntu LTSP in a school, we have W2K3 domain setup already, I have tried likewise on normal ubuntu, it joins the domain and everything is ok, but it seems that I don&#39;t have luck with Edubuntu LTSP, I am working on this and next step will be &quot;how to map their home drive when they log on to the lab?&quot;. <br>
Thanks for your help.<br>Ta.<br><br><br><div class="gmail_quote">On Mon, Sep 1, 2008 at 7:21 AM, john <span dir="ltr">&lt;<a href="mailto:lists.john@gmail.com">lists.john@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all,<br>
<br>
I am two days away from the start of school and the problem I<br>
described before still applies to me. If I can&#39;t figure this out I&#39;ll<br>
have to put off my upgrade to 8.04 (or 8.10 perhaps) until December.<br>
I&#39;d really appreciate any help.<br>
<br>
This issue is I want to run some scripts that up until now have been<br>
called by /etc/profile. This has worked for me up through Edubuntu<br>
7.04 The scripts use the system variables $HOME and $USER to map NFS<br>
shares to users desktops. I understand from oli and others that the<br>
image generated by 8.04 doesn&#39;t reference /etc/profile when users log<br>
in.<br>
<br>
When I tried calling these scripts from<br>
/etc/X11/Xsession.d per Ollies suggestion the scripts didn&#39;t seem to<br>
run, and in fact after accepting my credentials X just sent me back to<br>
the login screen, &nbsp;perhaps my syntax was incorrect. But I couldn&#39;t<br>
find any debug information in the logs to trouble shoot the issue.<br>
Where do I find more debug info?<br>
<br>
francois suggestion about putting the lines in<br>
/opt/ltsp/i386/etc/profile and then updating the image didn&#39;t work<br>
either.<br>
<br>
Below is the what I placed in my file called /etc/X11/Xsession.d/85-SetupHome:<br>
<br>
<br>
#!/bin/sh<br>
#<br>
# SetupHome.sh<br>
# &nbsp; &nbsp; &nbsp; Clean up from previous session<br>
#<br>
# Sweep all files from $HOME and $HOME/Desktop to $HOME/Desktop/ZDrive<br>
# &nbsp;(ignores directories).<br>
# Makes Desktop and ZDrive dir entries if needed.<br>
#<br>
<br>
# Name of desktop itself<br>
dt=$HOME/Desktop<br>
if [ ! -e $dt ]<br>
then<br>
 &nbsp; &nbsp;mkdir $dt<br>
fi<br>
<br>
# Name of ZDrive on Desktop<br>
zd=$dt/ZDrive<br>
<br>
# Storage server, and pre-built index of students on the server<br>
server=/mnt/ALLSTUDENTS<br>
index=$server/index.students<br>
<br>
# Make sure username is all lower case<br>
user=`echo $USER | tr A-Z a-z`<br>
<br>
# Zdrive does not exist, go figure it out<br>
if [ ! -e $zd ]<br>
then<br>
<br>
 &nbsp; &nbsp;# Search file server for this user&#39;s directory<br>
 &nbsp; &nbsp;if grep &quot;/$user&quot;&#39;$&#39; $index &gt; /tmp/us$$<br>
 &nbsp; &nbsp;then<br>
 &nbsp; &nbsp; &nbsp; &nbsp;store=$server/`cat /tmp/us$$`<br>
 &nbsp; &nbsp;else<br>
 &nbsp; &nbsp; &nbsp; &nbsp;# N.B., must fix for y3k compatibility<br>
 &nbsp; &nbsp; &nbsp; &nbsp;store=$server/2*/$user<br>
 &nbsp; &nbsp;fi<br>
 &nbsp; &nbsp;rm -f /tmp/us$$<br>
<br>
 &nbsp; &nbsp;# Teachers, for instance, won&#39;t have storage on student fileserver<br>
 &nbsp; &nbsp;if [ -e $store ]<br>
 &nbsp; &nbsp;then<br>
 &nbsp; &nbsp; &nbsp; &nbsp;ln -s $store $zd<br>
 &nbsp; &nbsp;else<br>
 &nbsp; &nbsp; &nbsp; &nbsp;# No ZDrive available for this user, just quietly leave<br>
 &nbsp; &nbsp; &nbsp; &nbsp;exit 0<br>
 &nbsp; &nbsp;fi<br>
fi<br>
<br>
# If the user created files in the home directory, move them down<br>
# to the Desktop<br>
for src in &quot;$HOME&quot; &quot;$dt&quot;<br>
do<br>
 &nbsp; &nbsp;# Walk entries in this dir<br>
 &nbsp; &nbsp;cd $src<br>
 &nbsp; &nbsp;for x in *<br>
 &nbsp; &nbsp;do<br>
 &nbsp; &nbsp; &nbsp; &nbsp;# Only process *files* in this dir<br>
 &nbsp; &nbsp; &nbsp; &nbsp;if [ -f &quot;$x&quot; ]<br>
 &nbsp; &nbsp; &nbsp; &nbsp;then<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Calculate default destination<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dest=&quot;$zd/$x&quot;<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Oops, already there, concatenate an index number<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if [ -e &quot;$dest&quot; ]<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Start with &lt;foo&gt;_0, and count up until an opening is found<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;count=0<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dest2=&quot;$zd/$count&quot;&quot;_$x&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;while [ -e &quot;$dest2&quot; ]<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;do<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;count=`expr $count + 1`<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dest2=&quot;$zd/$count&quot;&quot;_$x&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;done<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cp &quot;$x&quot; &quot;$dest2&quot; &amp;&amp; rm -f &quot;$x&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cp &quot;$x&quot; &quot;$dest&quot; &amp;&amp; rm -f &quot;$x&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi<br>
 &nbsp; &nbsp; &nbsp; &nbsp;fi<br>
 &nbsp; &nbsp;done<br>
done<br>
<br>
<br>
exit 0<br>
<br>
<br>
<br>
On Thu, Aug 28, 2008 at 8:27 AM, Oliver Grawert &lt;<a href="mailto:ogra@ubuntu.com">ogra@ubuntu.com</a>&gt; wrote:<br>
&gt; hi,<br>
&gt; On Do, 2008-08-28 at 08:03 -0700, john wrote:<br>
&gt;&gt; Hi all,<br>
&gt;&gt;<br>
&gt;&gt; I was wondering where I can put scripts that I want to run when a user<br>
&gt;&gt; logs on to a thin client. I used to put them in /etc/profile but that<br>
&gt;&gt; doesn&#39;t seem to work under Hardy. It seems like LDM is somehow<br>
&gt;&gt; by-passing the stuff I put there. Can someone help me out?<br>
&gt; ldm is executing /etc/X11/Xsession by default ... (like gdm or kdm do)<br>
&gt; one option would be to put stuff into /etc/X11/Xsession.d, another is to<br>
&gt; use the xdg autostart mechanism in /etc/xdg/autostart<br>
&gt;<br>
&gt; ciao<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;oli<br>
&gt;<br>
&gt; --<br>
&gt; edubuntu-users mailing list<br>
&gt; <a href="mailto:edubuntu-users@lists.ubuntu.com">edubuntu-users@lists.ubuntu.com</a><br>
&gt; Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/edubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/edubuntu-users</a><br>
&gt;<br>
&gt;<br>
<font color="#888888"><br>
--<br>
edubuntu-users mailing list<br>
<a href="mailto:edubuntu-users@lists.ubuntu.com">edubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/edubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/edubuntu-users</a><br>
</font></blockquote></div><br></div>