]>
Commit | Line | Data |
---|---|---|
c98b30ea | 1 | <sect1 id="using-cygwinenv"><title>The <envar>CYGWIN</envar> environment |
1fd5e000 CF |
2 | variable</title> |
3 | ||
85f1119b CV |
4 | <sect2 id="cygwinenv-implemented-options"> |
5 | <title>Implemented options</title> | |
6 | ||
c98b30ea | 7 | <para>The <envar>CYGWIN</envar> environment variable is used to configure |
1fd5e000 CF |
8 | many global settings for the Cygwin runtime system. It contains the options |
9 | listed below, separated by blank characters. Many options can be turned off | |
85f1119b | 10 | by prefixing with <literal>no</literal>.</para> |
1fd5e000 | 11 | |
c98b30ea | 12 | <itemizedlist mark="bullet"> |
46c1de5b JDF |
13 | |
14 | <listitem> | |
85f1119b CV |
15 | <para><envar>codepage:[ansi|oem|utf8]</envar> - This option controls |
16 | which single- or multibyte character set is used for file and console | |
17 | operations. Windows is using UTF-16 characters internally and this | |
18 | option specifies how 8-byte character sets are converted to UTF-16 and | |
19 | vice versa. The default setting is <envar>ansi</envar> which means, | |
20 | conversion is based on the current ANSI codepage, typically 1252 in | |
21 | many Western language versions of Windows. The name originates from the | |
22 | ANSI Latin1 (ISO 8859-1) standard, used in Windows 1.0, though the | |
23 | character sets have since diverged from any standard. The second | |
24 | setting selects an older, DOS-based character set, containing various | |
25 | line drawing and special characters. It is called <envar>oem</envar> | |
26 | since it was originally encoded in the firmware of IBM PCs by original | |
27 | equipment manufacturers (OEMs).</para> | |
28 | <para>If you find that some characters (especially non-US or 'graphical' ones) | |
29 | do not display correctly in Cygwin, you can use this option to select an | |
30 | appropriate codepage. Finally, <envar>utf8</envar> treats all file names | |
31 | and console characters as UTF-8 chars. Please note that, for correct | |
32 | operation, you have to set the environment variable LC_CTYPE to "C-UTF-8" | |
33 | for the time being. The reason is that newlib's multibyte conversion | |
34 | functions require this setting.</para> | |
46c1de5b JDF |
35 | </listitem> |
36 | ||
8fe03354 CF |
37 | <listitem> |
38 | <para><envar>(no)dosfilewarning</envar> - If set, Cygwin will warn the | |
39 | first time a user uses an "MS-DOS" style path name rather than a POSIX-style | |
40 | path name. Defaults to set.</para> | |
41 | </listitem> | |
42 | ||
67e810e1 | 43 | <listitem> |
ac51da48 | 44 | <para><envar>(no)envcache</envar> - If set, environment variable |
85f1119b | 45 | conversions (between Win32 and POSIX) are cached. Note that this may |
1fd5e000 CF |
46 | cause problems if the mount table changes, as the cache is not invalidated |
47 | and may contain values that depend on the previous mount table | |
48 | contents. Defaults to set.</para> | |
49 | </listitem> | |
85f1119b | 50 | |
1fd5e000 | 51 | <listitem> |
8fe03354 | 52 | <para><envar>(no)export</envar> - If set, the final values of these |
ac51da48 JDF |
53 | settings are re-exported to the environment as <envar>CYGWIN</envar> again. |
54 | Defaults to off.</para> | |
1fd5e000 | 55 | </listitem> |
85f1119b | 56 | |
1fd5e000 | 57 | <listitem> |
989ea484 JDF |
58 | <para> |
59 | <envar>error_start:Win32filepath</envar> - if set, runs | |
60 | <filename>Win32filepath</filename> when cygwin encounters a fatal error, | |
61 | which is useful for debugging. <filename>Win32filepath</filename> is | |
62 | usually set to the path to <command>gdb</command> or | |
63 | <command>dumper</command>, for example | |
64 | <filename>C:\cygwin\bin\gdb.exe</filename>. | |
65 | There is no default set. | |
66 | </para> | |
ac51da48 | 67 | </listitem> |
85f1119b | 68 | |
ac51da48 | 69 | <listitem> |
063fd126 | 70 | <para><envar>forkchunk:32768</envar> - causes the <function>fork()</function> |
ac51da48 JDF |
71 | to copy memory some number of bytes at a time, in the above example |
72 | 32768 bytes (32Kb) at a time. The default is to copy as many bytes as | |
73 | possible, which is preferable in most cases but may slow some older systems | |
74 | down. | |
aff8b4f9 | 75 | </para> |
ac51da48 | 76 | </listitem> |
85f1119b | 77 | |
ac51da48 | 78 | <listitem> |
0a75feea CF |
79 | <para><envar>proc_retry:n</envar> - causes the <function>fork()</function> and <function>exec*()</function> |
80 | to retry n times when a child process fails due to certain windows-specific errors. These errors usually | |
81 | occur when processes are being started while a user is logging off. | |
063fd126 CF |
82 | </para> |
83 | </listitem> | |
85f1119b | 84 | |
063fd126 | 85 | <listitem> |
ac51da48 | 86 | <para><envar>(no)glob[:ignorecase]</envar> - if set, command line arguments |
1fd5e000 CF |
87 | containing UNIX-style file wildcard characters (brackets, question mark, |
88 | asterisk, escaped with \) are expanded into lists of files that match | |
89 | those wildcards. | |
90 | This is applicable only to programs running from a DOS command line prompt. | |
91 | Default is set.</para> | |
9f7bdd2b CF |
92 | <para>This option also accepts an optional <literal>[no]ignorecase</literal> modifer. |
93 | If supplied, wildcard matching is case insensitive. The default is <literal>noignorecase</literal></para> | |
1fd5e000 | 94 | </listitem> |
85f1119b | 95 | |
f3549a04 | 96 | <listitem> |
ac51da48 | 97 | <para><envar>(no)reset_com</envar> - if set, serial ports are reset |
1fd5e000 CF |
98 | to 9600-8-N-1 with no flow control when used. This is done at open |
99 | time and when handles are inherited. Defaults to set.</para> | |
100 | </listitem> | |
85f1119b | 101 | |
ec15a786 | 102 | <listitem> |
ac51da48 | 103 | <para><envar>(no)strip_title</envar> - if set, strips the directory |
1fd5e000 CF |
104 | part off the window title, if any. Default is not set.</para> |
105 | </listitem> | |
85f1119b | 106 | |
1fd5e000 | 107 | <listitem> |
ac51da48 | 108 | <para><envar>(no)title</envar> - if set, the title bar |
1fd5e000 | 109 | reflects the name of the program currently running. Default is not |
85f1119b | 110 | set.</para> |
1fd5e000 | 111 | </listitem> |
85f1119b | 112 | |
1fd5e000 | 113 | <listitem> |
ac51da48 | 114 | <para><envar>(no)tty</envar> - if set, Cygwin enables extra support |
12d53ce6 | 115 | (i.e., termios) for UNIX-like ttys in the Windows console. |
1fd5e000 | 116 | It is not compatible with some Windows programs. |
ec15a786 JDF |
117 | Defaults to not set, in which case the tty is opened in text mode. |
118 | Note that this has been changed such that ^D works as | |
119 | expected instead of ^Z, and is settable via <command>stty</command>. | |
1fd5e000 | 120 | This option must be specified before starting a Cygwin shell |
12d53ce6 JDF |
121 | and it cannot be changed in the shell. It should not be set when using |
122 | other terminals (i.e., rxvt or xterm). | |
123 | </para> | |
1fd5e000 | 124 | </listitem> |
85f1119b | 125 | |
9df1dbea CV |
126 | <listitem> |
127 | <para><envar>(no)upcaseenv</envar> - if set, Cygwin converts all | |
128 | environment variables to all-uppercase, when a Cygwin process is started | |
129 | from a non-Cygwin native Windows process. This is how it has been done | |
130 | until Cygwin 1.5. If not set, Cygwin does not change the case of environment | |
131 | variables, except for a restricted set to maintain minimal backward | |
132 | compatibility and for correct handling of certain essential variables. | |
133 | The current list of always uppercased variables is:</para> | |
134 | <screen> | |
135 | ALLUSERSPROFILE | |
136 | COMMONPROGRAMFILES | |
137 | COMPUTERNAME | |
138 | COMSPEC | |
139 | HOME | |
140 | HOMEDRIVE | |
141 | HOMEPATH | |
142 | NUMBER_OF_PROCESSORS | |
143 | OS | |
144 | PATH | |
145 | PATHEXT | |
146 | PROCESSOR_ARCHITECTURE | |
147 | PROCESSOR_IDENTIFIER | |
148 | PROCESSOR_LEVEL | |
149 | PROCESSOR_REVISION | |
150 | PROGRAMFILES | |
151 | SYSTEMDRIVE | |
152 | SYSTEMROOT | |
153 | TEMP | |
154 | TERM | |
155 | TMP | |
156 | TMPDIR | |
157 | WINDIR | |
158 | </screen> | |
159 | <para>Defaults to not set.</para> | |
160 | </listitem> | |
161 | ||
75c566fc | 162 | <listitem> |
ac51da48 | 163 | <para><envar>(no)winsymlinks</envar> - if set, Cygwin creates |
75c566fc CV |
164 | symlinks as Windows shortcuts with a special header and the R/O attribute |
165 | set. If not set, Cygwin creates symlinks as plain files with a magic number, | |
85f1119b CV |
166 | a path and the system attribute set. Defaults to not set since plain |
167 | file symlinks are faster to write and faster to read.</para> | |
75c566fc | 168 | </listitem> |
d83c6a77 | 169 | |
1fd5e000 | 170 | </itemizedlist> |
85f1119b CV |
171 | |
172 | </sect2> | |
173 | ||
174 | <sect2 id="cygwinenv-removed-options"> | |
175 | <title>Removed options</title> | |
176 | ||
177 | <para> | |
178 | Some CYGWIN options have been removed in Cygwin 1.7 for one reason or another. | |
179 | These removed options are listed below.</para> | |
180 | ||
181 | <itemizedlist mark="bullet"> | |
d83c6a77 CV |
182 | |
183 | <listitem> | |
184 | <para><envar>(no)binmode</envar> - This option has been removed because | |
185 | all file opens default to binary mode, unless the open mode has been specified | |
186 | explicitely in the open(2) call. | |
187 | </para> | |
188 | </listitem> | |
189 | ||
85f1119b CV |
190 | <listitem> |
191 | <para><envar>check_case</envar> - This option has been removed in favor of | |
192 | real case sensitivity and the per-mount option "posix=[0|1]". For more | |
193 | information, read the documentation in <xref linkend="mount-table"></xref> and | |
194 | <xref linkend="pathnames-casesensitive"></xref>.</para> | |
195 | </listitem> | |
196 | ||
197 | <listitem> | |
198 | <para><envar>(no)ntea</envar> - This option has been removed since it | |
199 | only fakes security which is considered dangerous and useless. It also | |
200 | created an uncontrollably large file on FAT and was entirely useless | |
201 | on FAT32.</para> | |
202 | </listitem> | |
203 | ||
204 | <listitem> | |
205 | <para><envar>(no)ntsec</envar> - This option has been removed in favor of | |
206 | the per-mount option "acl"/"noacl". For more information, read the | |
207 | documentation in <xref linkend="mount-table"></xref>.</para> | |
208 | </listitem> | |
209 | ||
7ffaa17c CV |
210 | <listitem> |
211 | <para><envar>(no)server</envar> - Originally this option had to be | |
212 | enabled on the client side to use features only available when running | |
213 | <command>cygserver</command>. This option has been removed because Cygwin now | |
214 | always tries to contact cygserver if a function is called which requires | |
215 | cygserver being available. For more information, read the documentation | |
216 | in <xref linkend="using-cygserver"></xref>.</para> | |
217 | </listitem> | |
218 | ||
85f1119b CV |
219 | <listitem> |
220 | <para><envar>(no)smbntsec</envar> - This option has been removed in favor of | |
221 | the per-mount option "acl"/"noacl". For more information, read the | |
222 | documentation in <xref linkend="mount-table"></xref>.</para> | |
223 | </listitem> | |
224 | ||
225 | <listitem> | |
226 | <para><envar>(no)transparent_exe</envar> - This option has been removed | |
227 | because the behaviour it switched on is now the standard behaviour in | |
228 | Cygwin.</para> | |
229 | </listitem> | |
230 | ||
231 | <listitem> | |
232 | <para><envar>(no)traverse</envar> - This option has been removed because | |
233 | traverse checking is not quite correctly implemented by Microsoft and | |
234 | it's behaviour is getting worse with each new OS version.</para> | |
235 | </listitem> | |
d83c6a77 | 236 | |
85f1119b CV |
237 | </itemizedlist> |
238 | ||
239 | </sect2> | |
240 | ||
1fd5e000 | 241 | </sect1> |