x2go creates large files in /tmp/.x2go-username when a session is saved. This is causing us trouble because /tmp is filling up and no users can log in. Our /tmp directory is too small and I don't have access to increase. We need to change the default tmp directory from /tmp to /app.
I have set TMPDIR in my .profile and also in /etc/x2go/Xsession to /app
.profile:
export TMPDIR=/app/
Xsession variables:
# initialize variables for use by all session scripts
OPTIONFILE=/etc/x2go/Xsession.options
SYSRESOURCES=/etc/x2go/Xresources
USRRESOURCES=$HOME/.Xresources-x2go
SYSSESSIONDIR=/etc/x2go/Xsession.d
USERXSESSION=$HOME/.xsession-x2go
USERXSESSIONRC=$HOME/.xsessionrc-x2go
ALTUSERXSESSION=$HOME/.Xsession-x2go
ERRFILE="${HOME}/.xsession-x2go-${cur_hostname}-errors"
TMPDIR=/app
The session still creates the tmp files in /tmp
The x2go process which is running:
leithner 16137 1 0 11:23 ? 00:00:00 sshfs -o idmap=user,uid=1007,gid=1001,default_permissions,ServerAliveInterval=300,IdentityFile=/home/leithner/.x2go/ssh/key.p14092,UserKnownHostsFile=/home/leithner/.x2go/ssh/key.p14092.ident [email protected]:/cygdrive/C/Users/SLeithne/X2GO~1/S-2E61~1/spool /tmp/.x2go-leithner/spool/C-leithner-50-1643045018_stDXFCE_dp32 -p 50660
leithner@entrada:/app$ echo $TMPDIR
/app
Where should I be changing this variable? Can it be changed?