Citrix Notification Area Abuse (PNAgent)

Recently I was asked a question “How do I turn off PNAgent from the systray?”.  The first reaction is why would you want to do that.  The answer is that you often either do not want to confuse the user or given them too much power to mess up the configuration.  In most cases it is probably based on confusion.  I did not know the answer but promised to look into it.

It seems like a simple request with a fairly simple answer.  However, searching the web and more specifically the Citrix knowledge base, there is no reasonable answer.  People have been asking since 2003 for this and the only workable answer (known to me) is to allow PNAgent to start during login but kill it a few minutes later after it has served its syncing purposes.  This somehow will happen automatically and hopefully before the program becomes noticeable to the user.  It also assumes that the sync will happen before the user can get to it.  Sounds pretty unworkable to me.

The most logical conclusion would be to modify PNAgent to not show itself in the systray (better known to Microsoft fans as the Notification Area).  This could potentially be done but would not happen for some time based on higher priority items and the time it takes to release a major product like XenApp.

From the Rick Mack school of handling this (which I’m sure he could find a solution) you go after PNAgent with an army of tools to figure out its position and then shift something to get PNAgent to stop showing its icon in the systray.  A likely candidate is to corrupt the icon resources (meaning deleting them) in the hopes that the code will fail to display them but still do the basic work it needs to do.  I’m not recommending this but it is certainly an option until a real solution comes to bear.

This led me to think that I should check out MSDN to learn more about how the Notification Area works (since I haven’t done much with it) and determine what kind of API PNAgent would be using to manage this.  A search found me at the Vista guidelines for the Notification Area.

What I love about this web page is that it clearly states when you should and should not use the Notification Area.  I was not surprised to find that Citrix is basically breaking these guidelines for a variety of their client programs.  Citrix is certainly not alone however.

Keeping users in control

Keeping users in control extends beyond using the notification area correctly. Depending on the nature of your icon, you may want to let users do the following:

  • Remove the icon. Your icon may provide relevant, useful status, but even so, users may not want to see it. The Customize Icons dialog box in Taskbar and Start Menu Properties allow users to always hide icons, but this feature isn’t necessarily discoverable. To keep users in control, provide a Display icon in notification area option on the icon’s shortcut menu. Note that removing an icon doesn’t have to affect the underlying program, feature, or process.
  • Select types of notifications to display. Your notification must be useful and relevant, but there may be notifications that users don’t want to see. This is especially true for FYI notifications.
  • Suspend optional features. Icons are used to display status for features without desktop presence. Such features tend to be long-running, optional background tasks, such as printing, indexing, scanning, or synchronizing. Users may want to suspend such features to increase system performance, reduce power consumption, or because they are offline.
  • Temporarily quit program. The program is stopped and restarted when Windows is restarted.
  • Permanently quit program. The program is stopped and not restarted when Windows is restarted (unless the user chooses to restart later). Either the user no longer wants to run the program, or wants to run the program on demand—perhaps to improve system performance.

It’s the ability to remove PNAgent from the Notification Area that is missing.  There are other offenses but this one is the most important for the question “How the heck do I get this thing out of my systray?”

A more general observation is Citrix has stuffed too much stuff into the systray and is now trying to compensate for that with the App Receiver project.  I’m starting to think the problem is more fundamental than consolidation.  The first true goal would be better conform with Microsoft suggested standards.  This would include examining the guidelines with a critical eye to anything Citrix produces in the systray.

The last message I want to share is that this area is called “Notification Area”.  The names says it all.  It implies status and changing states.  This idea does not include using it as a program launch area or displaying an icon to manage the current sessions.  As the document suggests, there are better ways of doing this.

3 responses to “Citrix Notification Area Abuse (PNAgent)

  1. There is a way to force the icons to be hidden. Microsoft has a technique for picking icons to be automatically hidden that would probably fix most of the issues with PNAgent.

    There is a good tutorial web page about this at http://www.coolnerds.com/XP/NotificationArea/xpNotification01.htm

    To completely remove it even from the hidden area would require changes to PNAgent.

  2. It is possible to lockdown the PNA tray icon by modifying the Web Interface configuration. Web Interface 4.6 has the most features builtin for this i beleive.

    It’s possible to prevent the user from modifying the server URL and several other settings that might “break” the PNA.

  3. jeffreymuir

    This is good news.
    However, have you ever come across a way of turning off the systray icon altogether?