Setting up a Windows/Linux Hybrid "Thin" Client

AddThis Social Bookmark Button

The Honey Grove I.S.D. Has been using thin-client computers (primarily old, ready-for-the-scrap-heap desktop systems that have been repurposed as thin clients) throughout our district for a few years now, and we've pretty well run the gamut of pitfalls and pinnacles. After using K12LTSP for a few years in various lab, classroom and library situations we found that there are just too many times when we still need a Windows environment to use the Linux platform exclusively. So, we set out to explore the world of Windows thin-client computing only to discover that there really is no such thing as a Windows thin client.


The Microsoft Remote Desktop application can be used in conjunction with a server running Microsoft Terminal Services to bring a remote Windows desktop to a local client, but the process is far from thin. Remote Desktop needs an operating system under it. It only serves as a hook into the pre-existing sound, video, and other device drivers on the local client and is not a stand-alone operating system pulled over the network as is the Linux Terminal Service Project system. So, the problem exists of what operating system to put on the machines that one wishes to use as “thin” clients.

There are a number of vendors such as Citrix that offer customized “thin-client” systems for a fee, but they are all essentially pared down operating systems running Remote Desktop on top of them. They're lean, but not truly thin. We could have bought sleek, new systems specially designed for use as thin clients, but for us the whole point of using thin clients was to expand the number of multimedia desktop systems available without stressing our already paper-thin budget. Spending $400 on a specialized piece of hardware just didn't make sense for us.

We could have loaded an outdated, licensed copy of Windows 98 on each of our aging hardware platforms and used Remote Desktop to access the server. This would have given the look, feel, and performance of a modern, high-speed workstation while still using our old hardware to do it. While that may seem like an enticing proposition at first blush, it loses a bit of luster when you realize that most of these computers originally ran Windows 98 and were only decommissioned because they became too unstable to be used on a daily basis. In order to make this option viable I would have had to get the machine up to Windows 98 standards, load the operating system, patch it, maintain it, provide virus protection for it, and more. I would do all of this only to run one application on it- Remote Desktop.

Thinking there had to be a better solution I began to seek out some sort of hybrid Windows/Linux solution that would allow me to use older, not-entirely-healthy hardware, and still connect to our Windows Server 2003 machine running Terminal Services to provide a sleek, fast, modern computing platform. The underlying operating system would need to have enough muscle to provide multimedia audio and real-time video capabilities while being small enough and robust enough to be virtually maintenance-free. Local CD-ROM and floppy drive access were a bonus, but not mission-critical.

Enter Puppy Linux. In Puppy I found a small, light-weight, fast, dependable operating system that would run well on older machines with limited resources that would connect the user seamlessly to the Window desktop provided by the server. Using Rdesktop, the Linux-based copy of the Windows Remote Desktop application that was already built in to Puppy, I was able to provide full-screen video, multimedia sound, and limited local CD-ROM drive support- all in a package that is highly stable and easy to deploy.

I've distilled months of experimentation down to one ISO file and less than one page of instructions in the hope that some of you reading this might benefit from my efforts. Below you'll find a step-by-step guide to building your own Puppy-based hybrid Microsoft Terminal Services client. (Note: The client will need a minimum of 128MB RAM to function efficiently, and since we'll be doing the installation from a CD, you'll need a functioning CD-ROM drive and the ability to boot from it.)

The first thing you'll need to do is download the PuppyThin.iso file and use your burning software of choice to burn it to a CD. Take your new installation CD to your aging PC of choice, pop it into the drive, make sure the BIOS is set to boot from the CD and reboot. The first thing you'll be asked is “Would you like to partition the hard drive?”

This setup installs Puppy Linux to a collection of compressed files on a FAT32 partition. I experimented with a number of partition choices such as installing Puppy to a Linux partition and using Grub or Lilo to boot it, but the plain old, dumb, FAT32 option has proven to be the most robust. Choose “Yes” here if you want to completely erase the existing data on the hard drive and set it up as a dedicated Windows client. Most of you will want to do this. If the disk you're using already has a FAT32 partition on it, you can choose “No.” After you choose “Yes” the installation program will erase the existing partition information on the hard drive and create a new one. Next you'll be asked to press “R” to reboot the computer so that the new partition information can be used.

After the reboot you'll be brought back to the same “Would you like to partition the hard drive?” prompt as before. Since you just did that, choose “No” to begin installing the Puppy Linux files. Press “N” and you'll see the files being copied onto the hard drive, and if all goes well you'll see a message telling you that the Puppy files have been successfully installed and that you should remove the CD reboot your computer.

When you reboot the computer, the first thing you'll be asked to do is choose your keyboard layout. If you're in the US use the standard qwerty keyboard layout, you'll choose US qwerty. Next Puppy will try to maximize the performance of your video hardware. When presented with the “Puppy Video Wizard” screen, choose “Xorg” to allow the software to probe your system's hardware. This could take a couple of minutes, but eventually you should see a listing of all the video modes your computer is capable of running with the best option already selected. Simply press [ENTER] at this screen, and you'll be asked if you want to test the settings chosen by the Wizard. Press [ENTER] twice more to begin the test. After a few seconds you should see a graphical background with a text box in the center of the screen sporting an “okay” button. Click that button with the mouse to confirm to the Wizard that all is well. If everything looks good, press [ENTER] on the next two screens to load the Puppy desktop. If something does go awry in the Xorg video setup process, simply restart the machine and choose “XVESA” the next time around. XVESA works well with most hardware and will still provide you with a solid graphical interface, but may be more prone to “screen flicker” than the Xorg drivers.

