Jump to content

Recommended Posts

Posted

I've wrestled this particular monster for a few weeks now and seeing as I've used sources from all over I thought I might be able to save someone else some time and trouble and post my 'how to'.

 

Before I get into it: It took me a while to work through a variety of different methods to accomplish my goal. My goal was to create a thin client that would be able to boot off pxe and load into a remote desktop session with our terminal server that would maintain connection after a user logged out. I didn't want multiple sign on's or a desktop that a user could view/manipulate or the ability to cancel out of the terminal session. So here's what I did:

 

1. Install Ubuntu 11.10 on Hyper-V host running Windows Server. I found a great walk-through for this at Narendra Patel's site. It covered everything I needed, including the bain of my existence when trying to proof of concept on another box, the network interface. Getting Ubuntu to correctly use apt-get to install and update through an NTLM proxy was always a pain. But after following those instructions it works a treat. i can install all the necessary software and just manually change the browser proxy settings if i needed.

2. Install a remote desktop client on the server. (honestly i was getting tired of standing at the terminal in my server room.) i used sudo apt-get install xrdp. the only thing i needed to do was change the keyboard shortcut keys. ('D' was set to minimize all windows. i set it to Alt + D and moved on.)

3. Install LTSP. Awesome step by step found here at Mojotechblog. My setup was actually easier as i didn't need to make any changes to eth0 after following Narendra's guide. Briefly, it was:

sudo apt-get install ltsp-server-standalone openssh-server

gedit /etc/ltsp/dhcpd.conf and corrected the settings to apply to my network.

ltsp-build-client –-arch i386

gedit /var/lib/tftpboot/ltsp/i386/lts.conf which created a conf file for my thin clients to use. I kept it fairly simple and added the following lines in:

 

[default]

RDP_OPTIONS = "-f -a 16"

RDP_SERVER = TS_IP_Address_goes_here

SCREEN_02 = rdesktop

 

I found without the rdp options -a and 16 i'd get nothing but a black screen and white cursor. had to add -f to full screen it otherwise i got a box about 800 x 600 in the top left for the terminal session.

4. finally i just wanted to make sure it was all up to date across the board so i ran:

sudo ltsp-update-image ltsp-update-sshkeys

5. and rebooted the server for good measure.

 

that's all it took to set up my ltsp server for thin clients to boot straight into a terminal server session. Just a few things I didn't have success with:

 

1. Windows Thin PC. I thought this might have been easiest to use due to already running a windows network environment and just installing this to older machines. The problem was that it's speed was still very dependent on the system's crappy internals to boot and couldn't quite get an rdp session to open like i desired. I had the help of another edugeek member (Thanks for all the help, FN-GM!) wherein we tried using vbscripts to open a default.rdp preconfigured with the settings i wanted but that never quite worked. We also tried using RDP+ but that was a whole other headache to run. (however it did work great if you could get the scripts to work properly) But again this didn't fulfill my main requirements for a thin client so i moved on.

2. Thinstation. Sounds great when i first heard of it. can boot off pxe or etherboot, only 10-15mb img file, can add rdesktop in to the build. but for the life of me couldn't get it running. some of it was my fault (i manually created a 'tftpboot' folder on my ubuntu test box and pointed my dhcp to that when i should have installed ltsp and found the real tftpboot folder under /var/lib/ not in /) but even after realizing my mistake it wouldn't boot pxelinux.0 without missing 'diag' folder. I still have never seen that folder. I'm making an educated guess that it is on the full install image but again it wouldn't install on any of my test machines to allow me to copy that folder. once i had ubuntu ltsp up and running i realize how much easier it would be to just work with that and there we had it.

  • Thanks 3
  • 2 months later...
Posted
Wanted to give an update/warning. Upgrading from 11.10 to 12.04 broke my thin client setup. Maybe I was just unfortunate but the package upgrades created an error with my dhcp3-server and had to completely kill it out. Went as far as having to manually delete the cache files before it was able to reinstall properly. then found the thin clients giving an error message that i'm attributing to missing modules. tried updating client image, didn't work, so i've completely reinstalled ltsp-server-standalone and its currently rebuilding my i386 image. Hope no one else has to go through this...
Posted
Thinstation. Sounds great when i first heard of it. can boot off pxe or etherboot, only 10-15mb img file, can add rdesktop in to the build. but for the life of me couldn't get it running.

 

