By using AWS re:Post, you agree to the AWS re:Post Terms of Use

How can you stream applications using Amazon Appstream 2.0 with more than four screens in native mode?

3 minute read
Content level: Advanced
1

Amazon Appstream 2.0 is a fast, secure, and fully managed application streaming service used by thousands of AWS customers to stream desktop applications. From a user point of view, it provides dual-monitor support on web browsers with a maximum display resolution of 2560x1440 pixels per monitor. When using the AppStream 2.0 client for Windows, it supports upto 4 monitors. This article discusses the steps needed to scale up more than 4 monitors wherever needed.

What if more than four monitors are required in native mode?

There are certain industries that require users to work on multiple applications to monitor the industrial operations, transportation networks, oil & gas pipelines, electricity and natural gas networks. The operators use multiple screens to have a full view of the processes and interact with the systems.

In order to make Amazon Appstream 2.0 to work with more than 4 monitors in native mode, some AWS customers have implemented the solution described below leveraging a set of specific User session scripts. The method works only with the Appstream 2.0 client and not on the web client.

To configure and specify session scripts for Always-on and On-demand fleets

  1. Open the AppStream 2.0 console at https://console.aws.amazon.com/appstream2
  2. In the navigation pane, choose Images, Image Builder.
  3. Choose an image builder that is in the Running state, and choose Connect.
  4. When prompted, choose Administrator.
  5. Create a folder as follows
C:\Scripts\
  1. Create a powershell file by the name sessionscript.ps1
  2. Add the below contents into the file and save it. The example below works for 6 monitors
$displayRegPath = "Microsoft.PowerShell.Core\Registry::HKEY_USERS\S-1-5-18\Software\GSettings\com\nicesoftware\dcv\display"
New-ItemProperty -Path $displayRegPath -Name max-num-heads -PropertyType DWord -Value 6 -Force
New-ItemProperty -Path $displayRegPath -Name max-layout-area -PropertyType DWord -Value 17694720 -Force

You can do also more than 6 monitors, depending on the screen resolution. The result of the following calculation needs to be lower than the layout area of 17694720. The number 17694720 cannot be changed.

(n. of monitors) x (screen width) x (screen height) < 17694720

Example with 6 monitors at (1920x1200): 6 x 1920 x 1200 = 13824000

The above will be a valid configuration because 13824000 < 17694720

  1. Navigate to C:\AppStream\SessionScripts, and open the config.json configuration file.
  2. Update the config.json file as per the example below and the screenshot
{
  "SessionStart": {
    "executables": [
      {
        "context": "system",
        "filename": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
        "arguments": "-File \"C:\\Scripts\\sessionscript.ps1\"",
        "s3LogEnabled": true
      },
      {
        "context": "user",
        "filename": "",
        "arguments": "",
        "s3LogEnabled": true
      }
    ],
    "waitingTime": 30
  },
  "SessionTermination": {
    "executables": [
      {
        "context": "system",
        "filename": "",
        "arguments": "",
        "s3LogEnabled": true
      },
      {
        "context": "user",
        "filename": "",
        "arguments": "",
        "s3LogEnabled": true
      }
    ],
    "waitingTime": 30
  }
}
  1. Follow the necessary steps in Image Assistant to finish creating your image. If the session scripts configuration can't be validated (for example, if the .json file is not correctly formatted), you are notified when you choose Disconnect and create image.

  2. Once the image creation is successful, update the Appstream fleets to use the newly created image.

  3. On the image builder desktop, open Image Assistant.

  4. (Optional) Specify any additional applications that you want to include in the image.

Now the users logging into the Appstream 2.0 fleet will have the ability to connect more than 4 screens in native mode.

profile pictureAWS
EXPERT
published a year ago1.7K views