Search the Community
Showing results for tags 't5735'.
-
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
- 14 replies