That's the whole Puppy installation process! You now have before you a complete Linux installation with Web browser, email client, word processor and more, consuming approximately 80MB of drive space. Cool, huh? Once you're in the Puppy desktop environment there are only a couple of text files to be altered and one setup wizard to run to turn this machine into a dedicated Windows client. The first thing you'll need to do is activate the network card on the machine, since Puppy detects network cards during the initial setup but doesn't enable them.

Click the “Menu” button in the bottom left corner of the screen and choose “Setup” then “Network Wizard.” You will most likely see that the lower pane of the windows says that “Puppy sees 1 active ethernet interface...” and there will be a button beside it, most likely labeled “eth0.” If you don't see this, it doesn't mean that your network card isn't compatible with Puppy, but that it simply wasn't detected initially. You'll have to use the “Load driver” button and play around until you find a driver that works. Once you do see the “eth0” button, click it to launch the configuration menu. Most of us use DHCP to automatically assign IP addresses to computers on our network, so simply clicking “Auto DHCP” should do the trick. If you manually assign IP addresses at your school click “Static IP” and set the needed information there. Whichever you choose you'll be asked if you want to “save this configuration,” and you should click “Yes.” This will tell Puppy to use this information every time you boot it. Now simply close the Network Setup window by clicking “Exit.”

From here there are only two text files left to edit. Click “Menu” then “Word Processing” then “Geany Text Editor” to launch a Noetpad-like text editor. Click “Open” and then select the “Show hidden files” option. Now scroll down to find “.xinitrc” and double-click it. Scroll down in the file toward the bottom and insert the following lines before the line beginning “which $CURRENTWM” (Note: These commands are case-sensitive. Use caps where indicated and lower-case where indicated)

 

rm -f /etc/.XLOADED

mount -r /dev/cdrom /mnt/cdrom

/usr/bin/rdesktop -a 16 -u "" -f -d DOMAIN -r sound -r disk:D=/mnt/cdrom SEVERIP

/usr/X11R7/bin/wmpoweroff

 

The lines above do the following things:

rm -f /etc/.XLOADED” - This line removes a file created when the graphical user interface starts up. Under normal circumstances the file is removed during a the shutdown process to signify that the system shut down cleanly. However, in the case of an unexpected power failure the file doesn't get deleted and can cause problems on reboot. We'll delete it here, on start-up, to avoid any future problems.

 

mount -r /dev/cdrom /mnt/cdrom” - This “mounts” the CD-ROM in the drive so that Windows can read it later. This is a hack to allow the Windows environment to read the CD, but it only mostly works. The CD Drive will be locked from the time this command runs until the time the machine is shut down, which means that if you want to be able to read a CD on the client it has to be in the drive when it the machine boots, and can't be removed until the computer is shut down. Puppy doesn't yet have any sort of “Automount” that can detect when a drive has been inserted or removed.

 

/usr/bin/rdesktop -a 16 -u "" -f -d DOMAIN -r sound -r disk:D=/mnt/cdrom SEVERIP - This is the heart of the whole Windows client process. This line loads Rdesktop and calls to the Windows server for it's video and audio input. The switches perform the following functions.

-a - sets the video color depth, in this case 16 bits or 65,536 colors

-u - sets the user name for Windows, by using “” we tell the system to leave that box blank.

-f - sets the screen size to “full”

-d DOMAN - sets the windows domain in the logon box, change this to your schools domain name.

-r sound - tells Rdesktop to redirect sound from the server to the client

-r disk:D=/mnt/cdrom - tells Rdesktop to use the client's CD-ROM as “D on Puppy” in the Windows environment, the contents of the client CD-ROM will appear under “My Computer” on the Windows desktop

SERVERIP – this is the IP address of the Windows Terminal server, change is as needed (ex. 10.0.0.10)

 

/usr/X11R7/bin/wmpoweroff - this line shuts the computer down after the Windows session ends. This keeps the students out of the Linux environment altogether and serves as a nice power-saving feature as well.

 

Once these line have been added, to the “.xinitrc” file, click save. Next, click “Open” again and then choose “File System” then “etc” then “rc.d” then “rc.local” and add the following line to the file.

 

modprobe apm

 

This will tell Puppy to search for “Advanced Power Management” hardware on the computer so that the shutdown command will work as expected. This should work with older APM machines as well as newer ACPI machine. Some older computers, however, simply have no power management available. These computers won't shut down but will “park” themselves until the user reboots or shuts off the power. Click “Save” and close the text editor. You're almost done.

Now click “Menu” “Shut down” “Reboot computer.” After the graphical interface closes you'll be asked if you want to save your session. This step is what cements all of the things you've just done, so you definitely want to select “SAVE.” Next you'll be asked how much space you want to set aside for your Puppy installation- I usually go with 512 MB. Highlight your choice, hit [ENTER] and you'll be presented with the “Final Sanity Check.” Just hit [ENTER] again, and after a minute or so the machine should reboot directly to your multimedia-enabled Windows environment complete with quasi-local CD-ROM support.

This process works really well for my district across a range of hardware and has been relatively bullet-proof so far. Hopefully you'll find the same to be true for you. If you want more details about how I mastered the Puppy installation CD and how to “roll your own,” don't hesitate to ask .

Statistics

Members : 9
Content : 458
Web Links : 197
Content View Hits : 567945

Who's Online

We have 8 guests online

SOS Moodle