Using Seamless RDP for native looking Windows applications

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.

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.

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.

Attachments

Source: https://forums.macrumors.com/threads/guide-using-seamless-rdp-for-native-looking-windows-applications.1984261/
Using Seamless RDP for native looking Windows applications