How to Fix unexpected disconnects with Citrix Receiver Mac OSX

We were receiving complaints from several users that they would lose the connection to their published applications when working on their Mac OS X devices. When working on these devices their published applications would suddenly be disconnected.  The users would receive the following message:error: cannot connect to server

While investigating the issue and some Googling by my colleague Patrick de Ritter we found that we where not alone. Beside the small note Dan Brinkman already wrote about this issue there is also a nice thread about the issue on the Citrix Discussions forum.  To clarify this issue I decided to write an article about this issue.

The issue the users are experiencing seemed to be caused by a new feature in OSX 10.9 called app nap. It is a sort hibernation mode for applications and causes the above described effect for users. To prevent this from happening we took the following steps:

  • Select the check box at Prevent App Nap check box to prevent the application from hibernating.
    Receiver 1
    Because the Citrix Receiver only handles the connection to StoreFront, you’ll also need to set this for the Citrix Viewer (previously known as the XenApp Viewer).
  • Use Command + I (or right-click the app, then click Get Info) to open the Get Info window.Applications Citrix receiver info
  • Open the Applications folder and find the Citrix Receiver.
  • To do this, right-click the Citrix Receiver app and select Show Package Contents. Navigate to the Helpers folder, under the Contents folder, and use Command + I (or right-click the app, then click Get Info) to open the Get Info window for Citrix Viewer.screenshot4
  • Again, select the check box at Prevent App Nap to prevent the application from hibernating. After the user logs on again (because of the services running in the background), the application will never hibernate again for this user. That’s right, these settings are for the logged in user only.Receiver 2
  • Besides changing the settings through the GUI it is also possible to create a script. This script can be started by the user and needs to run in the users context and is case sensitive:

defaults write com.citrix.Receiver.nomas NSAppSleepDisabled –bool TRUE

defaults write com.citrix.XenAppViewer NSAppSleepDisabled –bool TRUE

After the settings have been changed the user won’t experience disconnected sessions, caused by a hibernating application anymore. Remember the user needs to re-login before the changed settings will be effective

Please note: We tested this against Apple OS X 10.9

Citrix Storefront KEYWORDS explained

While designing a Citrix XenDesktop 7.5 environment I ran across the Citrix Storefront 2.x KEYWORDS feature. For reference I want to share a summary of the KEYWORDS values known to me.

Keywords are ways to enhance the user experience in a Citrix XenApp or XenDesktop environment. They enable the admin to steer the behavior of the published apps or desktops visible to the user in the different Citrix Receivers or through the Citrix Worx app in a XenMobile implementation. This, for example, enables the organisation to automatically make an app or desktop visible to a user when they open the receiver for the first time.

  1. Auto
    Automatic subscription to an app or desktop for a user. The app or desktop will have an automatic subscription in the Citrix Receiver of a user. F.e. If we publish a desktop and want that desktop to be visible to a new end user without requiring any action on the user side. If you want the app or desktop to be sticky please read this blog by Citrix.
  2. Featured
    This option enables the admin to put certain apps or desktops in a feature list which will be visible in theCitrix Receiver. Especially  when you have many apps and you want to highlight certain apps this is a convenient feature.

    Show Featured apps in Citrix receiver

    Featured apps in Citrix Receiver


  3. Prefer
    Prefer can be used to specify that the locally installed version of an application should be used in preference to the equivalent delivered instance (published application)
    if both are available. So the locally installed app will be started instead off the published application
  4. TreatAsApp
     This will force theCitrix Receiver to treat a published desktop as an application. This means that in the Receiver for Web the Desktop is treated as an app and there is no need to switch views (Apps or Desktops)


    After an before using KEYWORDS: TreatAsApp

  5. Primary
    This keyword cooperates with the next keyword “Secondary”. This keyword is usefull when using a dual site setup. F.e. you have an application published in both sites and published using the same name but you want the users of that app to stay in site A. Only when Site A is not able to delivery the app from Site a the App displayed will be from site B. This is completly transparant to the end user.A nice read for an active active datacenter is the link to this Citrix blog “Active/Active GSLB for XenDesktop – A Practical Approach (Part 1)
  6. Secondary
    Opposite to the keyword Primary.

It is possible to use multiple KEYWORDS per Desktop or Application. This can be done by specifying more than one keyword in the published application or dektop. So below a quick HOWTO add KEYWORDS to a Citrix Published Desktop or a Citrix published app on XenApp or XenDesktop.


  1. Open Citrix Studio
  2. Go to the Delivery Groups and select the delivery group you want to set the KEYWORDS to. Or go to the Applications tab, select the app you want and select edit
  3. Select User Settings and add the desired key words to the description box as depicted in the screenshot below
    Citrix XenDesktop Studio Edit delivery group

    Citrix XenDesktop Studio Edit delivery group

    Add multiple keywords separating them by a single space: KEYWORDS:Auto Featured

  4. Click OK to finish the configuration of the delivery group
  5. And you’re done

For more information please look at the Citrix Product Documentation (Configure Application Delivery and Optimize the user experience)

How to Patch XenMobile Device Manager and check the result

Recently a Citrix XenMobile emergency patch for the Citrix Device Manager appeared. To apply the fix I needed to find out on how to patch the XenMobile Device Manager. I also wanted to know how I could check if the patch was applied and if I could see which patches where already applied. (This article is based on the readme.docx found in the patch zipfile and a Citrix blog ).

