On Mon, Aug 12, 2019 at 09:58:14PM +0000, Hongyi Zhao wrote: > On Mon, 12 Aug 2019 15:40:03 +0200, Greg Wooledge wrote: > > > You > > could start by telling us which DM it is (lightdm, gdm3, sddm, etc.). > > gdm3 > > And I don't know to let the limits take effect within this environment.
I don't either. First thing you can do is look for a file like /etc/pam.d/gdm3 (or possibly /etc/pam.d/gdm), and see if it contains the pam_limits.so line. If it doesn't, then you know it isn't reading /etc/security/limits.conf file, and your first step would be to add the pam_limits.so line. VERY carefully, after reading all of the PAM documentation. If it does contain this line, then perhaps you can try running a standard Debian X session instead of a GNOME session. Pick your favorite regular window manager that is NOT part of a desktop environment, put that in your ~/.xsession file, login with a Debian session, open a terminal, and see if the limits are correct. Then remove the ~/.xsession file (or restore it to whatever it was before) to go back to the way things were before, if you still want to. If the limits are correct in a terminal executed by a regular window manager inside a Debian session, then you know the PAM stuff is working correctly. If they're NOT correct inside a terminal executed by dbus inside a GNOME session, then you have some more digging to do. It's possible that they're working just fine in other pieces of your GNOME session, just not in terminals. It's possible that you may or may not care about terminals, or that you may or may not care ONLY about terminals. You're not exactly giving us much detail here.