Me neither. In the end we tried Slax and SystemRescueCD for PXE-booting clients. Instead of installing a dedicated Ubuntu LTSP server we used our existing FOG server and added the new boot options to the PXE boot menu on that, then assigned the MAC addresses of the thin clients to always boot with a particular image. If I was setting this up again now I think I'd aim for FreeRDP instead of RDesktop as that seemingly supports most of RDP 7.1 (except for client-side USB redirection, I think), so you should get better performance.

  • 3 weeks later...
Posted

oh man. what a rough few weeks. anyway, i've finally gotten time to sit down and smack this around a bit. took a little time to work out some bugs and had to jump on the ltsp irc for a chat but it is up and functioning now with freerdp.

 

For those that don't know, freerdp is now the default rdp client in ltsp. the first difference I noticed with freerdp is that it actually remembers the domain so that students no longer have to type domainname\studentuser to login to our Terminal server, just username now. but to save you fine people the pain of set up here is what i had to do:

 

on a fresh install of ubuntu 12.04, i installed the ltsp-standalone-server openssh-server as before.

removed isc-dhcp-server as it wasn't needed with our MS dhcp server doing the boot work.

had to make some adjustments to a few config files here they are:

 

sudo gedit /opt/ltsp/i386/usr/share/ltsp/xinitrc

add this line below . /usr/share/ltsp/ltsp-client-functions

export HOME=${HOME:-/root}

 

i did try to setup nat as i read one user was having the same issue and this corrected it for him when using a virtual machine like my setup.

 

install nat

 

sudo gedit /etc/sysctl.conf

uncommented the line net.ipv4.ip_forward=1

 

add entries to iptables

 

the key i believe though is of course the lts.conf file. with freerdp you have to tell it to ignore network level authentication and certificates otherwise it'll hang. also adding a few other options helped the look. here is my lts.conf for reference:

 

[DEFAULT]

SOUND = True

NBD_SWAP = True

SCREEN_04 = ldm

SCREEN_07 = xfreerdp

RDP_OPTIONS = "--no-nla --ignore-certificate -z --gdi sw -f 172.16.0.12"

SCREEN_08=xterm

 

the first two options relate to the authentication and cert. -z is for compression i believe and most importantly --gdi sw is for the graphics. without this option it looks horrible on our clients. -f is full screen and the ip is for our internal terminal server.

 

there we have it. it was rough going for me and frustrating at time so i hope this helps someone else out. thanks to alkis and variant over at ltsp for helping me out.

  • Thanks 2
Posted

Hi

 

I have been also looking at LTSP. How many client do you have running from on Ubuntu server? Does it work like your running a RDP session inside a linux terminal session or is there a client image downloaded to the client on boot?

 

Thanks

Posted

well, despite my issues I think it was fairly easy and straightforward to setup LTSP. Currently, I've got about 30 thin client machines around school, i'll be adding more to this number as i finish diags on some other machines. they are a mix of 7 year old Dell's and 5 year old Asus units. All can boot in about 15 seconds to a login screen. It looks exactly like if they were in front of the terminal servers display itself. No close connection bar at top, on logout it goes straight back to the login screen, etc. basically nothing for a student to cause any problems with (as long as you have the right GPO for students to use TS).

 

there is a small image downloaded to the client on boot which opens xfreerdp in screen 7, in my lts.conf you can see this. I have since removed ldm and xterm. those i used to troubleshoot a thin client connection and its running fine now so i just killed them out. (xterm allowed me to ping the servers and check IP and ldm gave me a desktop to work with if i wanted. you can swap between screens on a thin client by holding ctrl + alt + function key number correlating to the screen number.)

  • Thanks 1
Posted (edited)

Is the processing done the the client or the ubuntu server please? (ignore the session for now :) )

 

What happens if the users presses CTRL + ALT + DEL does it work like it does on a desktop?

 

Also are you using it with RDS Broker? What OS is the RDS servers running please?

 

Also can i name my ThinClients something Logical please?

Edited by FN-GM
Posted

on boot the ubuntu server handles the request for the pxelinux.0 file and then loads the image to the client. the image is loaded into memory on the thin client and the ubuntu server doesn't have much else to do with it at that point. (i've pulled all the HDD's from my thin clients just to reduce electricity usage, noise, and heat.) if you choose to try and use the LDM (display manager, something like a linux login screen that can load a *nix desktop. not sure which one, maybe Gnome) then the ubuntu server will be used to authenticate the user but thats about it.

 

Ctrl alt del is disabled when you are on the RDP screen. if you switch to xterm screen, ctrl alt del will reboot. (one reason to just have freerdp designated in your lts.conf file)

 

