Page 1 of 1

Location of /tmp directory

Posted: Mon Sep 23, 2024 4:47 am
by AL12SI
Sorry if this is obvious, but does anyone know which config file controls the location of /tmp that TurboPrint uses?

The problem is it looks like TurboPrint uses /tmp for Ghostscript, but /tmp on my system is a relatively small partition, so when I print certain files TurboPrint just silently crashes (no error messages, no logs) and I can’t currently remount anything else over it because other long-running daemons have files in /tmp. I have a bigger, mostly empty partition that TurboPrint can use, but I have no idea how to tell TurboPrint to use it..

I thought the correct config file was /etc/turboprint/system.cfg but that’s not it. TurboPrint continues to use /tmp even after a systemctl restart tpdaemon

Thanks very much in advance!

Re: Location of /tmp directory

Posted: Mon Sep 23, 2024 9:16 am
by zedonet
Hello,

TurboPrint uses the temp directory specified in /etc/turboprint/system.cfg, variable TPPATH_TEMP
Ghostscript uses /tmp unless an environment variable exists, the Ghostscript documentation says:
You can change in which directory Ghostscript creates temporary files by setting the TMPDIR or TEMP environment variable to the name of the directory you want used. Ghostscript currently doesn't do a very good job of deleting temporary files if it exits because of an error; you may have to delete them manually from time to time.
It should work if you define this environment variable in the TurboPrint script that calls Ghostscript

Code: Select all

/usr/lib/cups/filter/pstoturboprint
You could put it at the beginning of the script behind the comment "#export PATH":

Code: Select all

#export PATH
export TEMP=/my/temp/directory
Instead of "/my/temp/directoy" specify your temp directory.

Re: Location of /tmp directory

Posted: Thu Sep 26, 2024 3:04 am
by AL12SI
Thank you! The location of the filter is the missing piece of the puzzle I couldn’t figure out!