Knowledge Base
Searching in : Article
ID: AR03C00166
Applies to: NX Software
Added on: 2005-03-07
Last Update: 2014-02-20

Explanation of the NX 3.x session reconnection policies

NX server provides by default support for session reconnection i.e. the ability to disconnect a running session and resume it later even from a different location.

Even though the session can be reconnected in the great number of situations, there are still some constraints that have to be satisfied in order to grant that the session can be really resumed. 

The implementation of the following Feature Request will ensure that a session can be always reconnected:
https://www.nomachine.com/FR02E01636

 

Constraints to be satisfied for reconnecting a session

- When the session has been initially launched on a display using the X RENDER extension, the session can be reconnected  only if the local X server provides support for the named extension.
You can verify which are the extensions supported by the X server by running the xdpyinfo command.

- In general, the supported depths of the X servers running on the client side have to be the same, but it is possible to migrate from 24bpp  to 32bpp and vice-versa.

- The X servers on the client side should provide the same set of fonts.
NX establishes a  temporary tunneling of a font server connection to provide missing fonts if possible. If the font server can't  provide the missing fonts, nxagent chooses a suitable replacement among the available fonts.

- The same pixmaps formats must be supported from the X servers running on the client side.

- The same set of depths must be supported from the X servers running on the client side.

- The same picture formats must be supported from the X servers running on the client side (only if RENDER support has been enabled).

- The set of visuals supported by the X servers should be the same.

 

How session reconnection works in NX 3.x

Session reconnection has been implemented in a manner that it automatically happens after some minimal criteria are matched. This is intended to minimize the direct interactivity of users.

There are scenarios that could lead administrators to limit the use of reconnection only to certain users.

NX server provides for this purpose two configuration keys that can be set in its configuration file, namely /usr/NX/etc/server.cfg:

EnablePersistentSession
DisablePersistentSession 

The default values for both keys allow all users to run persistent sessions. Both keys accept a comma-separated list of usernames or, alternatively, the keyword 'all'. The values assigned to the second key above override the values assigned to the first one so administrators can selectively allow all users to run persistent sessions still denying the use of this feature to specific users.

A quick yet comprehensive explanation can be found in the server.cfg configuration file:

 

#
# Enable persistent sessions for users. If the option is followed by
# the keyword 'all', all users are allowed to run persistent sessions.
# Alternatively, it can be followed by a list of comma-separated user-
# names. The default value is 'all' which corresponds to enabling
# persistent sessions for all users. Values specified are overridden
# by the value set for the 'DisablePersistentSession' key.
#
#EnablePersistentSession all


#
# Disable persistent sessions for users. If the option is followed by
# the keyword 'all', no user is allowed to run persistent sessions. Al-
# ternatively, the option can be followed by a list of comma-separated
# usernames. The default value is the empty string which corresponds
# to disabling persistent sessions for no user. The values specified
# override the values set for the 'EnablePersistentSession' key.
#
#DisablePersistentSession ""

When session persistence is enabled and the user has sessions running on that server, it can be that none of these sessions is matching criteria for automatic reconnection. This happens for example if the running session and the requested session have a different name. In this case, NX Client will show the 'Available sessions' dialog. This dialog lists all the user's sessions in status running and disconnected.

In this dialog there are three buttons: New, Resume and Terminate in addition to the standard Cancel button that allows for quitting the dialog.

The New button is used to launch a new session. This button is greyed out if the user is prevented from launching new sessions; this can happen, for example, because the user session limit or the server session limit has been reached on the server.

The Resume button is used to reconnect to an already running or disconnected session. If the button appears to be disabled, it is because no session actually matches the criteria for being reconnected.

The Terminate button is always enabled to provide the user with the ability to terminate a session.

For users: For a session to be resumed, the user must Disconnect the session and not Terminate.

 

Please consult the following article for more information on how simultaneous sessions for the same user can run:

https://www.nomachine.com/AR06G00534