My session gets disconnected after left idle for awhile.

If Xmanager session is left idle, the connection may get disconnected.

In the router or firewall between your PC and UNIX/Linux server, you may have the 'Connection Timeout' option enabled. This option disconnects network connections if no data is transferred for a specified time period. Please make sure to set this option to your desired time length.