+ Post New Thread
Results 1 to 6 of 6
Thin Client and Virtual Machines Thread, HP T5735 Custom Debian install - to allow NLA and Session Broker to work with RDS in Technical; ...
  1. #1

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    18,522
    Thank Post
    527
    Thanked 2,642 Times in 2,046 Posts
    Blog Entries
    24
    Rep Power
    924

    HP T5735 Custom Debian install - to allow NLA and Session Broker to work with RDS

    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):
    Code:
    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):
    Code:
    rm /usr/share/doc/*/copyright*
    9. If your network does not and will not use IPv6, run the following command to free up space:
    Code:
    rm /lib/xtables/libip6t_*
    10. Run the following command (remove some unneeded files, more space freeing):
    Code:
    apt-get remove debian-faq manpages ispell aspell iamerican ibritish aspell-en laptop-detect
    11. Now to install things. Run the following command:
    Code:
    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:
    Code:
    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:
    Code:
    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:
    Code:
    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.
    Code:
    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:
    Code:
    [Desktop Entry]
    Name=Custom
    Comment=Custom Session to run ~./.xsession
    Exec=/home/<username>/.xsession
    X-Ubuntu-Gettext-Domain=<gnome-session-3.0>
    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:
    Code:
    #! /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:
    Code:
    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.
    Attached Files Attached Files

  2. #2

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    18,522
    Thank Post
    527
    Thanked 2,642 Times in 2,046 Posts
    Blog Entries
    24
    Rep Power
    924
    If you want to have VNC running also, you need to follow the following instructions:

    1. On a console, run the following command:

    Code:
    apt-get install x11vnc
    2. Now you need to store a file with the password for vnc to use.

    Code:
    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:
    Code:
    #! /bin/bash
    python /usr/bin/pythonfilecreatedearlier.py
    logout
    To
    Code:
    #! /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.

  3. #3

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    18,522
    Thank Post
    527
    Thanked 2,642 Times in 2,046 Posts
    Blog Entries
    24
    Rep Power
    924
    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.

  4. #4

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    18,522
    Thank Post
    527
    Thanked 2,642 Times in 2,046 Posts
    Blog Entries
    24
    Rep Power
    924
    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

    Code:
    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:

    Code:
    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

    Code:
    mkdir /mnt/removeable
    mount /dev/sdb1 /mnt/removeable
    You should then copy the file from the drive to the device, and make it executable:

    Code:
    cp /mnt/removeable/amd-blah ~
    chmod a+x ~/amd-blah
    Now you need to compile it:

    Code:
    ./amd-blah
    And follow the instructions.

  5. #5

    Join Date
    Mar 2012
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    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.

  6. #6

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    18,522
    Thank Post
    527
    Thanked 2,642 Times in 2,046 Posts
    Blog Entries
    24
    Rep Power
    924
    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.



SHARE:
+ Post New Thread

Similar Threads

  1. script to rename computer and join it to domain ...
    By RabbieBurns in forum Scripts
    Replies: 22
    Last Post: 2nd May 2013, 12:08 PM
  2. Replies: 1
    Last Post: 15th November 2012, 12:28 PM
  3. Replies: 28
    Last Post: 30th May 2012, 06:45 PM
  4. Using Group Policy to allow a user to install software
    By kaphc in forum Windows Server 2000/2003
    Replies: 3
    Last Post: 16th December 2009, 09:37 PM
  5. Replies: 4
    Last Post: 6th August 2009, 11:25 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •