login vsi company logo login vsi company logo 250x40

Turn Screensaver on and off Between Thin and Fat Clients with Login AM Filters

Turn Screensaver on and off Between Thin and Fat Clients with Login AM Filters

A customer of us is providing published Desktops for their end users on Citrix XenApp. Most of the users are provided with Thin Clients but some still require a Fat Client for traveling. A mandatory company rule dictates the use of a screensaver with password lock enabled. Due to that rule a general screensaver has been provided to fat clients and remote desktop servers. The thin clients used are only providing published desktops and are not able to have a screensaver with user authentication enabled.

Fat client users started complaining about that rule, because they had to enter their password twice when they left their workplace for a couple of minutes. The screensaver was active on their local computer and also active in their published desktop session.

I have been asked to create a solution which enables the screensaver in a remote desktop session only if the client device is a thin client.

Switching the screensaver on and off

The current screensaver settings are located in the user profile. To configure it I looked up these registry entries listed below. 

[HKEY_CURRENT_USER\Control Panel\Desktop]

Registry entries to enable the screensaver

[HKEY_CURRENT_USER\Control Panel\Desktop]

Registry entries to disable the screensaver

Unfortunately it is not enough to import a registry file. The changes will not be recognized if the session is already running, so I looked up the SystemParametersInfo Windows API call which contains a set of functions to control the screensaver and also allows getting these settings applied in the current session. I created a small executable which will be called by the StartProcess ActionItem after registry settings have been imported.

How to differentiate between thin clients and fat clients

A naming convention for client devices is in place which allows using a rule based on the client name. All thin clients are enforced to start with a “TC” in their name, so I already found an identifier to differentiate between thin clients and fat clients. I was now able to use the environment variable %CLIENTNAME% and run different actions based on that value. Login AM has a lot of built in filters which allows the creation of a process flow based on return values. In that case I used the “EnvVar” filter to identify the client device and run different Action Sets to configure the screensaver accordingly.

implementing filters in action sets

Implementing filters in Action Sets

The user Logon Phase will now run different actions based on the client name. The Login AM implementation is shown in the screenshot below.

user logon phase for thinclients

User Logon Phase for ThincClients


After identifying the actions to configure the screensaver and activate the settings in the current session it was very easy to adopt this into Login AM. The customer is very happy with that simple but effective solution, which indeed increased the overall user experience.

The complete screensaver component for Login AM 2012 is available for download here.

Ps. A few weeks ago I also wrote another blog post about filters to configure multi language applications, so if you haven't read that yet, please take a moment to do so.

Tags: How-to, XenApp, Login AM