Page 1 of 1

[SOLVED] Changing temp file location

Posted: Mon May 11, 2015 3:05 am
by CrimsonGhost
I am a new convert to linux and although I love it and am never going back, I am having some difficulties.
My file system partiton keeps filling up when I run handbrake. How can I change the location Handbrake uses for temp files to /home/$USER/temp instead of just /tmp?

Solved Edit:
This was the solution:
Woodstock wrote:If you are using the bash shell, in your home directory, there will be a file .bash_profile. (in my case it was .profile) Edit it to add this line:

Code: Select all

TMPDIR=~/temp
Once in place, the NEXT time you create a shell (or log in), the variable will be set, and handbrake should see it.

Re: Changing temp file location

Posted: Mon May 11, 2015 10:24 am
by Deleted User 11865
hb_get_temporary_directory() will honor $TMPDIR and $TEMP variables (the first takes precedence).

Re: Changing temp file location

Posted: Mon May 11, 2015 12:21 pm
by CrimsonGhost
Rodeo wrote:hb_get_temporary_directory() will honor $TMPDIR and $TEMP variables (the first takes precedence).
ok, but how do I implement that? I'm using the gui, as I'm still very noob at CLI

Re: Changing temp file location

Posted: Mon May 11, 2015 12:57 pm
by Woodstock
If you are using the bash shell, in your home directory, there will be a file .bash_profile. Edit it to add this line:

Code: Select all

TMPDIR=~/temp
Once in place, the NEXT time you create a shell (or log in), the variable will be set, and handbrake should see it.

Re: Changing temp file location

Posted: Mon May 11, 2015 1:25 pm
by CrimsonGhost
It worked, Woodstock! I had to use .profile, but same difference.
Thanks!

Re: [SOLVED] Changing temp file location

Posted: Wed May 13, 2015 10:08 am
by mod16
If you are using Ubuntu, the recommended file to add this variable would be ~/.pam_environment - but keep in mind that these are key=value pairs, so you need the full path, like: TMPDIR=/home/<yourUsername>/tmp

If you want this temp path only used by Handbrake, you also could launch the Handbrake GUI using a short script:

Code: Select all

#!/bin/bash

mkdir -p ~/.ghbtmp
TMPDIR=~/.ghbtmp ghb