]> sourceware.org Git - newlib-cygwin.git/blame - winsup/doc/cygwinenv.sgml
ChangeLog:
[newlib-cygwin.git] / winsup / doc / cygwinenv.sgml
CommitLineData
c98b30ea 1<sect1 id="using-cygwinenv"><title>The <envar>CYGWIN</envar> environment
1fd5e000
CF
2variable</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
8many global settings for the Cygwin runtime system. It contains the options
9listed below, separated by blank characters. Many options can be turned off
85f1119b 10by 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
16which single- or multibyte character set is used for file and console
17operations. Windows is using UTF-16 characters internally and this
18option specifies how 8-byte character sets are converted to UTF-16 and
19vice versa. The default setting is <envar>ansi</envar> which means,
20conversion is based on the current ANSI codepage, typically 1252 in
21many Western language versions of Windows. The name originates from the
22ANSI Latin1 (ISO 8859-1) standard, used in Windows 1.0, though the
23character sets have since diverged from any standard. The second
24setting selects an older, DOS-based character set, containing various
25line drawing and special characters. It is called <envar>oem</envar>
26since it was originally encoded in the firmware of IBM PCs by original
27equipment manufacturers (OEMs).</para>
28<para>If you find that some characters (especially non-US or 'graphical' ones)
29do not display correctly in Cygwin, you can use this option to select an
30appropriate codepage. Finally, <envar>utf8</envar> treats all file names
31and console characters as UTF-8 chars. Please note that, for correct
32operation, you have to set the environment variable LC_CTYPE to "C-UTF-8"
33for the time being. The reason is that newlib's multibyte conversion
34functions 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
39first time a user uses an "MS-DOS" style path name rather than a POSIX-style
40path name. Defaults to set.</para>
41</listitem>
42
67e810e1 43<listitem>
ac51da48 44<para><envar>(no)envcache</envar> - If set, environment variable
85f1119b 45conversions (between Win32 and POSIX) are cached. Note that this may
1fd5e000
CF
46cause problems if the mount table changes, as the cache is not invalidated
47and may contain values that depend on the previous mount table
48contents. 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
53settings are re-exported to the environment as <envar>CYGWIN</envar> again.
54Defaults 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,
61which is useful for debugging. <filename>Win32filepath</filename> is
62usually set to the path to <command>gdb</command> or
63<command>dumper</command>, for example
64<filename>C:\cygwin\bin\gdb.exe</filename>.
65There 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
71to copy memory some number of bytes at a time, in the above example
7232768 bytes (32Kb) at a time. The default is to copy as many bytes as
73possible, which is preferable in most cases but may slow some older systems
74down.
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>
80to retry n times when a child process fails due to certain windows-specific errors. These errors usually
81occur 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
87containing UNIX-style file wildcard characters (brackets, question mark,
88asterisk, escaped with \) are expanded into lists of files that match
89those wildcards.
90This is applicable only to programs running from a DOS command line prompt.
91Default is set.</para>
9f7bdd2b
CF
92<para>This option also accepts an optional <literal>[no]ignorecase</literal> modifer.
93If 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
98to 9600-8-N-1 with no flow control when used. This is done at open
99time 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
104part 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 109reflects the name of the program currently running. Default is not
85f1119b 110set.</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 116It is not compatible with some Windows programs.
ec15a786
JDF
117Defaults to not set, in which case the tty is opened in text mode.
118Note that this has been changed such that ^D works as
119expected instead of ^Z, and is settable via <command>stty</command>.
1fd5e000 120This option must be specified before starting a Cygwin shell
12d53ce6
JDF
121and it cannot be changed in the shell. It should not be set when using
122other 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
128environment variables to all-uppercase, when a Cygwin process is started
129from a non-Cygwin native Windows process. This is how it has been done
130until Cygwin 1.5. If not set, Cygwin does not change the case of environment
131variables, except for a restricted set to maintain minimal backward
132compatibility and for correct handling of certain essential variables.
133The 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
164symlinks as Windows shortcuts with a special header and the R/O attribute
165set. If not set, Cygwin creates symlinks as plain files with a magic number,
85f1119b
CV
166a path and the system attribute set. Defaults to not set since plain
167file 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>
178Some CYGWIN options have been removed in Cygwin 1.7 for one reason or another.
179These 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
185all file opens default to binary mode, unless the open mode has been specified
186explicitely 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
192real case sensitivity and the per-mount option "posix=[0|1]". For more
193information, 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
199only fakes security which is considered dangerous and useless. It also
200created an uncontrollably large file on FAT and was entirely useless
201on FAT32.</para>
202</listitem>
203
204<listitem>
205<para><envar>(no)ntsec</envar> - This option has been removed in favor of
206the per-mount option "acl"/"noacl". For more information, read the
207documentation 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
212enabled on the client side to use features only available when running
213<command>cygserver</command>. This option has been removed because Cygwin now
214always tries to contact cygserver if a function is called which requires
215cygserver being available. For more information, read the documentation
216in <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
221the per-mount option "acl"/"noacl". For more information, read the
222documentation in <xref linkend="mount-table"></xref>.</para>
223</listitem>
224
225<listitem>
226<para><envar>(no)transparent_exe</envar> - This option has been removed
227because the behaviour it switched on is now the standard behaviour in
228Cygwin.</para>
229</listitem>
230
231<listitem>
232<para><envar>(no)traverse</envar> - This option has been removed because
233traverse checking is not quite correctly implemented by Microsoft and
234it'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>
This page took 0.200931 seconds and 5 git commands to generate.