2004-12-25 05:58:38 +08:00
|
|
|
<sect1 id="using-cygwinenv"><title>The <envar>CYGWIN</envar> environment
|
2000-02-18 03:38:33 +08:00
|
|
|
variable</title>
|
|
|
|
|
2004-12-25 05:58:38 +08:00
|
|
|
<para>The <envar>CYGWIN</envar> environment variable is used to configure
|
2000-02-18 03:38:33 +08:00
|
|
|
many global settings for the Cygwin runtime system. It contains the options
|
|
|
|
listed below, separated by blank characters. Many options can be turned off
|
|
|
|
by prefixing with <literal>no </literal>.</para>
|
|
|
|
|
2004-12-25 05:58:38 +08:00
|
|
|
<itemizedlist mark="bullet">
|
2000-02-18 03:38:33 +08:00
|
|
|
<listitem>
|
2004-01-11 16:32:09 +08:00
|
|
|
<para><envar>(no)binmode</envar> - if set, non-disk
|
2000-02-18 03:38:33 +08:00
|
|
|
(e.g. pipe and COM ports) file opens default to binary mode
|
2002-12-19 10:14:06 +08:00
|
|
|
(no CRLF translation) instead of text mode. Defaults to set (binary
|
|
|
|
mode). By default, devices are opened in binary mode, so this option
|
|
|
|
has little effect on normal cygwin operations.
|
|
|
|
|
|
|
|
It does affect two things, however. For non-NTFS filesystems, this
|
|
|
|
option will control the line endings for standard output/input/error
|
|
|
|
for redirection from the Windows command shell. It will also affect
|
|
|
|
the default translation mode of a pipe, although most shells set the
|
|
|
|
pipe to binary by default.
|
2000-02-18 03:38:33 +08:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2005-04-19 22:45:54 +08:00
|
|
|
<para><envar>check_case:level</envar> - THIS OPTION IS DEPRECATED.
|
|
|
|
Don't use it unless you know what you're doing and don't see any way
|
|
|
|
around it. And even then, this option is error prone, slows down Cygwin
|
|
|
|
and not well maintained. This option controls the behavior of
|
2001-04-13 05:52:38 +08:00
|
|
|
Cygwin when a user tries to open or create a file using a case different from
|
2004-05-30 14:47:09 +08:00
|
|
|
the case of the path as saved on the disk.
|
2001-04-13 05:52:38 +08:00
|
|
|
<literal>level</literal> is one of <literal>relaxed</literal>,
|
|
|
|
<literal>adjust</literal> and <literal>strict</literal>.</para>
|
2004-12-25 05:58:38 +08:00
|
|
|
<itemizedlist mark="bullet">
|
2001-04-13 05:52:38 +08:00
|
|
|
<listitem>
|
2004-01-11 16:32:09 +08:00
|
|
|
<para><envar>relaxed</envar> which is the default behaviour simply
|
2001-04-13 05:52:38 +08:00
|
|
|
ignores case. That's the default for native Windows applications as well.</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2004-01-11 16:32:09 +08:00
|
|
|
<para><envar>adjust</envar> behaves mostly invisible. The POSIX input
|
2001-04-13 05:52:38 +08:00
|
|
|
path is internally adjusted in case, so that the resulting DOS path uses the
|
|
|
|
correct case throughout. You can see the result when changing the directory
|
|
|
|
using a wrong case and calling <command>/bin/pwd</command> afterwards.</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2004-01-11 16:32:09 +08:00
|
|
|
<para><envar>strict</envar> results in a error message if the case
|
2001-04-13 05:52:38 +08:00
|
|
|
isn't correct. Trying to open a file <filename>Foo</filename> while a file
|
|
|
|
<filename>fOo</filename> exists results in a "no such file or directory"
|
|
|
|
error. Trying to create a file <filename>BAR</filename> while a file
|
|
|
|
<filename>Bar</filename> exists results in a "Filename exists with different
|
|
|
|
case" error.</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
</listitem>
|
2003-02-03 08:30:45 +08:00
|
|
|
|
|
|
|
<listitem>
|
2004-01-11 16:32:09 +08:00
|
|
|
<para><envar>codepage:[ansi|oem]</envar> - Windows console
|
2003-02-03 08:30:45 +08:00
|
|
|
applications can use different character sets (codepages) for drawing
|
|
|
|
characters. The first setting, called "ansi", is the default.
|
|
|
|
This character set contains various forms of latin characters used
|
|
|
|
in European languages. The name originates from the ANSI Latin1
|
|
|
|
(ISO 8859-1) standard, used in Windows 1.0, though the character
|
|
|
|
sets have since diverged from any standard. The second setting
|
|
|
|
selects an older, DOS-based character set, containing various line
|
|
|
|
drawing and special characters. It is called "oem" since it was
|
|
|
|
originally encoded in the firmware of IBM PCs by original
|
|
|
|
equipment manufacturers (OEMs). If you find that some characters
|
|
|
|
(especially non-US or 'graphical' ones) do not display correctly in
|
|
|
|
Cygwin, you can use this option to select an appropriate codepage.
|
2004-01-24 16:09:45 +08:00
|
|
|
</para>
|
2003-02-03 08:30:45 +08:00
|
|
|
</listitem>
|
|
|
|
|
2001-04-13 05:52:38 +08:00
|
|
|
<listitem>
|
2004-01-11 16:32:09 +08:00
|
|
|
<para><envar>(no)envcache</envar> - If set, environment variable
|
2000-02-18 03:38:33 +08:00
|
|
|
conversions (between Win32 and POSIX) are cached. Note that this is may
|
|
|
|
cause problems if the mount table changes, as the cache is not invalidated
|
|
|
|
and may contain values that depend on the previous mount table
|
|
|
|
contents. Defaults to set.</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2004-01-11 16:32:09 +08:00
|
|
|
<para><envar>(no)export</envar> - if set, the final values of these
|
|
|
|
settings are re-exported to the environment as <envar>CYGWIN</envar> again.
|
|
|
|
Defaults to off.</para>
|
2000-02-18 03:38:33 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2004-03-27 14:48:11 +08:00
|
|
|
<para>
|
|
|
|
<envar>error_start:Win32filepath</envar> - if set, runs
|
|
|
|
<filename>Win32filepath</filename> when cygwin encounters a fatal error,
|
|
|
|
which is useful for debugging. <filename>Win32filepath</filename> is
|
|
|
|
usually set to the path to <command>gdb</command> or
|
|
|
|
<command>dumper</command>, for example
|
|
|
|
<filename>C:\cygwin\bin\gdb.exe</filename>.
|
|
|
|
There is no default set.
|
|
|
|
</para>
|
2004-01-11 16:32:09 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2006-03-14 05:02:37 +08:00
|
|
|
<para><envar>forkchunk:32768</envar> - causes the <function>fork()</function>
|
2004-01-11 16:32:09 +08:00
|
|
|
to copy memory some number of bytes at a time, in the above example
|
|
|
|
32768 bytes (32Kb) at a time. The default is to copy as many bytes as
|
|
|
|
possible, which is preferable in most cases but may slow some older systems
|
|
|
|
down.
|
2004-01-24 16:09:45 +08:00
|
|
|
</para>
|
2004-01-11 16:32:09 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2006-04-03 11:37:52 +08:00
|
|
|
<para><envar>proc_retry:n</envar> - causes the <function>fork()</function> and <function>exec*()</function>
|
|
|
|
to retry n times when a child process fails due to certain windows-specific errors. These errors usually
|
|
|
|
occur when processes are being started while a user is logging off.
|
2006-03-14 05:02:37 +08:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2004-01-11 16:32:09 +08:00
|
|
|
<para><envar>(no)glob[:ignorecase]</envar> - if set, command line arguments
|
2000-02-18 03:38:33 +08:00
|
|
|
containing UNIX-style file wildcard characters (brackets, question mark,
|
|
|
|
asterisk, escaped with \) are expanded into lists of files that match
|
|
|
|
those wildcards.
|
|
|
|
This is applicable only to programs running from a DOS command line prompt.
|
|
|
|
Default is set.</para>
|
2000-11-19 12:53:46 +08:00
|
|
|
<para>This option also accepts an optional <literal>[no]ignorecase</literal> modifer.
|
|
|
|
If supplied, wildcard matching is case insensitive. The default is <literal>noignorecase</literal></para>
|
2000-02-18 03:38:33 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2005-09-15 16:24:46 +08:00
|
|
|
<para><envar>(no)ntea</envar> - if set, use NT Extended Attributes to
|
|
|
|
store UNIX-like inode information.
|
|
|
|
This option only operates under Windows NT. Defaults to not set.
|
|
|
|
Only FAT and NTFS support Extended Attributes, not FAT32, so it's
|
|
|
|
of no use there. Furthermore, on NTFS partitions ntsec, which provides
|
|
|
|
real permissions, overrides ntea, which only provides faked permissions.
|
|
|
|
So setting ntea only makes sense if you either have FAT partitions,
|
|
|
|
or if you switch off ntsec explicitely. </para>
|
2004-12-25 05:58:38 +08:00
|
|
|
<warning><title>Warning!</title> <para>This may create additional
|
2005-09-15 16:24:46 +08:00
|
|
|
<emphasis>large</emphasis> files on FAT partitions.</para></warning>
|
2000-02-18 03:38:33 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2004-01-11 16:32:09 +08:00
|
|
|
<para><envar>(no)ntsec</envar> - if set, use the NT security
|
2000-02-18 03:38:33 +08:00
|
|
|
model to set UNIX-like permissions on files and processes. The
|
2005-09-15 16:24:46 +08:00
|
|
|
file permissions can only be set on NTFS partitions. FAT/FAT32 don't
|
2004-01-11 16:32:09 +08:00
|
|
|
support the NT file security. Defaults to set. For more information, read
|
2004-12-25 05:58:38 +08:00
|
|
|
the documentation in <xref linkend="ntsec"></xref>.</para>
|
2000-02-18 03:38:33 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2004-01-11 16:32:09 +08:00
|
|
|
<para><envar>(no)smbntsec</envar> - if set, use <envar>ntsec</envar> on remote
|
2004-09-24 17:47:10 +08:00
|
|
|
drives as well (default is "nosmbntesc"). When setting "smbntsec" there's
|
|
|
|
a chance that you get problems with Samba shares so you should use this
|
|
|
|
option with care. One reason for a non working <envar>ntsec</envar> on
|
|
|
|
remote drives could be insufficient permissions of the users. The requires
|
|
|
|
user rights are somewhat dangerous (SeRestorePrivilege), so it's not always
|
|
|
|
an option to grant that rights to users. However, this shouldn't be a
|
|
|
|
problem in NT domain environments.</para>
|
2000-12-20 04:14:34 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2004-01-11 16:32:09 +08:00
|
|
|
<para><envar>(no)reset_com</envar> - if set, serial ports are reset
|
2000-02-18 03:38:33 +08:00
|
|
|
to 9600-8-N-1 with no flow control when used. This is done at open
|
|
|
|
time and when handles are inherited. Defaults to set.</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2004-02-16 20:22:14 +08:00
|
|
|
<para><envar>(no)server</envar> - if set, allows client applications
|
|
|
|
to use the Cygserver facilities. This option must be enabled explicitely
|
|
|
|
on the client side, otherwise your applications won't be able to use the
|
2004-02-20 15:26:16 +08:00
|
|
|
XSI IPC function calls (<function>msgget</function>,
|
|
|
|
<function>semget</function>, <function>shmget</function>, and friends)
|
|
|
|
successfully. These function calls will return with
|
|
|
|
<literal>ENOSYS</literal>, "Bad system call".
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2004-01-11 16:32:09 +08:00
|
|
|
<para><envar>(no)strip_title</envar> - if set, strips the directory
|
2000-02-18 03:38:33 +08:00
|
|
|
part off the window title, if any. Default is not set.</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2004-01-11 16:32:09 +08:00
|
|
|
<para><envar>(no)title</envar> - if set, the title bar
|
2000-02-18 03:38:33 +08:00
|
|
|
reflects the name of the program currently running. Default is not
|
|
|
|
set. Note that under Win9x the title bar is always enabled and it is
|
|
|
|
stripped by default, but this is because of the way Win9x works. In
|
|
|
|
order not to strip, specify <literal>title</literal> or <literal>title
|
|
|
|
nostrip_title</literal>.</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2006-02-06 02:19:16 +08:00
|
|
|
<para><envar>(no)transparent_exe</envar> - EXPERIMENTAL. Only use this
|
|
|
|
option if you're confident to be able to live with the consequences. If
|
|
|
|
set, several additional functions in Cygwin will handle files with .exe
|
|
|
|
suffix transparently. These functions are <function>link(2)</function>,
|
|
|
|
<function>open(2)</function>, <function>rename(2)</function>,
|
|
|
|
<function>symlink(2)</function>, <function>unlink(2)</function>,
|
|
|
|
<function>pathconf(3)</function>. So far, these functions have been
|
|
|
|
treated as too dangerous to act on files with .exe suffix if the .exe
|
|
|
|
suffix wasn't given explicitely in the file name argument, and this is
|
|
|
|
still the case if the transparent_exe option is not set. Default is not
|
2006-03-07 17:21:28 +08:00
|
|
|
set.</para>
|
2006-02-06 02:19:16 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2005-02-01 04:03:20 +08:00
|
|
|
<para><envar>(no)traverse</envar> - This option only affects NT systems.
|
|
|
|
If set, Cygwin handles file permissions so that the parent directories'
|
|
|
|
permissions are checked, as it's default on POSIX systems. If not set,
|
|
|
|
only the file's own permissions are taken into account. This is the
|
2005-04-16 21:16:25 +08:00
|
|
|
default on Windows and called "bypass traverse checking". Default was
|
|
|
|
"traverse" in version 1.5.13 and 1.5.14. Beginning with 1.5.15, traverse
|
|
|
|
checking is disabled again since it's not correctly implemented by Microsoft
|
|
|
|
and it's behaviour is getting worse with each new OS version. Unprivileged
|
|
|
|
terminal server sessions are practically impossible with traverse checking
|
|
|
|
switched on. So, use at your own risk.</para>
|
2005-02-01 04:03:20 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2004-01-11 16:32:09 +08:00
|
|
|
<para><envar>(no)tty</envar> - if set, Cygwin enables extra support
|
2005-07-11 03:39:31 +08:00
|
|
|
(i.e., termios) for UNIX-like ttys in the Windows console.
|
2000-02-18 03:38:33 +08:00
|
|
|
It is not compatible with some Windows programs.
|
2004-02-20 15:26:16 +08:00
|
|
|
Defaults to not set, in which case the tty is opened in text mode.
|
|
|
|
Note that this has been changed such that ^D works as
|
|
|
|
expected instead of ^Z, and is settable via <command>stty</command>.
|
2000-02-18 03:38:33 +08:00
|
|
|
This option must be specified before starting a Cygwin shell
|
2005-07-11 03:39:31 +08:00
|
|
|
and it cannot be changed in the shell. It should not be set when using
|
|
|
|
other terminals (i.e., rxvt or xterm).
|
|
|
|
</para>
|
2000-02-18 03:38:33 +08:00
|
|
|
</listitem>
|
2001-03-02 20:05:31 +08:00
|
|
|
<listitem>
|
2004-01-11 16:32:09 +08:00
|
|
|
<para><envar>(no)winsymlinks</envar> - if set, Cygwin creates
|
2001-03-02 20:05:31 +08:00
|
|
|
symlinks as Windows shortcuts with a special header and the R/O attribute
|
|
|
|
set. If not set, Cygwin creates symlinks as plain files with a magic number,
|
|
|
|
a path and the system attribute set. Defaults to set.</para>
|
|
|
|
</listitem>
|
2000-02-18 03:38:33 +08:00
|
|
|
</itemizedlist>
|
|
|
|
</sect1>
|