17.7 Hotdesking

17.7.1 Hotdesking Behavior
17.7.2 Location Awareness

This section describes the various ways you can manage a Windows session when hotdesking occurs.

17.7.1 Hotdesking Behavior

The uttsc command enables you to specify what happens to the Windows session when a user hotdesks to another client. You can set this behavior by using the -H option.

The modes include:

  • -H reconnect - If the remote desktop server is configured in Device Client Access License Mode, hotdesking a Sun Ray session disconnects and reconnects the existing remote desktop session. The user must re-enter credentials. This is the default mode.

  • -H nodisconnect - Hotdesking the Sun Ray session does not disconnect and restart the remote desktop session. The remote desktop session remains connected. Previously the -O option.

  • -H autoreconnect - If the Automatic Reconnection feature is enabled on the Windows remote desktop server, hotdesking a Sun Ray session always reconnects to the remote desktop session. This action updates the client information on the remote desktop server. The user does not have to re-enter credentials. See Section 17.10, “Automatic Reconnection” for more information.

17.7.2 Location Awareness

Location awareness is a feature that provides additional hotdesking capabilities for a Windows session, which enables you to:

  • Obtain the unique client's name in a Windows session after session startup or even after hotdesking. The client's name is forwarded during hotdesking.

  • Set up actions through commands or scripts to execute in a Windows session when the associated client session disconnects and reconnects during hotdesking. Actions set up for reconnection also occur at session startup.

Note

In the context of the Windows connector, the client's name is the client ID of the Sun Ray Client or Oracle Virtual Desktop Client, also known as the DTU ID. See Section 13.1.1, “Client ID Differences Between Oracle Virtual Desktop Clients and Sun Ray Clients” for more details.

In some situations, this feature replaces the need to use the utaction at the Sun Ray server operating system level.

Location awareness sets several environment variables, which can be used when actions are executed in a Windows session. Table 17.7 lists the environment variables and the information they contain.

Table 17.7 Location Awareness Environment Variables

Environment Variable

Description

UTCINFO_CLIENTIPA

IP address of the Sun Ray Client or Oracle Virtual Desktop Client.

UTCINFO_CLIENTNAME

The client ID of the Sun Ray Client or Oracle Virtual Desktop Client.

UTCINFO_CLIENTLOCATION

The location of the client, as defined by a Sun Ray server administrator. See Section 13.1.6, “How to Configure a Client's Location and Information” for details.

UTCINFO_CLIENTOTHERINFO

Other information about the client, as defined by a Sun Ray server administrator. See Section 13.1.6, “How to Configure a Client's Location and Information” for details.


When a session starts or reconnects, the value of the UTCINFO_CLIENTNAME variable is copied to the Windows CLIENTNAME environment variable and the HKey_Current_User\Volatile Environment\CLIENTNAME registry key.

To enable location awareness, you must install the Client Information Agent on the Windows system using the Sun Ray Windows Components installer, which is described in Section 3.2.7, “How to Install the Windows Connector Components on a Windows System”. Once installed, location awareness is enabled by default and is automatically used when a Windows session starts.

17.7.2.1 Obtaining a Client's Name in a Windows Session

The location awareness feature enables you to obtain a client's name after session startup or even after hotdesking. The client name can be used for various configuration scenarios. You can obtain a client's name by using one of the standard Windows interfaces:

  • The CLIENTNAME environment variable.

  • The HKCU\Volatile Environment\CLIENTNAME registry key.

  • Using the GetComputerName() function in a Windows desktop session.

  • Using the WTSSessionQueryInformation() function in a Terminal Services session.

17.7.2.2 Setting Up Actions for a Windows Session

The location awareness feature enables you to set up commands or scripts to execute in a Windows session when the associated client session disconnects or reconnects during hotdesking, and when a Windows session starts. To do this as administrator, specify one or more registry values, name=data pairs, to the following registry keys:

For 32-bit systems
  • For session disconnects - HKLM\Software\Oracle\Sun Ray\ClientInfoAgent\DisconnectActions

  • For session reconnects and session startup - HKLM\Software\Oracle\Sun Ray\ClientInfoAgent\ReconnectActions

For 64-bit systems
  • For session disconnects - HKLM\Software\Wow6432Node\Oracle\Sun Ray\ClientInfoAgent\DisconnectActions

  • For session reconnects and session startup - HKLM\Software\Wow6432Node\Oracle\Sun Ray\ClientInfoAgent\ReconnectActions

Caution

Always back up the registry on the Window system before modifying registry keys.

Here are some examples of registry values for the registry keys mentioned above, where the Commandn name is used to imply order.

Command1=notepad.exe
Command2=wscript.exe c:\tmp\myscript.vbs

The data value specifies the command or script to be executed, and you can specify either a 'String' or REG_SZ value type.

For an executable command, such as a .exe file, you can specify an absolute path. If you do not provide a path, the executable is searched for in the following order: the current directory, the Windows system directory, the Windows directory, and the directories in the PATH environment.

For a script, you should specify the script to be run in an interpreter or shell and the script path must be absolute. For example cmd.exe /c c:\foo\script.bat or wscript.exe c:\foo\script2.vbs

17.7.2.3 Location Awareness Examples

There are a number of ways to use location awareness for real-world situations. Here are just a few examples.

  • A health care provider requires access to the local printer in each patient's room. By using the ReconnectActions registry key, you can specify a script to run whenever a health care provider logs in to a room's Sun Ray Client. For this situation, you would need to create a script to read the new client's name (Sun Ray Client's unique ID), perform a lookup to determine the printer in the room, and configure the Windows session's default printer to be the room's printer. You could also use the DisconnectActions registry key to run another script that removes the currently configured printer when the health care provider disconnects from the Sun Ray Client.

  • An instructor wants to automatically display the student's daily syllabus and lab instructions when the students log in. Since you know the client's name of the Sun Ray Clients in the training room, you can set up a script to automatically display the training content when the students log in to any of the Sun Ray Clients in the classroom. Again, this script would be run by the ReconnectActions registry key.