Windows RemoteApps
Overview
Microsoft RDP and RDS can run a single application over an RDP connection, a technology Microsoft calls RemoteApp. Kasm Workspaces supports RemoteApp, whether the application runs in a Microsoft RDS infrastructure or on stand-alone Windows servers that Kasm manages. This guide registers an application as a RemoteApp and configures Kasm to deliver it through a browser-native portal. The result is governed access to individual Windows applications without delivering a full desktop.
Prerequisites
Before you begin, confirm the following:
- One or more Windows servers to host the application: a static server, a pool of static servers, or an AutoScaled pool that Kasm manages.
- The Kasm Desktop Service installed on the target server, to apply registry file mappings.
- Active Directory single sign-on configured for multi-user access. See Windows authentication.
- For a Microsoft RDS deployment, see Connect Kasm Workspaces to Microsoft RDS and Microsoft's guidance on publishing RemoteApps in RDS.
Solution approach
This guide progresses through the following phases:
- Register the application as a RemoteApp.
- Enable multiple RemoteApp instances for a single user.
- Configure the Kasm server and workspace.
- Launch a RemoteApp with the Developer API.
Detailed steps
Register a RemoteApp
Register the application as a RemoteApp, or configure the server to allow RDP connections to pass the full path to the application. Registering RemoteApps is more secure. The following Microsoft Registry export file registers Microsoft Edge as a RemoteApp.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\TSAppAllowList\Applications]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\TSAppAllowList\Applications\Microsoft Edge]
"Name"="Microsoft Edge"
"Path"="C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe"
"VPath"="C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe"
"RequiredCommandLine"=""
"CommandLineSetting"=dword:00000001
"IconPath"="C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe"
"IconIndex"=dword:00000000
"ShowInTSWA"=dword:00000000
Apply the file in one of two ways:
- Import the file manually with
reg import filename.reg. - Use Kasm File Mapping to map a file with the above contents to
C:\Program Files\Kasm\scripts\registry\edge_remoteapp.reg. The Kasm Desktop Service must be installed on the target server. When the service starts, it downloads file mappings and applies any.regfiles in that location.
Enable multiple RemoteApps for a single user
By default, Windows limits a user to a single instance of a RemoteApp. To allow multiple instances for a single user, disable a Group Policy setting.
- Press Windows + R to open the Run prompt.
- Enter
gpedit.msc, then click OK. - Go to Computer Configuration.
- Select Administrative Templates.
- Select Windows Components.
- Expand Remote Desktop Services.
- Select Remote Desktop Session Host.
- Select Connections.
- Open the Restrict Remote Desktop Services users to a single Remote Desktop Services session setting.
- Set it to Disabled.
Configure the Kasm server and workspace
Kasm can point to a single fixed Windows server, a pool of fixed servers, or a pool of AutoScaled servers. The server and workspace steps match the RDS configuration:
- To add the server, follow Create a server.
- To add the workspace, follow Create a RemoteApp workspace.
For a pool of identical servers that Kasm load-balances, first create a pool, then select that pool when you create each server.
Launch a RemoteApp with the Developer API
The UI steps cover user-requested sessions. To launch a session and specify the RemoteApp and its arguments programmatically, use the Kasm Developer API. The following JSON payload uses the request_kasm API.
{
"api_key": "<KASM_API_KEY>",
"api_key_secret": "<KASM_API_SECRET>",
"user_id": "<USER_ID>",
"image_id": "<IMAGE_ID>",
"enable_sharing": false,
"connection_info": {
"guac": {
"type": "rdp",
"settings": {
"security": "any",
"ignore-cert": true,
"enable-font-smoothing": true,
"enable-wallpaper": true,
"enable-theming": true,
"enable-full-window-drag": false,
"enable-menu-animations": false,
"resize-method": "display-update",
"server-layout": "en-us-qwerty",
"printer-name": "Kasm",
"remote-app": "||KasmLauncher",
"remote-app-args": "\"C:\\Program Files\\Microsoft Office\\root\\Office16\\EXCEL.EXE\" C:\\Users\\Public\\Documents\\example.xlsx"
}
},
"rdp_thick_client_properties": {
"connection type": 6,
"networkautodetect": 1,
"bandwidthautodetect": 1,
"screen mode id": 2,
"singlemoninwindowedmode": 1,
"keyboardhook": 2,
"disable full window drag": 1,
"disable menu anims": 1,
"bitmapcachepersistenable": 1,
"session bpp": 32,
"dynamic resolution": 1,
"autoreconnection enabled": 1,
"videoplaybackmode": 1,
"allow desktop composition": 1,
"disable themes": 0,
"allow font smoothing": 1,
"smart sizing": 1,
"desktopscalefactor": 100
},
"kasm_svc": {
"port": 4902
}
}
}
Use an API key scoped to the minimum permissions required, and store the key and secret in a secret manager. Do not commit credentials to source control. For authentication details, see the Developer API reference.
Common troubleshooting steps
- A RemoteApp does not launch. Confirm that the application is registered as a RemoteApp, or that the server allows the full application path. Confirm that the
.regfile applied. The Kasm Desktop Service must be installed to apply file-mapped registry files. - A user cannot open a second instance of a RemoteApp. Disable the single-session Group Policy setting. See Enable multiple RemoteApps for a single user.
- A registered RemoteApp name is not recognized. Prepend registered RemoteApp names with double pipes, for example
||Microsoft Excel. - Multiple users cannot connect to the server. Configure single sign-on. See Windows authentication.