There is no a automatic way to terminate idle sessions at the moment, so we’re evaluating whether to insert a Feature Request into our roadmap.
You could set DisablePersistentSession “username” key in server configuration file, but then every network disconnection of that user will terminate a session, which doesn’t seem to be helpful in your case.
# 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 “”
By default NoMachine sets: #EnablePersistentSession all
Alternatively, you could try switching the –timeout values for ‘AgentExtra’ key, and ‘DisconnectedSessionExpiry’ , so decrease the value for disconnect on idle, and increase the time how long session could be disconnected. Again, it’s not optimal, but it might help.