Wilco van Bragt - LinkeIn Wilco van Bragt - Twitter rssa 

How To: Autostart a Published Application/Desktop with more Published Applications/Desktops

In situations where the users connects to a Full Desktop I personally like to use the Web Interface as a logon point, so we can centrally manage the connections to the XenApp environment and the user are shown a nice logon screen (especially when using Thin Client that are not in the domain).  When deploying this full desktop you would not like to bother the end-user with too many steps for connecting to the Citrix environment. Therefore after providing the username and password the session should start immediately. In this article I will show how this can be accomplished even when more Published Applications (for example applications running on silo servers) are available or you would like to publish the Desktop as a Published Application.

If you published a Single Desktop within Web Interface 5.x auto-start is actually really simple. Citrix has added this as a feature, only the configuration is a bit old-style. You manually need to configure the webinterface.conf located in the conf folder located within the Web Interface site folder (by default C:\inetpub\wwwroot\Citrix\XenApp). In the webinterface.conf you will the option AutoLaunchDesktop. By default this option is not enabled and configured with the value off, by removing the # sign and configures the option with the value on (see figure below).




Image

This option works perfectly when you publish a single desktop, but some third party user management products (like RES Workspace Manager) are using a Published Application for showing a desktop to the user. In that case enabling this feature won't help you, because it's only created of starting a Published Desktop. Happily this behavior can be changed by manually editing in the javalist.java file (located at \inetpub\wwwroot\Citrix\<site-ame>\app_code\PagesJava\com\citrix\wi\pages\site\).

In this file two lines should be adjusted: import com.citrix.wing.webpn.DesktopInfo should be replaced with import com.citrix.wing.webpn.ApplicationInfo and if ((singlePublishedItem != null) && (singlePublishedItem instanceof DesktopInfo)) should be changed to if ((singlePublishedItem != null) && (singlePublishedItem instanceof ApplicationInfo)). Logically also the earlier described option in the webinterface.com should be configured. This configuration is described step by step in the Citrix knowledgebase article CTX125277.

Don't forget that the website should be added to the trusted website of the client, otherwise the auto start function won't work. Happily the user gets a message if this is not the case and how this can be configured (however in domain workstation I suggest to manage this centrally using GPOs or a User Management product).

You expect that you are done right now, but both options only works when only one Published Resource is available for the user. In many cases a user has more Published Resources available even when publishing a Full Desktop. Good examples are applications running on a separate silo (because of application conflicts or resource usages) or applications running on a legacy Presentation Server 4.5 farm (because the application does not run on 64bit or Windows 2008 R2).

In the situation that more Published Resources exists for the user we should use another available modification for Web Interface. By using the hide Application and/or Application Folders modification it possible to hide applications or folders in such a way we only have one Published Resource available that will be shown to the end-user. In such case the only shown resource will be auto started. Citrix has described in knowledgebase article CTX122133 (provided by colleague CTP Thomas Koetzing). However using this modification you should specify which folders or applications should be hidden, while it would be easier to specify which Published Resource should be soon (and automatically that other should be hidden). After some searches I found a solution provided by Sam Jacobs. For the solution the global.asax(.cs) should be reconfigured. Sam is providing both the manual instructions as a fully modified file as a download via this website. I just used the downloaded file and replaced the global.asax.cs as I'm using a Web Interface 5.4 (file is located at c:\inetpubl\wwwroot\Citrix\xenApp\app_code\global.asax.cs). The next step is to edit the webinterface.conf. In this scenario you only would like to show only one Published Resource. Therefore the setting FilteredAction should be configured with the value Show. To specify which Published Resource should be shown you should provide the name to the setting FilteredApps. Both these settings are not available by default in the webinterface.conf file so you need to add those manually.

Image

Now this is configured the Web Interface will launch the configured Published Resource automatically when the user logs on. The user will be notified that the configured resource will autostart out of the web Interface (as shown in the below figure).

Image

Before you are already editing your Web Interface you should know that enabling the autostart option that Workspace Control functionality will be disabled. For example users cannot reconnect to an active session on another client, but check all settings within the Workspace Control tab to see what is not available anymore).

Secondly you probably have more Web Interface available, which are Load Balanced for fault tolerance.  You need to make the adjustments on all your Web Interface, because the settings of Web Interface are (nowadays) only stored locally on the Web Interface server.