Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having trouble setting the location of the temporary directory for the Perforce visual client (p4v) on Ubuntu 11.10.

Basically it is currently set to the current working directory. I want the temporary files to be written to /tmp. For example, when resolving a file, the temporary file written should be something like /tmp/tmp.6991.496

From the docs that looks like what the default behaviour should be anyways:

I've tried setting this environment variable a number of ways as described here: but with no success.

I installed the p4v client to /usr/local/p4v.latest/ and have /usr/local/p4v.latest/bin in my path and just launch the client with "p4v"

Any help in this is much appreciated

share|improve this question
In the same terminal from which you execute p4v, what do you see when you execute echo $TMP and echo $TEMP? On the Fedora system on which I use Perforce, both of those are empty and Perforce always creates temporary files in /tmp. However, I do all my editing and diffing from the command line and p4v might behave differently. – garyjohn Mar 28 '12 at 23:01
$TMP, or $TEMP, set or unset it doesn't appear to affect p4v. I am starting to think I cannot change that behaviour for some reason. I may have to just use command line p4 – Mike Mar 29 '12 at 13:07
Actually, using the p4 command line client also always tries to write the temporary files to current working directory. I've tried exporting TMP, TEMP, TEMPDIR, TMPDIR to no avail. The current working directory is a mounted Windows samba share if that matters... – Mike Mar 29 '12 at 14:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.