Session prelaunch is one of the set of features created to provide a better user experience working on XenApp and XenDesktop products. XenDesktop session prelaunch was reintroduced in version 7.6 – originally session prelaunch was available in XenApp 6.5 but was removed from the first version of XenDesktop 7.
The session prelaunch help all or specified users access applications quickly, by starting sessions before they are requested. By default session prelaunch is turned off and must be configured manually. In the default configuration each session starts (launches) when a user starts an application, and remains active until the last open application in the session closes. When this option is configured a session is waiting for a user and when the user starts an application prelaunched session is replaced with a regular session. If the user does not start an application (the prelaunched session is unused). We can configure the time when prelaunch session is created and for how long that session remains active. The configuration details are shown in section How to configure ? below.
The following conditions must be considered when session prelaunch is going to be used:
- Session prelaunch is configured per Delivery Group
- The Delivery Group must support applications. If you configure delivery group to deliver only desktops, prelaunch and linger screens will not be available in Edit Delivery Group wizard.
- Session prelaunch is available only for the machines must be running a VDA for Server OS, minimum version 7.6.
- Session prelaunch is supported only when using Citrix Receiver for Windows. In Citrix Receiver 4.2 when you install the Single Sign-on (SSON) component, session prelaunch enabled by default.
- When using session prelaunch:
- Physical client machines cannot use the suspend or hibernate power management functions.
- Client machine users can lock their sessions but should not log off.
Licensing and resource implications
Prelaunched sessions consume a license, but only when connected. Unused prelaunched sessions disconnect after 15 minutes by default. This value can be configured in PowerShell (New/Set-BrokerSessionPreLaunch cmdlet). Optimal configuration balances the benefits of earlier application availability for users against the cost of keeping licenses in use and resources allocated.
How to configure ?
To be able to utilize session prelaunch the following configuration task must be completed:
Server side actions:
- Configure StoreFront 2.6 for Pass Through Authentication – to configure StoreFront for pass-through authentication follow the steps below:
- Open Citrix StoreFront console
- In the left pane select Authentication
- In the right pane (Action pane) click Add/Remove Method
- Select Domain pass-through and Accept settings
- Verify domain pass-through is added and enabled if as it is shown in Figure 1
- Open Citrix Studio
- In the left pane select Delivery Groups
- In the middle pane select the delivery group you want to modify
- In the right pane (Action pane) click Edit Delivery Group
- On the left side select Application Prelaunch and configure required settings. You can configure 2 behaviors:
- When prelaunch session will be created – Launch when user start an appliaction (no prelaunch) is default selection
- How long unused prelaunched sessions remain active – there are two methods to specify how long an unused session remains active when the user does not start an application: a configured timeout and server load thresholds. You can configure all of them; the event that occurs first will cause the unused session to end.
Timeout – a configured timeout specifies the number of minutes, hours, or days an unused prelaunched session remains active. If you configure too short a timeout, prelaunched sessions will end before they provide the user benefit of quicker application access. If you configure too long a timeout, incoming user connections might be denied because the server doesn’t have enough resources.You cannot disable this timeout from Studio, but you can in the SDK (New/Set-BrokerSessionPreLaunch cmdlet). If you disable the timeout, it will not appear in the Studio display for that Delivery Group or in the Edit Delivery Group wizard.
Thresholds – automatically ending prelaunched sessions based on server load ensures that sessions remain open as long as possible, assuming server resources are available. Unused prelaunched sessions will not cause denied connections because they will be ended automatically when resources are needed for new user sessions.You can configure two thresholds: the average percentage load of all servers in the Delivery Group, and the maximum percentage load of a single server in the Delivery Group. When a threshold is exceeded, the sessions that have been in the prelaunch or lingering state for the longest time are ended, sessions are ended one-by-one at minute intervals until the load falls below the threshold. (While the threshold is exceeded, no new prelaunch sessions are started.)
The example is shown in Figure 2 below
- Configure pass-through settings on client device – in most cases this will be done via Group Policy. To configure this follow the steps below:
- Open Group Policy Editor
- Create a new group policy and switch to edit mode
- Browse to Computer Configuration -> Administrative Templates
- Right click and select Add/Remove templates
- Add dd the icaclient.adm this is located in the install location of Receiver “C:\Program Files\Citrix\ICA Client\Configuration”.
- Browse to Computer Configuration -> Administrative Templates -> Classic Administrative Templates -> User Authentication -> Local Username and Password
- Enable Local user name and password and configure it as it is shown in the Figure 3 below
- Link created group policy object to OU with client computers
Client side actions:
- Install citrix receiver with Single Sign on – from the command line use Citrix Receiver with the /includeSSON flag.
- Verify if the following registry key is enabled and set to true: HKLM\Software\Citrix\Dazzle\EnablePreLaunch. Based on the citrix blog article, starting from Citrix Receiver 4.2 session prelaunch should be enabled by default. If not enabled, use GPO or other method to enable and configure this registry setting.
- Restart client computer
How to verify if session prelaunch is working ?
In order to verify if session prelaunch is configured select the delivery group in Citrix Studio. The result is shown in the figure 4.
To display all session lingering settings powershell cmdlet Get-BrokerSessionPreLaunch can be used. The result is displayed in Figure 5.
In order to verify if session prelaunch is realy working is to use powershell cmdlet to display all sessions. Use powershell cmdlet get-brokersession to display all sessions with all details as it is shown in Figure 6. Not easy to read for 100 and more sessions 🙂
I would prefer to add some additional parameters to make the result more readable. Use the following command to display session information in more friendly layout:
Get-BrokerSession -SessionType Application -Property AppState, SessionState, Uid, UserName, ApplicationsInUse, DnsName, ReceiverName |Format-Table
The result is shown in Figure 7