Why user limits set by the administrator may be not preserved in a new virtual desktop
On some Linux distributions the user limits ("ulimits") set by the administrator are not preserved when a new desktop environment is started, regardless of whether it's a native desktop or a virtual desktop session.
This is not a problem related to the running of NoMachine sessions.
This occurs when the pam module (pam_limits.so) is not loaded by /etc/pam.d/su and prevents the conveying of limits (such as open file descriptors) to any command started with su -.
The loading of pam module is disabled by default for example on Ubuntu 13.10. To enable it, follow the instructions available in the file /etc/pam.d/su:
# Sets up user limits, please uncomment and read /etc/security/limits.conf
# to enable this functionality.
# (Replaces the use of /etc/limits in old login)
# session required pam_limits.so