I found out how to apply a patch to a Citrix XenMobile Device Manager server and here are the steps:

  1. Copy the .jar file or files to ” [Install location]\ XenMobile Device Manager \tomcat\webapps\[instance_name]\WEB-INF\lib” (on all cluster nodes, in a clustered ZDM config)
    Default [instance_name] = zdm )
    ( Default [Install Location] = c:\program files (x86\citrix )
  2. Restart ZDM service
    XenMobile Device Manager Service
  3. Please wait a minute or two as the service restarts. The is resource intensive as you will notice in the task manager
  4. When the server is back to normal we can check if the updates van been applied. This can be done by opening a browser and go to the following page:<instance-name>/help-patches.jsp . To give you an idea what this look like a before and after screenshot:Before

As you can see al lot of files have been overwritten and since the console is available and I can enroll/manage a device! Upgrade/patch succeeded. Of course I could check the version number in the XenMobile Device Manager Console, about tab.


Citrix Receiver 4.x and Lync 2013 – Windows key combination passthrough issue

Recent customer (Gemeenschappelijk Diensten Centrum in Zoetermeer) requirements brought us to the world of Microsoft Lync 2013 and Citrix Receiver 4.x.  They wanted Lync 2013 in their current VDI environment with support for automatic location detection and voice support. The Current VDI deployment was based on XenApp and Receiver 3.4. This receiver has no support for Lync 2013 and a logical step was to move to Receiver 4.x which has support for Lync 2013 (CTX138408). The access devices used in this deployment are based on Windows 7 but I have also tested this setup on Windows 8.1.

Installing Lync for VDI comes down to the following steps:

  1. Install the Microsoft RDP hotfixes for Windows 7
    a. Windows6.1-KB2574819.msu
    b. Windows6.1-KB2592687.msu
  2. Install the Citrix Receiver 4.x
  3. Install the Microsoft Lync 2013 VDI plugin (make sure bit versions are the same between Receiver and Lync plugin)
  4. Make sure the following reg keys are configured to enable the VDI plugin to contact the Lync servers:

After the setup Microsoft Lync 2013 will work like a charm (Microsoft Lync 2013 becomes location aware based on the device location, the local audio device and webcam become available in the Lync client).

My tests are based on a Citrix XenApp 6.0 and 6.5 published desktop. We deliver that desktop using the Citrix web interface 5.4. The Citrix web interface is configured to redirect Windows key combinations to the published desktop:


Now the issue arrises: When we hit a Windows key combination like the windows key it brings up the local start menu (or tiles menu on Windows 8) and the start menu on the published desktop.

When troubleshooting, I ran into to this Citrix Discussions thread and found out I was not the only one. I have been  working with Citrix support to pinpoint what was causing this issue and now we have found the cause:

When the Lync 2013 client is not installed everything works as expected. When the Lync 2013 client is installed the Windows key combinations break! Citrix acknowlegded that this is a bug and when I get a fix I will update this post. 

Note: the issues does not appear when the desktop viewer is used!

Update:   Citrix Support confirmed to us that the Lync plugin is causing the issue. Microsoft has the issue under investigation.

Update (March 2014): Microsoft confirmed to Citrix support that this is a Lync issue and this will be solved in a patch following the SP1 release for Microsoft Office 2013 (released feb 2014).

Final update (June 2014): Microsoft released a hotfix that fixes the issue. Install instructions are in the KB article


How to analize Citrix server blue screen

How do you get the correct analysis of a memory dump in a Citrix/Microsoft environment? To run a correct analysis you need the correct symbol files from the different software vendors. This is very tedious to do manually but luckily there is a quicker way:

You can automatically download the symbol files for Microsoft and Citrix. So how do you set this up:

  1. Download the Debugging Tools for Windows 32 bit and/or 64 bit packages (download and info)
  2. In the start menu browse to “Windows Kits\Debugging Tools for Windows” and choose the WinDbg.exe applicable for your platform x86 or x64.
    Windows debugger
  3. In the debug tools select file to access the menu and open ‘symbol file path’
    Symbol file path
  4. Insert the symbol server paths as described in the articles mentioned below:
    1. Use the Microsoft Symbol Server to obtain debug symbol files
    2. Citrix symbol files location
    3. Eventually you should see a Symbol Search Path box like the picture below
      symbol paths
    4. Click OK to close
  5. Now you’re ready to analyse a crash dump without having to worry which symbol files are needed
    Open Crash dump

Have fun analyzing crash dumps

Checking Citrix Xenapp patch level

Recently I needed to check the Xenapp patch level. I was used to check the ‘Programs and features’ in Windows. At least that was my first place to look for a version and installed patches.

Unfortunately patches are not listed and I needed a simple workaround to find out what patches are installed.

The solution was found in the Citrix patch utility and by executing the following command you get a list of all installed patches, product version, all replaced hotfixes and more.
Below is the command string I used:

cpatch /l

The generated output looks something like this:

For more information please read the Citrix knowledge article:

Citrix Excalibur Tech preview resource summary

When researching and reading about the Citrix Excalibur tech preview I came across a lot of resources. I listed these resources for my own convenience and for you to profit from..


Citrix excalibur tech preview and more by Stephane Thirion
Citrix Blogs
Youtube Citrix Synergy 2012: 
Citrix’s own Excalibur Guide:
The sources can be downloaded when you have a myCitrix account.
Of course these are not all the links and if there are more useful links please let me know so I can add it to my repository