Perforce 2005.1 User's Guide
<< Previous Chapter
Installing Perforce
Table of Contents
Index
Perforce on the Web
Next Chapter >>
Glossary

Appendix B
Environment Variables

This table lists all the Perforce environment variables and their definitions.

You'll find a full description of each variable in the Perforce Command Reference.

Variable
Definition

P4CHARSET

For internationalized installations only, the character set to use for Unicode translations

P4CLIENT

Name of current client workspace

P4CONFIG

File name from which values for current environment variables are to be read

P4DIFF

The name and location of the diff program used by p4 resolve and p4 diff

P4EDITOR

The editor invoked by those Perforce commands that use forms

P4HOST

Name of host computer to use. Only used if the Host: field of the current client workspace has been set in the p4 client form.

P4JOURNAL

A file that holds the database journal data, or off to disable journaling.

P4LANGUAGE

This variable is reserved for system integrators.

P4LOG

Name and path of the file to which Perforce server error and diagnostic messages are to be logged.

P4MERGE

A third-party merge program to be used by p4 resolve's merge option

P4PAGER

The program used to page output from p4 resolve's diff option

P4PASSWD

Stores the user's password as set in the p4 user form

P4PORT

For the Perforce server, the port number to listen on; for the p4 client, the name and port number of the Perforce server with which to communicate

P4ROOT

Directory in which p4d stores its files and subdirectories

P4TICKETS

Specifies the location of the ticket file

P4USER

The user's Perforce username

PWD

The directory used to resolve relative filename arguments to p4 commands

TMP

The directory to which Perforce writes its temporary files

Setting and viewing environment variables

Every operating system and shell has its own syntax for setting environment variables. The following table shows how to set the P4CLIENT environment variable in several operating systems and command shells.

OS or Shell
Environment Variable Example

UNIX: ksh, sh, bash

P4CLIENT=value ; export P4CLIENT

UNIX: csh

setenv P4CLIENT value

VMS

def/j P4CLIENT "value"

Mac MPW

set -e P4CLIENT value

Windows

p4 set P4CLIENT=value

(See the p4 set section of the Perforce Command Reference or run the command p4 help set to learn more about setting Perforce's registry variables in Windows).

Windows administrators running Perforce as a service can set variables for use by a specific service with p4 set -S svcname var=value.

To view a list of the values of all Perforce variables, use p4 set without any arguments.

On UNIX, p4 set displays the values of the associated environment variables. On Windows, p4 set displays either the MS-DOS environment variable (if set), or the value as set in the registry and whether the value was defined with p4 set (to apply to only the current user) or p4 set -s (to apply to all users on the local machine).


Perforce 2005.1 User's Guide
<< Previous Chapter
Installing Perforce
Table of Contents
Index
Perforce on the Web
Next Chapter >>
Glossary
Please send comments and questions about this manual to [email protected].
Copyright 1997-2005 Perforce Software. All rights reserved.
Last updated: 05/12/05