For console logins (typical desktop or laptop), the relevant settings are for staff in /etc/login.conf. I cranked up a few settings:
# # Staff have fewer restrictions and can login even when nologins are set. # staff:\ :datasize-cur=infinity:\ :datasize-max=infinity:\ :datasize=infinity:\ :openfiles-cur=1024:\ :stacksize-cur=16M:\ :maxproc-max=512:\ :maxproc-cur=512:\ :ignorenologin:\ :requirehome@:\ :tc=default:
but for real effect in /etc/sysctl.conf I kept doubling kern.shminfo.shmall= until I had
Then I swithched browsers (to firefox). Using Libreoffice is still a gamble inside 4GB RAM, though.