login vsi company logo login vsi company logo 250x40
header-05.jpg
  • Home
  • Blog
  • Login AM
  • 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

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]
"ScreenSaveActive"="1"
"SCRNSAVE.EXE"="C:\\Windows\\system32\\scrnsave.scr"
"ScreenSaveTimeOut"="600"
"ScreenSaverIsSecure"="1" 

Registry entries to enable the screensaver

[HKEY_CURRENT_USER\Control Panel\Desktop]
"ScreenSaveActive"="1"
"SCRNSAVE.EXE"=-
"ScreenSaveTimeOut"=-
"ScreenSaverIsSecure"=-

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

Conclusion

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.

About the author

Guido Roock is a Senior Consultants at our partner Login Consultants in Germany. Guido is enthusiastic about designing, implementing and optimizing Microsoft Infrastructures including Citrix technologies. His focus is on automation and speeding up the logon process.


Tags: How-to, XenApp, Login AM

Start Delivering the Best End User Experience Today

Request a Demo

Login VSI, Inc.

3945 Freedom Circle
Suite 670
Santa Clara, CA 95054

Phone: +1 408 899 7418

300 Tradecenter
Suite 3460
Woburn, MA 01801

Phone: +1 408 899 7418

Login VSI B.V.

De Entree 85
1101 BH Amsterdam
The Netherlands

Phone: +31 20 705 1200