<div><span style>Hi all,</span></div><span style><div><span style><br></span></div>A cursory reading of the online lit I found relating to x2gothinclient seems to require that the stations all pxeboot... </span><div style>
<br></div><div style>I don't want thinclients that pxeboot.. what I need is a minimal OS that is setup to autologin to X and then pyhoca-cli to the x2go-server... can the x2gothinclient packages do this say on a minimal debian install for the thinclient.. ?</div>
<div style><br></div><div style>Since I did not see this capability, I already built from scratch a minimal Debian 6 that does an autologin into X using gdm/matchbox wm, and then created a script that force loops a username/pw graphical dialog using yad (zenity fork)... suffice it to say this works well... but I'm thinking if x2gothinclient already had the capability to do this then I did it all for nought.. except it was definitely a good exercise...</div>
<div style><br></div><div style>The steps and scripts that I did do make this pxe-less x2g0 thin-client/kiosk follow ... I'm sure this can be quite improved... actually the main thing I'd like to improve is to have the matchbox wm/X on the local thin client be aware when there is no activity in the x2go session, and if no activity, then kill or suspend the pyhoca-cli session, thus going back to the yad login prompt, but I haven't found a way to do this (normal logout of the x2go session of course works fine and brings you back to the yad login prompt)... I think the problem is that matchbox wm/X always thinks there is activity when the x2go session is logged in/active, even when there is no activity in the x2go session itself...</div>
<div style><br></div><div style>Any thoughts on any of the above would be appreciated! </div><div style><br></div><div style>Steps/scripts etc for x2g0 thin-client/kiosk:</div><div style><br></div><div style>OK so I pretty much used the guide from:</div>
<div style><a href="http://www.alandmoore.com/blog/2011/11/05/creating-a-kiosk-with-linux-and-x11-2011-edition/">http://www.alandmoore.com/blog/2011/11/05/creating-a-kiosk-with-linux-and-x11-2011-edition/</a></div><div style>
<br></div><div style>and went from there...</div><div style><br></div><div style>After initial Debian squeeze install with only ssh server:</div><div style><br></div><div style>Add x2go sources and install pyhoca-cli</div>
<div style>apt-get install xorg</div><div style><span style="font-size:small">apt-get install gdm --no-install-recommends</span></div><div style><span style="font-size:small">apt-get install xautolock feh</span></div><div style>
<div><font color="#222222" face="arial, sans-serif">wget <a href="http://archive.ualinux.com/ubuntu/main/lucid/yad_0.15.0-1~webupd8~lucid_i386.deb">http://archive.ualinux.com/ubuntu/main/lucid/yad_0.15.0-1~webupd8~lucid_i386.deb</a></font></div>
<div><font color="#222222" face="arial, sans-serif">dpkg -i yad_0.15.0-1~webupd8~lucid_i386.deb </font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small">(the above is an ubuntu lucid yad deb package but it worked so I didn't ask any further questions :) ... there might be a better yad package for squeeze but I could not find one)</div>
</div><div style><span style="font-size:small">adduser kiosk (or whatever)</span></div><div style><span style="font-size:small">cp -r /home/kiosk /opt/;</span></div><div style><div style="color:rgb(0,0,0);font-family:arial;font-size:small">
<font color="#222222" face="arial, sans-serif">cd /opt/kiosk/;</font></div><div style="color:rgb(0,0,0);font-family:arial;font-size:small"><font color="#222222" face="arial, sans-serif">chmod -R a+r .;</font></div><div style="color:rgb(0,0,0);font-family:arial;font-size:small">
<font color="#222222" face="arial, sans-serif">touch .xprofile</font></div><div style="color:rgb(0,0,0);font-family:arial;font-size:small"><font color="#222222" face="arial, sans-serif">chmod a+x .xprofile</font></div><div style="color:rgb(0,0,0);font-family:arial;font-size:small">
<font color="#222222" face="arial, sans-serif"><br></font></div><div style="color:rgb(0,0,0);font-family:arial;font-size:small"><font color="#222222" face="arial, sans-serif">my .xprofile:</font></div><div style="color:rgb(0,0,0);font-family:arial;font-size:small">
<font color="#222222" face="arial, sans-serif"><br></font></div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">root@lxtrms-thinclient-colodesk:~# cat /home/sagotech/.xprofile </div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">
xset s off</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">xset -dpms</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">matchbox-window-manager &</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">
eval `cat /home/sagotech/.fehbg` &</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">xautolock -secure -time 10 -locker /usr/local/bin/suspend_pyhoca-cli.sh &</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">
while true; do</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif"> rsync -qr --delete --exclude='.Xauthority' /opt/sagotech/ $HOME/</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">
exec /home/sagotech/start_pyhoca.sh</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif">done</div><div style="color:rgb(0,0,0);font-family:arial;font-size:small"><br></div><div style="color:rgb(0,0,0);font-family:arial;font-size:small">
suffice it to say xautolock does not detect non-activity in an x2go session so the suspend_pyhoca-cli.sh never ran:</div><div style="color:rgb(0,0,0);font-family:arial;font-size:small"><br></div><div><div>root@lxtrms-thinclient-colodesk:~# cat /usr/local/bin/suspend_pyhoca-cli.sh </div>
<div>#!/bin/bash</div><div>pyhoca-cli -S</div><div style="color:rgb(0,0,0);font-family:arial;font-size:small"><br></div></div><div style="color:rgb(0,0,0);font-family:arial;font-size:small">(for background behind the yad login prompt):</div>
<div><div>root@lxtrms-thinclient-colodesk:~# cat /home/sagotech/.fehbg </div><div>feh --bg-scale '/usr/share/wallpaper/custom-bk-2.jpg'</div><div style="color:rgb(0,0,0);font-family:arial;font-size:small"><br></div>
</div></div><div style="color:rgb(0,0,0);font-family:arial;font-size:small">The script that brings up the yad login prompt loop called from .xprofile follows... so we have this loop inside the loop of the .xprofile script... not sure if this necessary or a good thing etc.</div>
<div style="color:rgb(0,0,0);font-family:arial;font-size:small"><br></div><div><font color="#222222" face="arial, sans-serif"><div><div>root@lxtrms-thinclient-colodesk:~# cat /home/sagotech/start_pyhoca.sh </div><div>#!/bin/bash</div>
<div>while true; do</div><div>frmdata=$(yad --center --undecorated --image=/usr/share/wallpaper/sago-header-mod.jpg --image-on-top --button="gtk-ok:0" --title "Login to Sago Linux Terminal Server" --form --field="AD username" --field="Password:H")</div>
<div>frmusername=$(echo $frmdata | awk 'BEGIN {FS="|" } { print $1 }')</div><div>frmpassword=$(echo $frmdata | awk 'BEGIN {FS="|" } { print $2 }')</div><div>pyhoca-cli --server X.X.X.X -u $frmusername --password $frmpassword -c startkde --sound none --kbd-layout us --kbd-type pc105/us -g fullscreen --add-to-known-hosts</div>
<div>done</div></div><div><br></div><div>The above basically gives you a login prompt and forces you to enter a login AND password and the password is hidden when you type it it puts a nice header image at the top of the prompt.. it only gives an OK button (no cancel)... then passes off the username/pw to pyhoca-cli</div>
<div><br></div><div>So yeah I would like to improve this so that inactive x2go sessions get suspended and go back to the yad login prompt... perhaps there is a pyhoca-cli switch that does this that I'm not aware of... But even without that feature this works real nice as a non-pxe x2go thin-client station.</div>
<div><br></div><div>Anyway this is all probably very messy and amateurish, but I am not exactly a programmer or very proficient bash scripter so.. :) Also I might be missing a few steps and if any of the above does not make sense please advise and I'll try to see if I missed something in the steps given above...</div>
</font></div></div><div style><br></div><div><span style>Any thoughts on any of the above would be appreciated!</span><span style> </span></div><div><span style><br></span></div>-- <br><b><font color="#888888">"It is only when each individual has achieved inner peace that we will see lasting outer peace in the world" <br>
</font></b><br>