Jump to content

Recommended Posts

Posted

After playing with various systems (trying to force freerdp onto the ThinPro install, trying to use Windows FLP, getting angry and mashing keyboards etc...), I decided to create my own install to do exactly what I want instead.

 

This supports NLA, Session Broker (Connection Broker or whatever it is called) and anything else that FreeRDP works with. It contains a custom login screen, to allow details to be entered before connecting to the RDS farm).

 

I used the current stable Debian release - which I believe is "Squeeze".

 

1. Download the network install CD image (i386, ‘Small CD’).

2. Either create a bootable USB memory stick to install it, or burn to CD

3. Boot your thin client from your installation media

4. Install as a normal Debian install

5. When prompted what options to install, choose only SSH Server. You should be prompted to enter a proxy – enter an http proxy if you have one, with the port also.

6. Once it has finished and rebooted (remember to remove the installation media), you should now have a console to log in to. Log in as root.

7. Enter the following 2 commands (it deletes manpages, to free up space):

rm -rf /usr/share/man/??
rm -rf /usr/share/man/??_*

8. Enter the following command (it deletes all the copyright notices, to free up space):

rm /usr/share/doc/*/copyright*

9. If your network does not and will not use IPv6, run the following command to free up space:

rm /lib/xtables/libip6t_*

10. Run the following command (remove some unneeded files, more space freeing):

apt-get remove debian-faq manpages ispell aspell iamerican ibritish aspell-en laptop-detect

11. Now to install things. Run the following command:

apt-get install fluxbox

12. You won’t actually use fluxbox, but it is one of the smallest DM’s that fulfil a dependency for the following package. Once that is installed, run:

apt-get install gdm

13. We should do some cleanup, to ensure there’s enough space to continue. Run the following command:

rm /var/cache/apt/archives/*.deb

14. Now you can install a bunch of packages at once:

apt-get install linux-sound-base alsa-base alsa-utils wx2.8-i18n python wxgtk2.8 python-wxtools xfreerdp libfreerdp-plugins-standard

15. Now that you’ve got all the packages needed, you should give the machine a reboot. This will present gdm to you.

16. Either using SSH or by pressing Ctrl+Alt+F2, bring up a console.

17. Log in as root.

18. Run the same command as in line 13:

rm /var/cache/apt/archives/*.deb

19. Now, enter “alsamixer”

20. It should bring up a mixer interface. You want to use the arrow keys on all of them, except “Mic Boost”. The up key will increase the volume for the channel that is selected (it will be highlighted in red at the bottom). If the little box at the bottom of the bar contains “MM” press the “M” key on the keyboard. This will unmute the channel. You can move to different channels using the left and right keys. You may not wish for “Beep” to be on full; a suite full of thin clients turning on at once all beeping loudly might be annoying!

21. We now need to set up the python script to act as the login screen. The following is a basic login form, that wraps around freerdp to pass the login details. Edit and use as appropriate. It is also attached, should the formatting not be right on the post.

import wx
import wx.xrc
import sys
import os

class BonsaiThinConnectForm ( wx.Frame ):
  m_textCtrl1 = None
  m_textCtrl2 = None
  def __init__( self, parent ):
        wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"Login to RDP", pos = wx.DefaultPosition,
                                 size = wx.Size( 180,170 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )
       
        self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
        panel = wx.Panel(self)
        bSizer1 = wx.BoxSizer( wx.VERTICAL )
       
        self.m_staticText1 = wx.StaticText( panel, wx.ID_ANY, u"Username", wx.DefaultPosition, wx.DefaultSize, 0 )
        self.m_staticText1.Wrap( -1 )
        bSizer1.Add( self.m_staticText1, 0, wx.ALL, 5 )
        global m_textCtrl1
        m_textCtrl1 = wx.TextCtrl( panel, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size(150,-1), 0 )
        m_textCtrl1.SetFocus()
        bSizer1.Add( m_textCtrl1, 0, wx.ALL, 5 )
       
        self.m_staticText2 = wx.StaticText( panel, wx.ID_ANY, u"Password", wx.DefaultPosition, wx.Size(150,-1), 0 )
        self.m_staticText2.Wrap( -1 )
        bSizer1.Add( self.m_staticText2, 0, wx.ALL, 5 )
        global m_textCtrl2
        m_textCtrl2 = wx.TextCtrl( panel, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size(150,-1), wx.TE_PASSWORD )
        bSizer1.Add( m_textCtrl2, 0, wx.ALL, 5 )
       
        self.m_button1 = wx.Button( panel, wx.ID_ANY, u"Login", wx.DefaultPosition, wx.DefaultSize, 0 )
        self.m_button1.SetDefault()
        bSizer1.Add( self.m_button1, 0, wx.ALL, 5 )
       
        panel.SetSizer( bSizer1 )
        self.Layout()
       
        self.Centre( wx.BOTH )
       
        # Connect Events
        self.m_button1.Bind( wx.EVT_BUTTON, self.OnLogin )
        self.Show()
  def __del__( self ):
        pass
 
  # Virtual event handlers, overide them in your derived class
  def OnLogin( self, event ):
        if m_textCtrl1.Value:
              if m_textCtrl2.Value:
                    os.system("xfreerdp -u " + m_textCtrl1.Value + " -p " + m_textCtrl2.Value + " -d DOMAIN -f --plugin rdpsnd RDSFARMADDRESS:3389")
                    sys.exit()

app = wx.App(False)
frame = BonsaiThinConnectForm(None)
app.MainLoop()

22. Save the python above into a file and store it in /usr/bin

23. Now we need to create the custom xsession to run that as the desktop environment. Create a new file in /usr/share/xsessions/ called custom.desktop, and in that file place the following text:

[Desktop Entry]
Name=Custom
Comment=Custom Session to run ~./.xsession
Exec=/home//.xsession
X-Ubuntu-Gettext-Domain=

 

24. Save the above and now it is time to make the script itself. Create a new file in the home directory of the user account you set up during installation (I used ‘user’, so this would be /home/user) called .xsession. In that file, enter the following:

#! /bin/bash
python /usr/bin/pythonfilecreatedearlier.py
logout

25. Save the above file, now we need to give it some execution rights. Use the following command to edit permissions:

chmod a+x /home/user/.xsession

26. Now, on the GDM login screen, click the Actions button and select Configuration Manager from the menu. Enter the root password when prompted.

27. On the Security tab, tick the “Enable Automatic Login” box, and choose the user account that we’ve been working with.

28. Now tick the ‘Enable Timed Login’ box and select the same user account.

29. Change the Pause before login to 10 seconds (if you want it to be even less, see the notes at the end).

30. If you wish to change the GDM theme, under the Local tab, make any changes you need to (I chose a less ‘Debian’ branded one).

31. On the “General” tab, select “Custom” from the “Default session:” menu.

32. Once you’re happy with the look and feel, click “Close”.

33. Back on a console, we now want to edit the grub menu, so it doesn’t display the different options (as the machine would simply be reimaged if it breaks). Edit the file /etc/default/grub, changing the option “GRUB_TIMEOUT” to equal 0.

34. You should be done now. All aspects of the system are in place. You can now reboot and test.

 

If you want to lower the gdm autologin time, you need to edit /etc/gdm/gdm.conf. Change the line which starts with “TimedLoginDelay” to equal the time you want in seconds.

BonsaiThinConnect.zip

Posted

If you want to have VNC running also, you need to follow the following instructions:

 

1. On a console, run the following command:

 

apt-get install x11vnc

 

2. Now you need to store a file with the password for vnc to use.

 

x11vnc –storepasswd ‘PASSWORDHERE’ /home/useraccount/.x11vncpasswd

 

3. And finally, you want to edit the .xsession file you created in the original setup in step 25 to launch x11vnc.

From:

#! /bin/bash
python /usr/bin/pythonfilecreatedearlier.py
logout

 

To

#! /bin/bash
X11vnc –rfbauth ~/.x11vncpasswd –more &
python /usr/bin/pythonfilecreatedearlier.py
logout

 

4. You now have the VNC Server in place, so you should be able to give the machine a quick reboot and be able to connect to it by VNC.

Posted
Also, you should be able to edit the above instructions for other machines also. I have also got it running on a Samsung 920XT thin client also, by install xserver-xorg-video-sis.
  • 2 months later...
Posted

Just gone through this for the Samsung TS-190. A few issues to deal with. As the device has a HDMI port, it has HDMI sound, which Debian defaults to.

 

To change it to use the right sound card, you need to use nano to create a file /etc/asound.conf

 

In this file, put in

 

pcm.!default {  type plug
 slave {
   pcm "hw:1,0" #delete the first hash for sound over analog
   rate 48000
 }
}

 

Also, you have to compile a proper AMD/ATI driver, so you need to run the following:

 

apt-get install build-essential linux-header-$(uname -r)

 

Download the driver from the AMD/ATI site and put it on a memory stick. Insert the memory stick and run

 

mkdir /mnt/removeable
mount /dev/sdb1 /mnt/removeable

 

You should then copy the file from the drive to the device, and make it executable:

 

cp /mnt/removeable/amd-blah ~
chmod a+x ~/amd-blah

 

Now you need to compile it:

 

./amd-blah

 

And follow the instructions.

  • 3 weeks later...
Posted

Thanks for your guide, it's been very useful! I even managed to get it booting from network, as opposed to localdisk. One question however, did you manage to get the Microphone input working correctly?

 

I've been able to set it in the command line '--plugin drdynvc --data audin --' but the whatever Windows recording tool I use becomes unresponsive whenever I hit the record button.

 

Recording from Windows works fine, even upgrading to Freerdp 1.01 and 1.02 but still experience the same problem.

  • 2 months later...
Posted

Sorry about the slow reply - don't know how I missed this.

 

We've not looked at it specifically, but I know it has worked on each machine I tested (one of my tests during alsamixer stage was talking into the mic and hearing it over the headset). I never tested in RDP though.

  • 1 year later...
Posted

Hi mate - thanks for writing this up, I know it's getting on now, and it's the older Debian version (I tried the newer release but not enough disk space to compete this as you set out originally.. unless you've since updated). I have gotten to stage 19 and alsamixer states command not found... any ideas? followed your instructions word for word... apart from installing freerdp as opposed to xfreerdp as that wasn't available...

 

Thank you! :)

Adam

Posted
Pah! alsa-utils wasn't installed it turned out.. even though that was supposed to install as part of one of the previous install commands, weird! :) that works now thank you! shortly onto the next new world of what the hell Pyton scripts are and how to run them.. :)
Posted
I've since moved to Mono and c# for the client. The above works ok but has an issue whereby special characters prevent login (so if a user has ! in their password). My mono version doesn't. I've attached my project file, but don't really have time to explain about it at the moment! Obviously, it'd need compiling etc...

BonsaiConnect2.zip

  • Thanks 1
Posted

Thanks for your help and the code, I got as far as it loading up after everything and stating there isn't a module named wx :/

 

Your new code sounds like it u'd do the trick so maybe if you do get any time in the future let me know - I'm going to have to write off the time spent on this update project... XP Embdeed FTW... :(

 

Cheers

Posted

Just a quick update - decided to create a github project for this. Going to put some work in tidying up the client and get it online, along with some instructions.

 

That way, if anyone has any suggestions for fixes, they can submit them.

  • Thanks 1
  • 11 months later...
Posted

I know this thread has been dead for a little while, but I'm hoping you're still monitoring. First, THANK YOU! I've got a stack of HP T5730s and T5740s that are still running XPe and I'll be using your method to re-image them.

 

A couple of things have changed since you wrote this. GDM has been "upgraded" into the monstrosity that is GDM3. So instead of fluxbox and gdm, I've opted for xfce4 and LightDM. They fit into the 2G flash drive limit on the T5730 with room to spare.

 

We're also running a Windows Server 2012 RDS farm with load-balancing profiles which the jessie-main repository version of FreeRDP does not support at this time. However, the Github version (https://github.com/FreeRDP/FreeRDP.git) does support it, as well as reading the Windows .RDP files to keep things really simple. A word of warning, though: If you choose this version, install the git dependencies first, compile FreeRDP, then uninstall the git dependencies before installing the desktop environment and manager.

 

I also installed Midori from the jessie-backports repo so we had a method of accessing the RDS password reset screen so users with expired passwords could reset them and then use the FreeRDP session.

 

Thank you again for showing me the way!

Posted

Glad this is still of help to you!

 

One thing I would add - make sure you put in place something to turn the terminals off. When left on, they eventually just overheat and fry something on the mainbord. So, a script or some form of remote SSH shutdown.

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...