don't currently use rds broker just basic terminal sessions manager on server 2k8 r2.

 

as an aside, i'm currently working on installing SSO to the ubuntu server as well to get more function out of it. :)

  • Thanks 1
Posted

Did you use Ubuntu Desktop of the Server edition to get this going please?

 

You should use broker. If i machine is powered off when the users logs back on broker will find the existing session and connect it up. One of the reason i am looking at this is we have a pile of Thin Clients that dont support broker so it would be handy.

 

Do you know how you can get CTRL + ALT + DEL working please?

 

as an aside, i'm currently working on installing SSO to the ubuntu server as well to get more function out of it

 

ooo what will that do please?

Posted

using the x64 ubuntu server edition 12.04 now.

 

I'll take a look in to broker now that i'm aware of it.

 

Are you wanting to use ctrl alt del to pull up lock, switch user, task manager, change password? once the user is logged in then they have those options using ctrl alt del (based on policy of course). i thought you were just curious about if it would reboot the client haha. my students only have access to log off when hitting ctrl alt del so that is the only option they see.

 

SSO - single sign on that would allow a student/user to login to their school account and then it would automatically log them in to their google apps accounts and moodle account. the end user would only see one login screen (windows 7 login) and would be able to access all their data (emails, google drive, google docs, moodle assignments, etc.) some vendors have offered this to us but its a monthly or annual fee based on number of users. i thought, we could do this for nothing. I'm working on shibboleth identity provider with apache tomcat 7 to do this on our ubuntu machine. still unforeseen if it will work or not lol.

Posted

We use change password as well for students and staff have task manager so thats what i was wondering.

 

What happens when you boot the machines and leave the session not logged on? Does something happen? Does it disconnect?

 

Do you name your ThinClients please?

 

Oh right, we are pretty much set on SSO so wont be needing that :)

 

Thanks

Posted

in the previous version of ltsp with rdesktop as the rdp client it would go in to standby. i'm discovering with the new ltsp using xfreerdp that the client machine appears to shut the connection completely after some time without any activity. i've only had this new setup running for less than a week so haven't got any hard numbers yet. I think it would be best to close it completely so it doesn't keep the performance high on the TS and frees up a CAL for another user. but it seems upon wake it doesn't re-establish the connection as previous version did. the machine has to be rebooted to do this. there might be a fix but haven't gotten to it yet.

 

thin clients on the ts are named in order of connection such as #ltsp0001 , #ltsp0002, yada yada. i haven't bother naming them. using the lts.conf though i can specify different options using MAC addresses for different machines. for example, i might throw a few thin clients in to our staff break room and could add an xterm screen to those if i wanted quick access while having my lunch. (cause when do we ever get breaks, right?) :)

  • Thanks 1
Posted

ooo not good our machines are locked away so that would be a big no no.

 

I will bring my test laptop to work tomorrow and give this a bash. I hope it works well :)

 

Thanks for taking part in my grilling! :)

Posted (edited)

Right, i followed the guide got it working with the default options (not RDP setup etc). I could PXE boot no issues and got to an Ubuntu login screen.

 

I then did this:

 

gedit /var/lib/tftpboot/ltsp/i386/lts.conf which created a conf file for my thin clients to use. I kept it fairly simple and added the following lines in:

 

[default]

RDP_OPTIONS = "-f -a 16"

RDP_SERVER = TS_IP_Address_goes_here

SCREEN_02 = rdesktop

 

Then ran this: sudo ltsp-update-image ltsp-update-sshkeys

 

and rebooted. Now when booting it gets stuck on the Ubunut boot screen

 

I decided to sue Ubuntu Desktop not server edition. Any thoughts please?

Edited by FN-GM
Posted (edited)

Fixed it. I need to read more :)

 

I am using these options but when i boots i just get a black screen with the cursor. Any ideas please?

 

[DEFAULT]

SOUND = True

NBD_SWAP = True

SCREEN_04 = ldm

SCREEN_07 = xfreerdp

RDP_OPTIONS = "--no-nla --ignore-certificate -z --gdi sw -f 172.16.0.12"

SCREEN_08=xterm

 

I havent done this though:

 

sudo gedit /opt/ltsp/i386/usr/share/ltsp/xinitrc

add this line below . /usr/share/ltsp/ltsp-client-functions

export HOME=${HOME:-/root}

 

Plase can you clarify this. What is it we add to the file? Both . /usr/share/ltsp/ltsp-client-functions & export HOME=${HOME:-/root} ?

 

