Guide - Using Seamless RDP for native looking Windows applications

Discussion in 'PowerPC Macs' started by Tito910, Jul 23, 2016.

  1. Tito910, Jul 23, 2016
    Last edited: Jul 25, 2016

    Tito910 macrumors member

    Joined:
    Jul 10, 2016
    #1
    Hello All

    I figured out how to run a Seamless RDP session on 10.5 leopard and I wanted to share how I did it.

    SeamlessRDP is a function of rdesktop that lets a RDP session look and feel like separate windows. It'll hide the desktop and taskbar and present each application window to the Mac GUI individually. You can move them around, restack them, resize them, etc. It's a much better way to use RDP.

    However, Seamless RDP is poorly documented and it took a lot of hunting and trial and error to get it running. The install process is lengthy and there are limitations, but I feel it's worth it.

    [​IMG]

    [​IMG]

    You can see the two Chrome windows. Of course Chrome doesn't run on PPC, they're running on another windows computer and then being displayed on the mac through RDP.

    Limitations and Issues


    • Windows Server 2008 R2 is better suited for this task but Windows 7 can do the job as well. However Windows 7 will always show the Taskbar and Auto-Hide doesn't work properly. Whereas Windows Server 2008 R2 will only display the application (but can show the taskbar as well if desired).
    • Seamless introduces quirks into many applications. Often these manifest in oddly sized windows or extra blank windows. Generally they're not an issue. Sometimes you may need to google for a workaround.
    • Minimizing doesn't seem to work. You can minimize a seamless window, but you won't be able to restore them. Reconnecting fixes the issue though.
    • Streaming video won't work well. First if you're running windows in a VM, virtualized gpus don't handle video to begin with. Second, RDP generally doesn't do well handling high-bandwidth high-priority tasks like video. Microsoft made RemoteFX to handle that, but unfortunately we cannot access those with rdesktop. Audio streaming works great though!
    • I've personally tested this method on a Quad G5 and a 12 inch Powerbook G4 both running 10.5.8. It may or may not work on other devices and OS versions.
    If you're still interested lets get started! I've organized the install into 3 parts.

    Part 1: Mac Installation

    1. Download and install Xcode 3.1.4 from Apple's Developer site. You'll need to make a free account. Be sure to have the Command Line tools selected in the install options. It should be on by default
    2. Install XQuartz https://dl.bintray.com/xquartz/legacy-downloads/Leopard/X11-2.6.3.dmg This will replace the stock X11 with a newer and better version. You need to log out or restart for the new settings to apply.
    3. Install Macports https://distfiles.macports.org/MacPorts/MacPorts-2.3.4-10.5-Leopard.dmg
    4. After installing macports run the following lines in Terminal
      Code:
      sudo port -v selfupdate
      sudo port install rdesktop
    5. And now wait... several hours... rdesktop needs about two dozen dependencies and your little ppc mac will need to compile them all one by one. While you wait, start working on the Windows Install.

    Part 2 - Option A: Windows Server 2008R2 Installation


    1. I assume you already have Windows Server 2008 R2 installed. You can use a virtual machine or a real physical computer.
    2. I highly recommend you set a static ip for the Windows machine
    3. Open up Server Manager and click "Configure Remote Desktop" on the right side. Choose "Allow connections from computers running any version of Remote Desktop (less secure)". Apply and Ok
    4. Back in Server Manager click on "Go to Windows Firewall" on the right side. Click on "Inbound Rules" in the center pane near the bottom. Find Remote Desktop from the list and enable the rule
    5. Back in Server manager, click on Roles in the left pane. Click on Add Roles. Select Remote Desktop Services and click next. In the next few pages use these options: Only select Remote Desktop Session Host and Remote desktop licensing, "Do not use network level authentication", "per user licensing", only check "audio and video playback", don't touch Discovery Scope settings. Finish the wizard and restart Windows
    6. Back in Server Manager, on the left pane, Roles -> Remote Desktop Services -> RD Session Host Configuration. Double click on "Remote Desktop License Servers", click on Add, select the local computer on the left then click on Add. Click OK then apply. *Hopefully* this will keep the service active after the 120 day trial period.
    7. Back in Server manager, on the left pane, Roles -> Remote Desktop Services. click on the "Change" link next to "RD Session Host Server Settings", then click on "Allow users to start both listed and unlisted programs on initial connection"
    8. Now go to https://www.cendio.com/thinlinc/download and download the server bundle. You'll need to give them a real email address to receive the download link.
    9. Download the file, open the archive, then install the tl-wts-tools.exe file in the windows-tool folder.

    Part 2 - Option B: Windows 7 Installation
    (This was tested on both Win 7 Ultimate and Pro)
    1. I assume you already have a Windows 7 computer ready to go. You can use a virtual machine or a real physical computer.
    2. I highly recommend you set a static ip for the Windows machine.
    3. Go into Control Panel> System > Remote Settings. Click on "Allow connections from computers running any version of Remote Desktop (less secure)" Click Apply and Ok.
    4. Now go to https://www.cendio.com/thinlinc/download and download the server bundle. You'll need to give them a real email address to receive the download link.
    5. Download the file, open the archive, then install the tl-wts-tools.exe file in the windows-tool folder.
    6. Go to C:\Program Files\ThinLinc\WTSTools\ and make a shortcut of seamlessrdpshell.exe.
    7. Click on Start -> All Programs. Right click on "startup" then click on "explore". Move that shortcut to this folder.
    8. Open Regedit and travel to this key. Make any empty keys (folders) as needed. HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer. Add a new DWORD and set it to 1.
    9. Optional: Disable Desktop effects for increased performance --- Go to Control Panel -> System -> Advanced System Settings -> performance Settings -> "Adjust for best performance"
    10. Reboot

    Part 3: Connection Setup


    Now to test and see if everything is working. Type the following into Terminal and cross your fingers! Of course change USERNAME, PASSWORD, and IP_ADDRESS to your specific values.

    Code:
    rdesktop -u USERNAME -p PASSWORD A "%ProgramFiles%\ThinLinc\WTSTools\seamlessrdpshell.exe" -s "c:\windows\notepad.exe" IP_ADDRESS
    Hopefully you'll see a Notepad window on your Mac floating by itself. Assuming it worked, lets expand that command and actually make it useful.

    Code:
    rdesktop -A "%ProgramFiles%\ThinLinc\WTSTools\seamlessrdpshell.exe"  -u USERNAME -p PASSWORD -r sound:local -r clipboard:CLIPBOARD -r disk:Mac=/Users/MACUSERNAME -r printer:"Brother_MFC_8820DW"  -s "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe -no-sandbox"  IP_ADDRESS
    That may look intimidating but it's not. Lets break it down.

    • rdesktop -A "%ProgramFiles%\ThinLinc\WTSTools\seamlessrdpshell.exe" <-- enables seamless mode and points rdesktop to the helper program on Windows
    • -u USERNAME -p PASSWORD <-- embeds the username and pw into the command so we don't have to enter it later. Use "-"as a password to have rdesktop ask every time if you don't want to save it.
    • -r sound:local <-- forwards sound on the Windows to your Mac
    • -r clipboard:CLIPBOARD <-- enables clipboard sync
    • -r disk:MacHome=/Users/MACUSERNAME <-- shares your home folder to Windows, of course use your actual username (you can share as many folders as you like, just repeat the command)
    • -r printer:"Brother_MFC_8820DW" <-- shares your printer with Windows. You need to use the name listed in CUPS. go to 127.0.0.1:631 on your Mac and click the Printer tab to find out the correct name to use. (you can share as many printers as you like, just repeat the command)
    • -s "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe -no-sandbox" <-- sets what program you want to use on your Mac. the "-no-sandbox" is specific to Chrome to work properly in seamless mode. omit it for other applications
    • IP_ADDRESS <-- the ip address of Windows of course

    You can always type "man rdesktop" in terminal for a full list of all commands.

    I suggest to add your completed command to a shell script so you can easily use it whenever you like.

    Hopefully my directions were clear enough and that this helps restore some much needed functionality. I'll try to answer any questions as best I can.

    [​IMG]

    Visual Studio 2015 on a Mac? Yes please!
     
  2. gavinstubbs09 macrumors 65816

    gavinstubbs09

    Joined:
    Feb 17, 2013
    Location:
    NorCal boonies ~~~by Reno sorta
    #2
    Looks great man! I'll be sure to try it out, I have an Optiplex 775 USFF running Windows 10 24/7 merely for a file server, and if it can give me Chrome under OS X life will be better!
     
  3. Dronecatcher macrumors 68000

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #3
    Great work! Save the Terminal commands as executable scripts and you could pop them into the Dock with appropriate icons for seamless integration.
     
  4. 128keaton macrumors 68020

    128keaton

    Joined:
    Jan 13, 2013
    #4
    Heh. Today I replaced the bad board in my 'server' went from a Core2Quad with 8GB of RAM to an i5 2400 with 24GB. The board was robbed from an Optiplex 990 SFF
     
  5. bobesch macrumors 6502a

    bobesch

    Joined:
    Oct 21, 2015
    Location:
    Kiel, Germany
    #5
    That looks really great , even if I don't need/like separate windows for my RDP-sessions (I also choose to have Win and Mac separated with Fusion on Intel-Macs) 'cause that 'unity view' kind of mix me up.
    So my question is more about "rdesktop" than about separate windows...
    I tried to get an RDP-session with my Win2008- (not Win2008R2-) using the MS RPClient without any success AFTER I bougth and installed a bunch of Terminal-Licences.
    After that the Win RDP-client could't handle the rules for server certification anymore.
    Before (with the included two 'free' licences for server-maintainance) everything worked well.
    If you connect to your Win2008R2-server, do you use one of the two 'free' terminal licences?
    I'm desparately looking for any RDP-client, that will get my PPCs back into game and make them log into the server again...
    Like to put my Cube, Goose-neck, iMacG3 etc. back into office and make them run them as "fat-clients" again, since trials with VNC had been not that reliable.
     
  6. Tito910 thread starter macrumors member

    Joined:
    Jul 10, 2016
    #6
    Well I know less than you do how MS licenses this. But on my end I've only 1 user account, the default "Administrator" account. I often have two RDP connections. One for seamless apps and another traditional RDP session for admin. I've yet to encounter any issues. The licensing Diagnosis panel says I have 0 licenses as well. I know there was a 120 grace period before I added the empty license server. The message has disappeared since then, but for all I know it's still silently ticking down in the background. I guess I'll find out in 4 months.

    Sorry I couldn't have been more help.
     
  7. Altemose macrumors G3

    Altemose

    Joined:
    Mar 26, 2013
    Location:
    Elkton, Maryland
    #7
    This is a fantastic guide! I am wondering if it possible to pull this off using a Professional or higher version of regular Windows since they all should have the same remote connection framework and no licensing issues.
     
  8. bobesch macrumors 6502a

    bobesch

    Joined:
    Oct 21, 2015
    Location:
    Kiel, Germany
    #8
    With Server2008 you have the option of one user working locally and two terminal user being able to log-in via RDP in the backgroud - all simultaneously. Trying to connect a third RDP-session is refused with the message, that already two other computers are connected.
    The latest official MS RDP-Client was able to log-in under these circumstances, since the connections do not require certificates for further client-identifications.
    Everything changes as soon as you buy and activate more/official (not maintainance) licences. Then the server starts to identify each connected client/user. At this point the MS RDP-Client for PPC/Leopard and some others, that I've tried do fail unfortunately.
    Going back to the previous setting without server-certificats would reduce the number of possible RDP-connections to two again.
    I've just wondered, if rdesktop would be able to deal with this problem. Maybe I'll give it a try during the summer-holidays.
    With the latest MS RDP-Client (both versions) and Lion on white 1st/2nd generation intel-imac everything work fine ...
     
  9. gavinstubbs09 macrumors 65816

    gavinstubbs09

    Joined:
    Feb 17, 2013
    Location:
    NorCal boonies ~~~by Reno sorta
    #9
    https://powerpccentre.wordpress.com/2016/01/16/vnc-viewer-for-powerpc/
     
  10. Altemose macrumors G3

    Altemose

    Joined:
    Mar 26, 2013
    Location:
    Elkton, Maryland
    #10
    So by running a regular copy of Windows like XP Professional or 7 Professional would only allow one user to work, but it would work properly?
     
  11. Tito910 thread starter macrumors member

    Joined:
    Jul 10, 2016
    #11
    Windows 7 and XP did work. But the experience wasn't as good. It felt even more hacked together than it ordinarily does. The taskbar is visible at all times and the helper application on Windows needs to be "primed" before it'll accept a seamless RDP connection.

    I initially tried to get it running on Windows 7, but Server 2008 R2 works better.
     
  12. Altemose macrumors G3

    Altemose

    Joined:
    Mar 26, 2013
    Location:
    Elkton, Maryland
    #12
    @Tito910 Thank you for the info. I was a bit curious since a lot of people would try this as regular versions of Windows are a lot easier and cheaper to come by. I wonder if there is a VNC software solution that would work on the Windows end to only share a specific window on the Windows OS.
     
  13. bobesch, Jul 24, 2016
    Last edited: Jul 25, 2016

    bobesch macrumors 6502a

    bobesch

    Joined:
    Oct 21, 2015
    Location:
    Kiel, Germany
    #13
    Yes, it should work without problems (I mean the MS RDP-Client). But only one user at the the same time. The local user will be logged off and the RDP-client takes over the same session, if they log-in with the same credentials.
     
  14. Tito910 thread starter macrumors member

    Joined:
    Jul 10, 2016
    #14
    I'll throw up a win7 post tomorrow. I think I have a couple of ideas to iron out the bugs.
     
  15. Altemose macrumors G3

    Altemose

    Joined:
    Mar 26, 2013
    Location:
    Elkton, Maryland
    #15
    I figured that but for most users that would work just fine.
     
  16. Tito910 thread starter macrumors member

    Joined:
    Jul 10, 2016
    #16
    Ok I updated the guide with a Win 7 section. The only difference between Win7 and Server08 is the forced taskbar in Win7. You can't get rid of it and auto-hide doesn't work.

    If you want a taskbar under Server 2008 you need to launch explorer.exe in seamless mode. That'll give the same effect as the forced taskbar under windows 7.
     
  17. Altemose macrumors G3

    Altemose

    Joined:
    Mar 26, 2013
    Location:
    Elkton, Maryland
    #17
    Does Windows XP experience the same short fall?
     
  18. Tito910 thread starter macrumors member

    Joined:
    Jul 10, 2016
    #18
    I redid XP with what I know now and it does work. It does usually hide the taskbar, which is nice.

    However, I'm having difficulty getting the taskbar working under XP. Sometimes it shows up, sometimes it doesn't, sometimes it works, sometimes it doesn't. Sometimes it decides to log-off right after connecting. There's some unknown variable I can't pin down.

    So from what I currently know:
    • Windows 7 forces you to have a taskbar
    • XP is erratic but generally works ok without a taskbar.
    • Server 2008 R2 reliably works with or without a taskbar. :)
    My recommendation is still strongly with Server 2008 R2
     
  19. Altemose macrumors G3

    Altemose

    Joined:
    Mar 26, 2013
    Location:
    Elkton, Maryland
  20. Tito910 thread starter macrumors member

    Joined:
    Jul 10, 2016
    #20
    I don't like/use Win 10 so I don't have any copies to test with.
     
  21. Altemose macrumors G3

    Altemose

    Joined:
    Mar 26, 2013
    Location:
    Elkton, Maryland
    #21
    Same here...
     
  22. gavinstubbs09 macrumors 65816

    gavinstubbs09

    Joined:
    Feb 17, 2013
    Location:
    NorCal boonies ~~~by Reno sorta
    #22
    I have plenty, I've actually been rushing to install Windows 10 on many of my machines so they are "activated" with 10 before the cutoff date.

    I'll try with Windows 10 for y'all.
     
  23. gavinstubbs09, Jul 27, 2016
    Last edited: Jul 27, 2016

    gavinstubbs09 macrumors 65816

    gavinstubbs09

    Joined:
    Feb 17, 2013
    Location:
    NorCal boonies ~~~by Reno sorta
    #23
    So I guess it doesn't like Windows 10 one bit.

    rdesktop took about 50 minutes to install on my G5 quad as a heads up!

    So when I try to rdesktop into my Windows 10 machine it disconnects, and the seamlessrdpshell is not compatible with Windows 10. Setting it to run as an administrator and under Windows 7 mode makes it give no errors on startup.

    Here is the message I recieved in terminal when trying to connect:

    WARNING: Broken Window Manager: Timeout while waiting for ConfigureNotify
    WARNING: Broken Window Manager: doesn't handle restack (restack request was ignored)

    So maybe I'll mess with it for a bit or just use Server 2008 R2 in a VM.

    -------

    Okay, using

    -u USERNAME -p PASSWORD IP_ADDRESS

    actually gives me a window with Windows 10 (full OS in a 800x600 window). Now I want individual programs!

    -------

    Trying Google Chrome gives me the same broken window manager. So does notepad.
     
  24. Tito910 thread starter macrumors member

    Joined:
    Jul 10, 2016
    #24

    Those error messages are normal. they're safe to disregard.

    What command line are you using when you try to use seamless in rdp?
     
  25. gavinstubbs09, Jul 27, 2016
    Last edited: Jul 27, 2016

    gavinstubbs09 macrumors 65816

    gavinstubbs09

    Joined:
    Feb 17, 2013
    Location:
    NorCal boonies ~~~by Reno sorta
    #25
    For Chrome:

    rdesktop -A "%ProgramFiles%\ThinLinc\WTSTools\seamlessrdpshell.exe" -u USERNAME -p PASSWORD -s "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe -no-sandbox" IP_ADDRESS

    Notepad:

    rdesktop -A "%ProgramFiles%\ThinLinc\WTSTools\seamlessrdpshell.exe" -u USERNAME -p PASSWORD -s "C:\Windows\notepad.exe" IP_ADDRESS

    When I put rdesktop -u USERNAME -p PASSWORD in first instead of middle of the command, I get a list of different terminal functions I can use.

    ---------

    Figured out why I was getting the command usage, I forgot -A in the command with rdesktop -u -p

    When it goes to connect I receive the same error as my post above with the broken window.
     

    Attached Files:

Share This Page