Also i didnt do the NAT stuff do i need to do this please?

 

Thanks

Edited by FN-GM
Posted

I have done this now, Pretty obvious really when i read it again but i still have the issue. I also ran sudo ltsp-update-image and still get it.

 

Thanks

 

sudo gedit /opt/ltsp/i386/usr/share/ltsp/xinitrc

add this line below . /usr/share/ltsp/ltsp-client-functions

export HOME=${HOME:-/root}

Posted

sorry if my instructions weren't all too clear. tried to get them all written out before my mind totally shut off after looking at the terminal for days. :)

 

the ol' "white cursor on black background" bug. That is the most common issue i've dealt with using ltsp and it has to do with lts.conf settings i believe. To check a few things though we should ctrl + alt + f8 into xterm so we can see if you have a valid IP and can ping the terminal server. (if not familiar with linux, ifconfig will pull up your ip info) So are you using a virtual machine as well? and did you change the IP to your terminal server? (you should be able to use FQDN as well if you like)

 

you could remove splash and see more details on boot if you modify the default file here /var/lib/tftpboot/ltsp/i386/pxelinux.cfg/default just delete quiet and splash, i believe. these will come back when you update image so don't worry about having to go back later to put them in.

 

the reason we added "export HOME=${HOME:-/root}" to the xinitrc file was, according to the nice people at LTSP, without a default HOME location the client could cause the issue we are seeing. This should be added in newer versions so this will be unnecessary in the future.

Posted (edited)
When you say terminal server do you mean the Ubuntu LTSP or my Windows one please? The LTSP server is Virtual. Edited by FN-GM
Posted
the server that you want students to log in to. in my case ubuntu is just used to load the remote desktop client to connect to our Windows terminal server. so they are actually logging in to windows not ubuntu.
Posted (edited)
the server that you want students to log in to. in my case ubuntu is just used to load the remote desktop client to connect to our Windows terminal server. so they are actually logging in to windows not ubuntu.

 

Same with me.

 

I did change the IP to my terminal server in the config file.

 

I am unable to troubleshoot this until the morning. I am not infront of the machines. By that time you will be asleep probably. Is there anything else you can suggest to try and keep me going a little longer please?

 

EDIT: Just remembered i could ping the ThinClient from my machine when it was booted.

Edited by FN-GM
Posted

sounds like you've got the thin client going then. congrats! you just need to setup the xfreerdp session properly. I would recommend testing the settings in RDP_OPTIONS. first thing i would do is remove it completely and see what the results are on the thin client machine. you can specify the windows server in a separate line if you like (RDP_SERVER = IP_OR_FQDN_OF_SERVER) one simple thing is not to forget the quotes around the RDP_OPTIONS line, otherwise you'll get a syntax error but it won't tell you. also in comparison to my original setup where i had rdesktop use screen 2, the new version or xfreerdp did not like that screen at all. using screen 7 or 8 worked for me. (i'm assuming some screens might be reserved in this version but haven't seen the documentation to say yay or nay.)

 

but yes, sounds like it is only a matter of figuring the lts.conf file settings for freerdp for your setup. (did you say if you were running virtual ubuntu ltsp server?) the basic settings you need for xfreerdp are --no-nla and --ignore-certificates to at least get you to the rdp session. -gdi is a graphics setting and -f is full screen. you can find the entire list of options for lts.conf here but it looks a little outdated as it references rdesktop. i'm sure i've got more tips but that is all i can think of right now.

  • Thanks 1
Posted (edited)

also this might help with your question about changing the splash screen during boot. You can install an app called plymouth manager that should allow you to customize the theme for splash using a .png file under 500kb for your logo or you can change it to text if you like. there are even some default themes that you might like (such as ones that emulate win7 or osX lol).

 

to get plymouth try from terminal using:

sudo apt-get install plymouth-manager

or

wget https://launchpad.net/plymouth-manager/trunk/stable/+download/plymouth-manager_1.5.0-1_all.deb

sudo dpkg -i plymouth-manager_1.5.0-1_all.deb

 

might be missing some dependencies if you are like me so had to run this afterwards:

sudo apt-get -f install

 

that will fetch missing dependencies. You can then run plymouth from the 'start' menu for a gui or you can use it in terminal if you are brave.

 

also i can't seem to replicate the issue where it drops the connection to the terminal server after going to standby on the machine i'm testing today. so maybe it was a first week kind of deal and sorted itself?

Edited by atamakosi
  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...