2000-09-13 17:13:17 +02:00
|
|
|
|
@section Using Cygwin
|
|
|
|
|
|
2002-03-03 12:37:35 +01:00
|
|
|
|
@subsection Why can't my application locate cygncurses5.dll? or cygintl.dll? or cygreadline5.dll? or ...?
|
2001-10-10 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
If you upgraded recently, and suddenly vim (or some other Cygwin
|
2002-03-03 12:37:35 +01:00
|
|
|
|
application) cannot find @code{cygncurses5.dll}, it means that you did
|
|
|
|
|
not follow these instructions properly:
|
2001-10-10 11:21:55 +02:00
|
|
|
|
@file{http://cygwin.com/ml/cygwin-announce/2001/msg00124.html}. To
|
2002-03-03 12:37:35 +01:00
|
|
|
|
repair the damage, you must run Cygwin Setup again, and re-install the
|
2001-10-10 11:21:55 +02:00
|
|
|
|
@samp{libncurses5} package.
|
|
|
|
|
|
2002-03-03 12:37:35 +01:00
|
|
|
|
Note that Cygwin Setup won't show this option by default. In the
|
2004-06-14 04:42:05 +02:00
|
|
|
|
``Select packages to install'' dialog, click on the @samp{Full/Part}
|
2001-10-10 11:21:55 +02:00
|
|
|
|
button. This lists all packages, even those that are already
|
|
|
|
|
installed. Scroll down to locate the @samp{libncurses5} package.
|
|
|
|
|
Click on the ``cycle'' glyph until it says ``Reinstall''. Continue
|
2002-03-03 12:37:35 +01:00
|
|
|
|
with the installation.
|
|
|
|
|
|
|
|
|
|
Similarly, if something cannot find @code{cygintl.dll}, then run
|
|
|
|
|
Cygwin Setup and re-install the @samp{libintl} and @samp{libintl1}
|
|
|
|
|
packages.
|
|
|
|
|
|
|
|
|
|
For a detailed explanation of the general problem, and how to extend
|
|
|
|
|
it to other missing DLLs (like cygreadline5.dll) and identify their
|
|
|
|
|
containing packages, see
|
|
|
|
|
@file{http://cygwin.com/ml/cygwin/2002-01/msg01619.html}.
|
2001-10-10 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
@subsection Why is Cygwin suddenly @emph{so} slow?
|
|
|
|
|
|
2004-09-30 07:03:52 +02:00
|
|
|
|
If you recently upgraded and suddenly @emph{every} command takes a
|
|
|
|
|
@emph{very} long time, then something is probably attempting to
|
|
|
|
|
access a network share. You may have the obsolete @code{//c}
|
|
|
|
|
notation in your PATH or startup files. This now means the
|
|
|
|
|
@emph{network share} @code{c}, which will slow things down
|
|
|
|
|
tremendously if it does not exist.
|
2001-10-10 11:21:55 +02:00
|
|
|
|
|
2004-09-30 07:03:52 +02:00
|
|
|
|
Using //c (for C:) doesn't work anymore. (Similarly for any drive
|
|
|
|
|
letter, e.g. @code{//z} for @code{Z:}) This ``feature'' has long been
|
|
|
|
|
deprecated, and no longer works at all in the latest release. As of
|
|
|
|
|
release 1.3.3, @code{//c} now means the @emph{network share} @code{c}.
|
2001-10-10 11:21:55 +02:00
|
|
|
|
For a detailed discussion of why this change was made, and how deal
|
|
|
|
|
with it now, refer to
|
2001-09-20 23:23:17 +02:00
|
|
|
|
@file{http://sources.redhat.com/ml/cygwin/2001-09/msg00014.html}.
|
|
|
|
|
|
2004-09-30 07:19:27 +02:00
|
|
|
|
@subsection Why don't my services work (or access network shares)?
|
2004-09-30 07:03:52 +02:00
|
|
|
|
|
2004-09-30 21:58:07 +02:00
|
|
|
|
Most Windows services run as a special user called @samp{SYSTEM}. If you
|
|
|
|
|
installed Cygwin for "Just Me", the @samp{SYSTEM} user won't see your
|
2004-09-30 07:19:27 +02:00
|
|
|
|
Cygwin mount table. You need to re-mount all of your mounts as
|
2004-09-30 21:58:07 +02:00
|
|
|
|
"system" for services to work. You can re-run @samp{setup.exe} and
|
|
|
|
|
select "Install for All Users", or this script will do the trick:
|
2004-09-30 07:19:27 +02:00
|
|
|
|
|
|
|
|
|
@example
|
|
|
|
|
eval "`mount -m | sed -e 's/ -u / -s /g' -e 's/$/;/'`"
|
|
|
|
|
@end example
|
|
|
|
|
|
2004-09-30 21:58:07 +02:00
|
|
|
|
The @samp{SYSTEM} user cannot access network shares that require
|
2004-09-30 07:19:27 +02:00
|
|
|
|
authentication. For more information, see
|
2004-09-30 07:03:52 +02:00
|
|
|
|
@file{http://cygwin.com/cygwin-ug-net/ntsec.html}.
|
|
|
|
|
|
|
|
|
|
Workarounds include using public network share that does not require
|
|
|
|
|
authentication (for non-critical files), or running the service as
|
2004-09-30 21:58:07 +02:00
|
|
|
|
your own user with @samp{cygrunsrv -u} (see
|
|
|
|
|
@samp{/usr/share/doc/Cygwin/cygrunsrv.README} for more information).
|
2000-09-13 17:13:17 +02:00
|
|
|
|
|
2004-09-30 07:19:27 +02:00
|
|
|
|
@subsection How should I set my PATH?
|
|
|
|
|
|
2001-05-29 17:19:25 +02:00
|
|
|
|
This is done for you in the file /etc/profile, which is sourced by bash
|
|
|
|
|
when you start it from the Desktop or Start Menu shortcut, created by
|
|
|
|
|
@code{setup.exe}. The line is
|
2000-09-13 17:13:17 +02:00
|
|
|
|
|
|
|
|
|
@example
|
2001-05-29 17:19:25 +02:00
|
|
|
|
PATH="/usr/local/bin:/usr/bin:/bin:$PATH"
|
2000-09-13 17:13:17 +02:00
|
|
|
|
@end example
|
|
|
|
|
|
2001-05-29 17:19:25 +02:00
|
|
|
|
Effectively, this @strong{prepends} /usr/local/bin and /usr/bin to your
|
2000-09-13 17:13:17 +02:00
|
|
|
|
Windows system path. If you choose to reset your PATH, say in
|
2001-05-29 17:19:25 +02:00
|
|
|
|
$HOME/.bashrc, or by editing etc/profile directly, then you should
|
|
|
|
|
follow this rule. You @strong{must} have @code{/usr/bin} in your PATH
|
|
|
|
|
@strong{before} any Windows system directories. (And you must not omit
|
|
|
|
|
the Windows system directories!) Otherwise you will likely encounter
|
|
|
|
|
all sorts of problems running Cygwin applications.
|
2000-09-13 17:13:17 +02:00
|
|
|
|
|
2000-11-29 17:24:59 +01:00
|
|
|
|
@subsection Bash says "command not found", but it's right there!
|
|
|
|
|
|
|
|
|
|
If you compile a program, you might find that you can't run it:
|
|
|
|
|
|
|
|
|
|
@example
|
|
|
|
|
bash$ gcc -o hello hello.c
|
|
|
|
|
bash$ hello
|
|
|
|
|
bash: hello: command not found
|
|
|
|
|
@end example
|
|
|
|
|
|
|
|
|
|
Unlike Windows, bash does not look for programs in @samp{.} (the current
|
|
|
|
|
directory) by default. You can add @samp{.} to your PATH (see above),
|
|
|
|
|
but this is not recommended (at least on UNIX) for security reasons.
|
|
|
|
|
Just tell bash where to find it, when you type it on the command line:
|
|
|
|
|
|
|
|
|
|
@example
|
|
|
|
|
bash$ gcc -o hello hello.c
|
|
|
|
|
bash$ ./hello
|
|
|
|
|
Hello World!
|
|
|
|
|
@end example
|
|
|
|
|
|
2000-09-13 17:13:17 +02:00
|
|
|
|
@subsection How do I convert between Windows and UNIX paths?
|
|
|
|
|
|
2002-11-13 01:23:18 +01:00
|
|
|
|
Use the 'cygpath' utility. Type '@code{cygpath --help}' for
|
|
|
|
|
information. For example (on my installation):
|
2000-09-13 17:13:17 +02:00
|
|
|
|
@example
|
|
|
|
|
bash$ cygpath --windows ~/.bashrc
|
|
|
|
|
D:\starksb\.bashrc
|
|
|
|
|
bash$ cygpath --unix C:/cygwin/bin/cygwin.bat
|
|
|
|
|
/usr/bin/cygwin.bat
|
|
|
|
|
bash$ cygpath --unix C:\\cygwin\\bin\\cygwin.bat
|
|
|
|
|
/usr/bin/cygwin.bat
|
|
|
|
|
@end example
|
|
|
|
|
Note that bash interprets the backslash '\' as an escape character, so
|
2001-03-17 19:50:22 +01:00
|
|
|
|
you must type it twice in the bash shell if you want it to be recognized
|
2000-09-13 17:13:17 +02:00
|
|
|
|
as such.
|
|
|
|
|
|
|
|
|
|
@subsection Why doesn't bash read my .bashrc file on startup?
|
|
|
|
|
|
|
|
|
|
Your .bashrc is read from your home directory specified by the HOME
|
|
|
|
|
environment variable. It uses /.bashrc if HOME is not set. So you need
|
|
|
|
|
to set HOME correctly, or move your .bashrc to the top of the drive
|
|
|
|
|
mounted as / in Cygwin.
|
|
|
|
|
|
|
|
|
|
@subsection How can I get bash filename completion to be case insensitive?
|
|
|
|
|
|
2001-09-23 13:19:13 +02:00
|
|
|
|
Add the following to your @code{~/.bashrc} file:
|
|
|
|
|
|
|
|
|
|
@example
|
|
|
|
|
shopt -s nocaseglob
|
|
|
|
|
@end example
|
|
|
|
|
|
|
|
|
|
and add the following to your @code{~/.inputrc} file:
|
|
|
|
|
|
|
|
|
|
@example
|
|
|
|
|
set completion-ignore-case on
|
|
|
|
|
@end example
|
2000-09-13 17:13:17 +02:00
|
|
|
|
|
|
|
|
|
@subsection Can I use paths/filenames containing spaces in them?
|
|
|
|
|
|
|
|
|
|
Cygwin does support spaces in filenames and paths. That said, some
|
|
|
|
|
utilities that use the library may not, since files don't typically
|
|
|
|
|
contain spaces in Unix. If you stumble into problems with this, you
|
|
|
|
|
will need to either fix the utilities or stop using spaces in filenames
|
|
|
|
|
used by Cygwin tools.
|
|
|
|
|
|
|
|
|
|
In particular, bash interprets space as a word separator. You would have
|
|
|
|
|
to quote a filename containing spaces, or escape the space character.
|
|
|
|
|
For example:
|
|
|
|
|
@example
|
|
|
|
|
bash-2.03$ cd '/cygdrive/c/Program Files'
|
|
|
|
|
@end example
|
|
|
|
|
or
|
|
|
|
|
@example
|
|
|
|
|
bash-2.03$ cd /cygdrive/c/Program\ Files
|
|
|
|
|
@end example
|
|
|
|
|
|
|
|
|
|
@subsection Why can't I cd into a shortcut to a directory?
|
|
|
|
|
|
2005-01-28 10:10:22 +01:00
|
|
|
|
Cygwin versions < 1.3.0 do not follow MS Windows Explorer Shortcuts
|
|
|
|
|
(*.lnk files). It sees a shortcut as a regular file and this you
|
|
|
|
|
cannot "cd" into it.
|
|
|
|
|
|
|
|
|
|
Since version 1.3.0, Cygwin uses shortcuts as symlinks by default.
|
|
|
|
|
|
|
|
|
|
Cygwin shortcuts are different from shortcuts created by native Windows
|
|
|
|
|
applications. Windows applications can usually make use of Cygwin
|
|
|
|
|
shortcuts but not vice versa. This is by choice. The reason is that
|
|
|
|
|
Windows shortcuts may contain a bunch of extra information which would
|
|
|
|
|
get lost, if, for example, Cygwin tar archives and extracts them as
|
|
|
|
|
symlinks.
|
|
|
|
|
|
|
|
|
|
Changing a Cygwin shortcut in Windows Explorer usually changes a Cygwin
|
|
|
|
|
shortcut into a Windows native shortcut. Afterwards, Cygwin will not
|
|
|
|
|
recognize it as symlink anymore.
|
2001-03-02 13:05:31 +01:00
|
|
|
|
|
2000-09-13 17:13:17 +02:00
|
|
|
|
@subsection I'm having basic problems with find. Why?
|
|
|
|
|
|
|
|
|
|
Make sure you are using the find that came with Cygwin and that you
|
|
|
|
|
aren't picking up the Win32 find command instead. You can verify that
|
|
|
|
|
you are getting the right one by doing a "type find" in bash.
|
|
|
|
|
|
2000-11-17 15:04:59 +01:00
|
|
|
|
If the path argument to find, including current directory (default), is
|
|
|
|
|
itself a symbolic link, then find will not traverse it unless you
|
|
|
|
|
specify the @samp{-follow} option. This behavior is different than most
|
|
|
|
|
other UNIX implementations, but is not likely to change.
|
|
|
|
|
|
2004-07-16 16:17:15 +02:00
|
|
|
|
If find does not seem to be producing enough results, or seems to be
|
|
|
|
|
missing out some directories, you may be experiencing a problem with one
|
|
|
|
|
of find's optimisations. The absence of @samp{.} and @samp{..}
|
|
|
|
|
directories on some filesystems, such as DVD-R UDF, can confuse find.
|
|
|
|
|
See the documentation for the option @samp{-noleaf} in the man page.
|
|
|
|
|
|
2003-11-04 23:05:31 +01:00
|
|
|
|
@subsection Why doesn't @samp{su} work?
|
2001-07-06 01:29:43 +02:00
|
|
|
|
|
2003-11-04 23:05:31 +01:00
|
|
|
|
The @samp{su} command has been in and out of Cygwin distributions, but
|
|
|
|
|
it has not been ported to Cygwin and has never worked. It is
|
|
|
|
|
currently installed as part of the sh-utils, but again, it does not work.
|
|
|
|
|
|
|
|
|
|
You may be able to use @samp{login} instead, but you should read
|
2001-07-06 01:29:43 +02:00
|
|
|
|
@file{http://www.cygwin.com/ml/cygwin/2001-03/msg00337.html} first.
|
|
|
|
|
|
2003-11-04 23:05:31 +01:00
|
|
|
|
For some technical background into why @samp{su} doesn't work, read
|
|
|
|
|
@file{http://www.cygwin.com/ml/cygwin/2003-06/msg00897.html} and
|
|
|
|
|
related messages.
|
2001-07-06 01:29:43 +02:00
|
|
|
|
|
2001-07-04 23:14:41 +02:00
|
|
|
|
@subsection Why doesn't man (or apropos) work?
|
2000-09-26 16:55:51 +02:00
|
|
|
|
|
|
|
|
|
Even after installing the @samp{man} package, you get an error like this:
|
|
|
|
|
|
|
|
|
|
@example
|
2001-07-04 23:14:41 +02:00
|
|
|
|
bash-2.04$ man man
|
2000-09-26 16:55:51 +02:00
|
|
|
|
Error executing formatting or display command.
|
|
|
|
|
System command (cd /usr/man ; (echo -e ".pl 1100i"; cat /usr/man/man1/man.1; echo ".pl \n(nlu+10") | /usr/bin/tbl | /usr/bin/groff -Tascii -mandoc | less -is) exited with status 32512.
|
|
|
|
|
No manual entry for man
|
|
|
|
|
@end example
|
|
|
|
|
|
|
|
|
|
You also need /bin/sh, which is found in the @samp{ash} package.
|
2001-07-04 23:14:41 +02:00
|
|
|
|
You must install this too.
|
|
|
|
|
|
|
|
|
|
In addition, before you can use @samp{man -k} or @samp{apropos}, you
|
|
|
|
|
must create the whatis database. Just run the command
|
|
|
|
|
|
|
|
|
|
@example
|
|
|
|
|
/usr/sbin/makewhatis
|
|
|
|
|
@end example
|
|
|
|
|
|
|
|
|
|
(it may take a minute to complete).
|
2000-09-26 16:55:51 +02:00
|
|
|
|
|
2000-09-14 17:42:41 +02:00
|
|
|
|
@subsection Why doesn't chmod work?
|
|
|
|
|
|
2002-11-18 00:49:14 +01:00
|
|
|
|
@samp{ntsec} will allow UNIX permissions in Windows NT on NTFS file
|
|
|
|
|
systems. This is on by default (a recent change).
|
2000-09-14 17:42:41 +02:00
|
|
|
|
|
|
|
|
|
@samp{ntea} works on NTFS @emph{and} FAT but it creates a huge,
|
|
|
|
|
@strong{undeletable} file on FAT filesystems.
|
|
|
|
|
|
2000-11-22 14:07:14 +01:00
|
|
|
|
(The @samp{ntsec} and @samp{ntea} settings are values for the
|
|
|
|
|
@samp{CYGWIN} environment variable. See the Cygwin User's Guide at
|
|
|
|
|
@file{http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html} for more
|
|
|
|
|
information on this variable and its settings.)
|
|
|
|
|
|
2000-09-14 17:42:41 +02:00
|
|
|
|
There is no solution at all for Windows 9x.
|
|
|
|
|
|
2000-11-22 14:07:14 +01:00
|
|
|
|
If you have an application that requires a certain permission mode on a
|
|
|
|
|
file, you may be able to work around this requirement by modifying the
|
|
|
|
|
application's source code. For a hint, based on work done by Corinna
|
|
|
|
|
Vinschen for OpenSSH, see this message from the cygwin mailing list:
|
|
|
|
|
@file{http://cygwin.com/ml/cygwin/2000-11/msg01176.html}.
|
2000-09-14 17:42:41 +02:00
|
|
|
|
|
2000-11-16 16:08:35 +01:00
|
|
|
|
@subsection Why doesn't @samp{mkdir -p} work on a network share?
|
|
|
|
|
|
2005-05-28 22:35:58 +02:00
|
|
|
|
Starting with @samp{coreutils-5.3.0-6} and @samp{cygwin-1.5.17}, you can
|
|
|
|
|
do something like this:
|
2000-11-16 16:08:35 +01:00
|
|
|
|
|
|
|
|
|
@example
|
|
|
|
|
bash$ mkdir -p //MACHINE/Share/path/to/new/dir
|
|
|
|
|
@end example
|
|
|
|
|
|
2005-05-28 22:35:58 +02:00
|
|
|
|
However, coreutils expects Unix path names, so something like
|
|
|
|
|
@samp{mkdir -p \\\\machine\\share\\path} will fail.
|
2000-11-16 16:08:35 +01:00
|
|
|
|
|
2001-05-29 20:11:29 +02:00
|
|
|
|
@subsection Why doesn't my shell script work?
|
2000-11-17 12:40:06 +01:00
|
|
|
|
|
|
|
|
|
There are two basic problems you might run into. One is the fact that
|
2002-01-23 23:35:58 +01:00
|
|
|
|
/bin/sh is really ash, and is missing some features you might expect
|
|
|
|
|
in /bin/sh, particularly if you are used to /bin/sh actually being
|
|
|
|
|
bash (Linux) or ksh (Tru64). For example:
|
2000-11-17 12:40:06 +01:00
|
|
|
|
|
|
|
|
|
@itemize bullet
|
2003-04-09 00:24:27 +02:00
|
|
|
|
@item No `~' expansion (use $HOME instead)
|
2000-11-17 12:40:06 +01:00
|
|
|
|
@item No job control
|
|
|
|
|
@item No getopts
|
2002-01-23 23:35:58 +01:00
|
|
|
|
@item No let
|
2000-11-17 12:40:06 +01:00
|
|
|
|
@item No functions exported
|
2001-05-29 20:11:29 +02:00
|
|
|
|
@item Must use `.' instead of `source' (true of sh and ksh too, not just ash)
|
2000-11-17 12:40:06 +01:00
|
|
|
|
@end itemize
|
|
|
|
|
|
2002-01-23 23:35:58 +01:00
|
|
|
|
Or, it could be a permission problem, and Cygwin doesn't understand that
|
2000-11-17 12:40:06 +01:00
|
|
|
|
your script is executable. Because @samp{chmod} may not work (see FAQ
|
|
|
|
|
entry above), Cygwin must read the contents of files to determine if
|
|
|
|
|
they are executable. If your script does not start with
|
|
|
|
|
|
|
|
|
|
@example
|
|
|
|
|
#! /bin/sh
|
|
|
|
|
@end example
|
|
|
|
|
|
|
|
|
|
(or any path to a script interpreter, it does not have to be /bin/sh)
|
2000-11-17 13:10:04 +01:00
|
|
|
|
then Cygwin will not know it is an executable script. The Bourne shell
|
|
|
|
|
idiom
|
2000-11-17 12:40:06 +01:00
|
|
|
|
|
|
|
|
|
@example
|
|
|
|
|
:
|
|
|
|
|
# This is the 2nd line, assume processing by /bin/sh
|
|
|
|
|
@end example
|
|
|
|
|
|
2000-11-17 13:10:04 +01:00
|
|
|
|
also works.
|
|
|
|
|
|
|
|
|
|
Note that you can use @samp{mount -x} to force Cygwin to treat all files
|
|
|
|
|
under the mount point as executable. This can be used for individual
|
|
|
|
|
files as well as directories. Then Cygwin will not bother to read files
|
|
|
|
|
to determine whether they are executable.
|
2000-11-17 12:40:06 +01:00
|
|
|
|
|
2001-05-30 11:42:36 +02:00
|
|
|
|
@subsection How do I print under Cygwin?
|
|
|
|
|
|
2001-07-05 00:54:16 +02:00
|
|
|
|
There is no working lp or lpr system as you would find on UNIX.
|
|
|
|
|
|
2001-07-05 00:52:58 +02:00
|
|
|
|
Jason Tishler has written a couple of messages that explain how to use
|
|
|
|
|
a2ps (for nicely formatted text in PostScript) and ghostscript (to print
|
|
|
|
|
PostScript files on non-PostScript Windows printers). Start at
|
|
|
|
|
@file{http://cygwin.com/ml/cygwin/2001-04/msg00657.html}. Note that the
|
|
|
|
|
@samp{file} command is now available as part of Cygwin setup.
|
|
|
|
|
|
|
|
|
|
Alternatively, on NT, you can use the Windows @samp{print} command. (It
|
|
|
|
|
does not seem to be available on Win9x.) Type
|
|
|
|
|
|
|
|
|
|
@example
|
|
|
|
|
bash$ print /\?
|
|
|
|
|
@end example
|
|
|
|
|
|
|
|
|
|
for usage instructions (note the @samp{?} must be escaped from the
|
|
|
|
|
shell).
|
|
|
|
|
|
|
|
|
|
Finally, you can simply @samp{cat} the file to the printer's share name:
|
|
|
|
|
|
|
|
|
|
@example
|
|
|
|
|
bash$ cat myfile > //host/printer
|
|
|
|
|
@end example
|
|
|
|
|
|
|
|
|
|
You may need to press the formfeed button on your printer or append the
|
|
|
|
|
formfeed character to your file.
|
2001-05-30 11:42:36 +02:00
|
|
|
|
|
2004-12-03 06:30:52 +01:00
|
|
|
|
@subsection Why don't international (Unicode) characters work?
|
2001-07-06 02:30:23 +02:00
|
|
|
|
|
2004-12-03 06:30:52 +01:00
|
|
|
|
Internationalization is a complex issue. The short answer is that
|
|
|
|
|
Cygwin is not Unicode-aware, so things that might work in Linux will
|
|
|
|
|
not necessarily work on Cygwin. However, some things do work. To type
|
|
|
|
|
international characters (<28><><EFBFBD><EFBFBD>) in @code{bash}, add the following
|
|
|
|
|
lines to your @code{~/.inputrc} file and restart @code{bash}:
|
2001-07-06 02:30:23 +02:00
|
|
|
|
|
|
|
|
|
@example
|
|
|
|
|
set meta-flag on
|
|
|
|
|
set convert-meta off
|
|
|
|
|
set output-meta on
|
2004-12-03 06:30:52 +01:00
|
|
|
|
set input-meta on
|
|
|
|
|
set kanji-code sjis
|
|
|
|
|
set meta-flag on
|
2001-07-06 02:30:23 +02:00
|
|
|
|
@end example
|
|
|
|
|
|
|
|
|
|
These are options to the @code{readline} library, which you can read
|
2004-01-20 18:20:34 +01:00
|
|
|
|
about in the @code{bash(1)} and @code{readline(3)} man pages. Other
|
2004-12-03 06:30:52 +01:00
|
|
|
|
tools that do not use @code{readline} for display, such as @code{less}
|
|
|
|
|
and @code{ls}, require additional settings, which could be put in your
|
2004-01-20 18:20:34 +01:00
|
|
|
|
@code{~/.bashrc}:
|
|
|
|
|
@example
|
|
|
|
|
alias less='/bin/less -r'
|
|
|
|
|
alias ls='/bin/ls -F --color=tty --show-control-chars'
|
2004-12-03 06:30:52 +01:00
|
|
|
|
export LANG="ja_JP.SJIS"
|
|
|
|
|
export OUTPUT_CHARSET="sjis"
|
2004-01-20 18:20:34 +01:00
|
|
|
|
@end example
|
2004-12-03 06:30:52 +01:00
|
|
|
|
These examples use the Japanese Shift-JIS character set, obviously
|
|
|
|
|
you will want to change them for your own locale.
|
2004-01-20 18:20:34 +01:00
|
|
|
|
|
2001-07-06 02:30:23 +02:00
|
|
|
|
|
2000-09-13 17:13:17 +02:00
|
|
|
|
@subsection Why don't cursor keys work under Win95/Win98?
|
|
|
|
|
|
|
|
|
|
@strong{(Please note: This section has not yet been updated for the latest
|
|
|
|
|
net release.)}
|
|
|
|
|
|
|
|
|
|
Careful examination shows that they not just non-functional, but
|
|
|
|
|
rather behave strangely, for example, with NumLock off, keys on numeric
|
|
|
|
|
keyboard work, until you press usual cursor keys, when even numeric
|
|
|
|
|
stop working, but they start working again after hitting alphanumeric
|
|
|
|
|
key, etc. This reported to happen on localized versions of Win98 and
|
2004-06-14 04:42:05 +02:00
|
|
|
|
Win95, and not specific to Cygwin; there are known cases of Alt+Enter
|
2000-09-13 17:13:17 +02:00
|
|
|
|
(fullscreen/windowed toggle) not working and shifts sticking with
|
2004-06-14 04:42:05 +02:00
|
|
|
|
other programs. The cause of this problem is Microsoft keyboard
|
2000-09-13 17:13:17 +02:00
|
|
|
|
localizer which by default installed in 'autoexec.bat'. Corresponding
|
|
|
|
|
line looks like:
|
|
|
|
|
|
|
|
|
|
@example
|
|
|
|
|
keyb ru,,C:\WINDOWS\COMMAND\keybrd3.sys
|
|
|
|
|
@end example
|
|
|
|
|
|
|
|
|
|
(That's for russian locale.) You should comment that line if you want
|
|
|
|
|
your keys working properly. Of course, this will deprive you of your
|
|
|
|
|
local alphabet keyboard support, so you should think about
|
2004-06-14 04:42:05 +02:00
|
|
|
|
another localizer. ex-USSR users are of course knowledgeable of Keyrus
|
2000-09-13 17:13:17 +02:00
|
|
|
|
localizer, and it might work for other locales too, since it has keyboard
|
|
|
|
|
layout editor. But it has russian messages and documentation ;-(
|
|
|
|
|
Reference URL is http://www.hnet.ru/software/contrib/Utils/KeyRus/
|
|
|
|
|
(note the you may need to turn off Windows logo for Keyrus to operate
|
|
|
|
|
properly).
|
|
|
|
|
|
|
|
|
|
@subsection Is it OK to have multiple copies of the DLL?
|
|
|
|
|
|
|
|
|
|
You should only have one copy of the Cygwin DLL on your system. If you
|
|
|
|
|
have multiple versions, they will conflict and cause problems.
|
|
|
|
|
|
2000-12-12 15:24:42 +01:00
|
|
|
|
If you get the error "shared region is corrupted" or "shared region
|
|
|
|
|
version mismatch" it means you have multiple versions of cygwin1.dll
|
|
|
|
|
running at the same time. This could happen, for example, if you update
|
|
|
|
|
cygwin1.dll without exiting @emph{all} Cygwin apps (including inetd)
|
|
|
|
|
beforehand.
|
|
|
|
|
|
2005-03-30 19:02:00 +02:00
|
|
|
|
The only DLL that is sanctioned by the Cygwin project is the one that
|
|
|
|
|
you get by running @file{http://cygwin.com/setup.exe}, installed in the
|
|
|
|
|
directory controlled by this program. If you have other versions on
|
|
|
|
|
your system and desire help from the cygwin project, you should delete
|
|
|
|
|
or rename all DLLs that are not installed by @file{setup.exe}.
|
|
|
|
|
|
2000-12-12 15:24:42 +01:00
|
|
|
|
If you're trying to find multiple versions of the DLL that are causing
|
2004-06-14 04:42:05 +02:00
|
|
|
|
this problem, reboot first, in case DLLs still loaded in memory are the
|
2000-12-12 15:24:42 +01:00
|
|
|
|
cause. Then use the Windows System find utility to search your whole
|
|
|
|
|
machine, not just components in your PATH (as 'type' would do) or
|
|
|
|
|
cygwin-mounted filesystems (as Cygwin 'find' would do).
|
2000-09-13 17:13:17 +02:00
|
|
|
|
|
2005-07-10 21:39:31 +02:00
|
|
|
|
@subsection Why isn't package XYZ available in Cygwin?
|
2000-12-12 18:42:21 +01:00
|
|
|
|
|
|
|
|
|
Probably because there is nobody willing or able to maintain it. It
|
|
|
|
|
takes time, and the priority for the Cygwin Team is the Cygwin package.
|
2005-07-10 21:39:31 +02:00
|
|
|
|
The rest is a volunteer effort. Want to contribute? See
|
|
|
|
|
@file{http://cygwin.com/setup.html}.
|
|
|
|
|
|
|
|
|
|
@subsection Why is the Cygwin package of XYZ so out of date?
|
|
|
|
|
|
|
|
|
|
(Also: Why is the version of package XYZ older than the version that I
|
|
|
|
|
can download from the XYZ web site? Why is the version of package XYZ
|
|
|
|
|
older than the version that I installed on my linux system? Is there
|
|
|
|
|
something special about Cygwin which requires that only an older version
|
|
|
|
|
of package XYZ will work on it?)
|
|
|
|
|
|
|
|
|
|
Every package in the Cygwin distribution has a maintainer who is
|
|
|
|
|
responsible for sending out updates of the package. This person is a
|
|
|
|
|
volunteer who is rarely the same person as the official developer of the
|
|
|
|
|
package. If you notice that a version of a package seems to be out of
|
|
|
|
|
date, the reason is usually pretty simple -- the person who is
|
|
|
|
|
maintaining the package hasn't gotten around to updating it yet. Rarely,
|
|
|
|
|
the newer package actually requires complex changes that the maintainer
|
|
|
|
|
is working out.
|
|
|
|
|
|
|
|
|
|
If you urgently need an update, sending a polite message to the cygwin
|
|
|
|
|
mailing list pinging the maintainer is perfectly acceptable. There are
|
|
|
|
|
no guarantees that the maintainer will have time to update the package
|
|
|
|
|
or that you'll receive a response to your request, however.
|
|
|
|
|
|
|
|
|
|
Remeber that the operative term here is "volunteer".
|
2000-12-12 18:42:21 +01:00
|
|
|
|
|
2000-09-13 17:13:17 +02:00
|
|
|
|
@subsection How can I access other drives?
|
|
|
|
|
|
|
|
|
|
You have some flexibility here.
|
|
|
|
|
|
|
|
|
|
Cygwin has a builtin "cygdrive prefix" for drives that are not mounted.
|
|
|
|
|
You can access any drive, say Z:, as '/cygdrive/z/'.
|
|
|
|
|
|
|
|
|
|
In some applications (notably bash), you can use the familiar windows
|
|
|
|
|
<drive>:/path/, using posix forward-slashes ('/') instead of Windows
|
|
|
|
|
backward-slashes ('\'). (But see the warning below!) This maps in the
|
|
|
|
|
obvious way to the Windows path, but will be converted internally to use
|
|
|
|
|
the Cygwin path, following mounts (default or explicit). For example:
|
|
|
|
|
@example
|
2000-10-24 18:43:50 +02:00
|
|
|
|
bash$ cd C:/Windows
|
|
|
|
|
bash$ pwd
|
2000-09-13 17:13:17 +02:00
|
|
|
|
/cygdrive/c/Windows
|
|
|
|
|
@end example
|
|
|
|
|
and
|
|
|
|
|
@example
|
2000-10-24 18:43:50 +02:00
|
|
|
|
bash$ cd C:/cygwin
|
|
|
|
|
bash$ pwd
|
2000-09-13 17:13:17 +02:00
|
|
|
|
/
|
|
|
|
|
@end example
|
2000-10-24 18:43:50 +02:00
|
|
|
|
for a default setup. You could also use backward-slashes in the
|
|
|
|
|
Windows path, but these would have to be escaped from the shell.
|
2000-09-13 17:13:17 +02:00
|
|
|
|
|
|
|
|
|
@strong{Warning:} There is some ambiguity in going from a Windows path
|
|
|
|
|
to the posix path, because different posix paths, through different
|
|
|
|
|
mount points, could map to the same Windows directory. This matters
|
|
|
|
|
because different mount points may be binmode or textmode, so the
|
2001-03-17 19:50:22 +01:00
|
|
|
|
behavior of Cygwin apps will vary depending on the posix path used to
|
2000-09-13 17:13:17 +02:00
|
|
|
|
get there.
|
|
|
|
|
|
|
|
|
|
You can avoid the ambiguity of Windows paths, and avoid typing
|
|
|
|
|
"/cygdrive", by explicitly mounting drives to posix paths. For example:
|
|
|
|
|
@example
|
|
|
|
|
bash$ mkdir /c
|
|
|
|
|
bash$ mount c:/ /c
|
|
|
|
|
bash$ ls /c
|
|
|
|
|
@end example
|
2000-10-24 18:43:50 +02:00
|
|
|
|
Then @samp{/cygdrive/c/Windows} becomes @samp{/c/Windows} which is a
|
|
|
|
|
little less typing.
|
|
|
|
|
|
2000-09-13 17:13:17 +02:00
|
|
|
|
Note that you only need to mount drives once. The mapping is kept
|
|
|
|
|
in the registry so mounts stay valid pretty much indefinitely.
|
2000-10-24 18:43:50 +02:00
|
|
|
|
You can only get rid of them with umount, or the registry editor.
|
2000-09-13 17:13:17 +02:00
|
|
|
|
|
|
|
|
|
The '-b' option to mount mounts the mountpoint in binary mode
|
|
|
|
|
("binmode") where text and binary files are treated equivalently. This
|
|
|
|
|
should only be necessary for badly ported Unix programs where binary
|
|
|
|
|
flags are missing from open calls. It is also the setting for /,
|
|
|
|
|
/usr/bin and /usr/lib in a default Cygwin installation. The default for
|
|
|
|
|
new mounts is text mode ("textmode"), which is also the mode for all
|
|
|
|
|
"cygdrive" mounts.
|
|
|
|
|
|
2000-10-24 18:43:50 +02:00
|
|
|
|
You can change the default @samp{cygdrive} prefix and whether it is
|
|
|
|
|
binmode or textmode using the @code{mount} command. For example,
|
|
|
|
|
@example
|
|
|
|
|
bash$ mount -b --change-cygdrive-prefix cygdrive
|
|
|
|
|
@end example
|
|
|
|
|
will change all @code{/cygdrive/...} mounts to binmode.
|
|
|
|
|
|
2000-09-13 17:13:17 +02:00
|
|
|
|
@subsection How can I copy and paste into Cygwin console windows?
|
|
|
|
|
|
2002-11-18 00:54:11 +01:00
|
|
|
|
First, consider using rxvt instead of the standard console window. In
|
|
|
|
|
rxvt, selecting with the left-mouse also copies, and middle-mouse
|
|
|
|
|
pastes. It couldn't be easier!
|
|
|
|
|
|
2000-09-13 17:13:17 +02:00
|
|
|
|
Under Windows NT, open the properties dialog of the console window.
|
|
|
|
|
The options contain a toggle button, named "Quick edit mode". It must
|
|
|
|
|
be ON. Save the properties.
|
|
|
|
|
|
|
|
|
|
Under Windows 9x, open the properties dialog of the console window.
|
|
|
|
|
Select the Misc tab. Uncheck Fast Pasting. Check QuickEdit.
|
|
|
|
|
|
2001-03-17 19:50:22 +01:00
|
|
|
|
You can also bind the insert key to paste from the clipboard by adding
|
|
|
|
|
the following line to your .inputrc file:
|
|
|
|
|
@example
|
|
|
|
|
"\e[2~": paste-from-clipboard
|
|
|
|
|
@end example
|
|
|
|
|
|
2005-06-21 07:52:25 +02:00
|
|
|
|
@subsection What firewall should I use with Cygwin?
|
|
|
|
|
|
|
|
|
|
We have had good reports about Kerio Personal Firewall, ZoneLabs
|
|
|
|
|
Integrity Desktop, and the built-in firewall in Windows XP. Other
|
|
|
|
|
well-known products including ZoneAlarm and Norton Internet Security have
|
2005-07-10 21:39:31 +02:00
|
|
|
|
caused problems for some users but work fine for others. At last report,
|
|
|
|
|
Agnitum Outpost did not work with Cygwin. If you are having strange
|
|
|
|
|
connection-related problems, disabling the firewall is a good
|
|
|
|
|
troubleshooting step (as is closing or disabling all other running
|
|
|
|
|
applications, especially resource-intensive processes such as indexed
|
|
|
|
|
search).
|
|
|
|
|
|
|
|
|
|
On the whole, Cygwin doesn't care which firewall is used. The few rare
|
|
|
|
|
exceptions have to do with socket code.
|
2005-06-21 07:52:25 +02:00
|
|
|
|
Cygwin uses sockets to implement many of its functions, such as IPC.
|
|
|
|
|
Some overzealous firewalls install themselves deeply into the winsock
|
|
|
|
|
stack (with the 'layered service provider' API) and install hooks
|
|
|
|
|
throughout. Sadly the mailing list archives are littered with examples
|
|
|
|
|
of poorly written firewall-type software that causes things to break.
|
|
|
|
|
Note that with many of these products, simply disabling the firewall
|
|
|
|
|
does not remove these changes; it must be completely uninstalled.
|
2000-09-13 17:13:17 +02:00
|
|
|
|
|
|
|
|
|
@subsection How can I share files between Unix and Windows?
|
|
|
|
|
|
2005-07-08 10:42:40 +02:00
|
|
|
|
During development, we have both Linux boxes running Samba and Windows
|
|
|
|
|
machines. We often build with cross-compilers under Linux and copy
|
2005-06-21 07:52:25 +02:00
|
|
|
|
binaries and source to the Windows system or just toy with them
|
|
|
|
|
directly off the Samba-mounted partition. On dual-boot NT/Windows 9x
|
|
|
|
|
machines, we usually use the FAT filesystem so we can also access the
|
|
|
|
|
files under Windows 9x.
|
2000-09-13 17:13:17 +02:00
|
|
|
|
|
2005-06-21 07:52:25 +02:00
|
|
|
|
@subsection Is Cygwin case-sensitive? What are managed mounts?
|
2000-09-13 17:13:17 +02:00
|
|
|
|
|
|
|
|
|
Several Unix programs expect to be able to use to filenames
|
|
|
|
|
spelled the same way, but with different case. A prime example
|
|
|
|
|
of this is perl's configuration script, which wants @code{Makefile} and
|
|
|
|
|
@code{makefile}. WIN32 can't tell the difference between files with
|
|
|
|
|
just different case, so the configuration fails.
|
|
|
|
|
|
2005-06-21 07:52:25 +02:00
|
|
|
|
To help with this problem, starting in @samp{cygwin-1.5.0} it is
|
|
|
|
|
possible to have a case sensitive Cygwin managed mount. This is an
|
|
|
|
|
experimental feature and should be used with caution. You should only
|
|
|
|
|
use it for directories that are initially unpopulated and are due to
|
|
|
|
|
be completely managed by cygwin (hence the name). So, the best use
|
|
|
|
|
would be to create an empty directory, mount it, and then add files to
|
|
|
|
|
it:
|
2000-09-13 17:13:17 +02:00
|
|
|
|
|
2005-06-21 07:52:25 +02:00
|
|
|
|
@example
|
|
|
|
|
mkdir /managed-dir
|
|
|
|
|
mount -o managed c:/cygwin/managed-dir /managed-dir
|
|
|
|
|
cd /managed-dir/
|
|
|
|
|
touch makefile
|
|
|
|
|
touch Makefile
|
|
|
|
|
@end example
|
2000-09-13 17:13:17 +02:00
|
|
|
|
|
|
|
|
|
@subsection What about DOS special filenames?
|
|
|
|
|
|
|
|
|
|
Files cannot be named com1, lpt1, or aux (to name a few); either as
|
|
|
|
|
the root filename or as the extension part. If you do, you'll have
|
|
|
|
|
trouble. Unix programs don't avoid these names which can make things
|
|
|
|
|
interesting. E.g., the perl distribution has a file called
|
|
|
|
|
@code{aux.sh}. The perl configuration tries to make sure that
|
|
|
|
|
@code{aux.sh} is there, but an operation on a file with the magic
|
|
|
|
|
letters 'aux' in it will hang.
|
|
|
|
|
|
|
|
|
|
@subsection When it hangs, how do I get it back?
|
|
|
|
|
|
|
|
|
|
If something goes wrong and the tools hang on you for some reason (easy
|
|
|
|
|
to do if you try and read a file called aux.sh), first try hitting ^C to
|
|
|
|
|
return to bash or the cmd prompt.
|
|
|
|
|
|
|
|
|
|
If you start up another shell, and applications don't run, it's a good
|
|
|
|
|
bet that the hung process is still running somewhere. Use the Task
|
|
|
|
|
Manager, pview, or a similar utility to kill the process.
|
|
|
|
|
|
|
|
|
|
And, if all else fails, there's always the reset button/power switch.
|
|
|
|
|
This should never be necessary under Windows NT.
|
|
|
|
|
|
|
|
|
|
@subsection Why the weird directory structure?
|
|
|
|
|
|
|
|
|
|
Why do /lib and /usr/lib (and /bin, /usr/bin) point to the same thing?
|
|
|
|
|
|
|
|
|
|
Why use mounts instead of symbolic links?
|
|
|
|
|
|
|
|
|
|
Can I use a disk root (e.g., C:\) as Cygwin root? Why is this discouraged?
|
|
|
|
|
|
|
|
|
|
After a new installation in the default location, your mount points will
|
|
|
|
|
look something like this:
|
|
|
|
|
|
|
|
|
|
@example
|
2001-07-05 01:30:17 +02:00
|
|
|
|
bash$ mount
|
|
|
|
|
C:\cygwin\bin on /usr/bin type system (binmode)
|
|
|
|
|
C:\cygwin\lib on /usr/lib type system (binmode)
|
|
|
|
|
C:\cygwin on / type system (binmode)
|
2000-09-13 17:13:17 +02:00
|
|
|
|
@end example
|
|
|
|
|
|
2001-07-05 01:30:17 +02:00
|
|
|
|
(Exactly what you see depends on what options you gave to @code{setup.exe}.)
|
|
|
|
|
|
2000-09-13 17:13:17 +02:00
|
|
|
|
Note that /bin and /usr/bin point to the same location, as do /lib and
|
|
|
|
|
/usr/lib. This is intentional, and you should not undo these mounts
|
|
|
|
|
unless you @emph{really} know what you are doing.
|
|
|
|
|
|
|
|
|
|
Various applications and packages may expect to be installed in /lib or
|
|
|
|
|
/usr/lib (similarly /bin or /usr/bin). Rather than distinguish between
|
|
|
|
|
them and try to keep track of them (possibly requiring the occasional
|
|
|
|
|
duplication or symbolic link), it was decided to maintain only one
|
|
|
|
|
actual directory, with equivalent ways to access it.
|
|
|
|
|
|
|
|
|
|
Symbolic links had been considered for this purpose, but were dismissed
|
|
|
|
|
because they do not always work on Samba drives. Also, mounts are
|
|
|
|
|
faster to process because no disk access is required to resolve them.
|
|
|
|
|
|
|
|
|
|
Note that non-cygwin applications will not observe Cygwin mounts (or
|
|
|
|
|
symlinks for that matter). For example, if you use WinZip to unpack the
|
|
|
|
|
tar distribution of a Cygwin package, it may not get installed to the
|
|
|
|
|
correct Cygwin path. @emph{So don't do this!}
|
|
|
|
|
|
|
|
|
|
It is strongly recommended not to make the Cygwin root directory the
|
|
|
|
|
same as your drive's root directory, unless you know what you are doing
|
|
|
|
|
and are prepared to deal with the consequences. It is generally easier
|
|
|
|
|
to maintain the Cygwin hierarchy if it is isolated from, say, C:\. For
|
|
|
|
|
one thing, you avoid possible collisions with other (non-cygwin)
|
|
|
|
|
applications that may create (for example) \bin and \lib directories.
|
|
|
|
|
(Maybe you have nothing like that installed now, but who knows about
|
|
|
|
|
things you might add in the future?)
|
|
|
|
|
|
|
|
|
|
@subsection How do anti-virus programs like Cygwin?
|
|
|
|
|
|
2000-10-18 16:36:07 +02:00
|
|
|
|
Users have reported that NAI (formerly McAfee) VirusScan for NT (and
|
|
|
|
|
others?) is incompatible with Cygwin. This is because it tries to scan
|
|
|
|
|
the newly loaded shared memory in cygwin1.dll, which can cause fork() to
|
|
|
|
|
fail, wreaking havoc on many of the tools. (It is not confirmed that
|
|
|
|
|
this is still a problem, however.)
|
|
|
|
|
|
|
|
|
|
There have been several reports of NAI VirusScan causing the system to
|
|
|
|
|
hang when unpacking tar.gz archives. This is surely a bug in VirusScan,
|
|
|
|
|
and should be reported to NAI. The only workaround is to disable
|
|
|
|
|
VirusScan when accessing these files. This can be an issue during
|
|
|
|
|
setup, and is discussed in that FAQ entry.
|
|
|
|
|
|
|
|
|
|
Some users report a significant performance hit using Cygwin when their
|
|
|
|
|
anti-virus software is enabled. Rather than disable the anti-virus
|
|
|
|
|
software completely, it may be possible to specify directories whose
|
|
|
|
|
contents are exempt from scanning. In a default installation, this
|
|
|
|
|
would be @samp{@code{C:\cygwin\bin}}. Obviously, this could be
|
|
|
|
|
exploited by a hostile non-Cygwin program, so do this at your own risk.
|
2000-09-13 17:13:17 +02:00
|
|
|
|
|
2002-11-13 01:23:18 +01:00
|
|
|
|
@subsection Is there a Cygwin port of GNU Emacs?
|
|
|
|
|
|
|
|
|
|
Yes! It uses the X11 (@file{http://cygwin.com/xfree/}) Windows
|
|
|
|
|
interface. From a remote login shell, this ``emacs -nw'' works fine.
|
|
|
|
|
There is also a non-X11 version which just provides the text-only
|
|
|
|
|
terminal interface. Use Cygwin Setup to install either one (or both).
|
|
|
|
|
|
|
|
|
|
@subsection What about NT Emacs?
|
|
|
|
|
|
|
|
|
|
If you want GNU Emacs with a native Microsoft Windows interface, but
|
|
|
|
|
without X, then you must use the native Windows port, commonly known
|
|
|
|
|
as ``NT Emacs''. You get NT Emacs from any GNU mirror. It is not
|
|
|
|
|
available from Cygwin Setup.
|
2000-09-13 17:13:17 +02:00
|
|
|
|
|
2002-11-13 01:23:18 +01:00
|
|
|
|
NT Emacs uses the Windows command shell by default. Since it is not a
|
|
|
|
|
Cygwin application, it has no knowledge of Cygwin mounts. With those
|
|
|
|
|
points in mind, you need to add the following code to your ~/.emacs
|
|
|
|
|
(or ~/_emacs) file in order to use Cygwin bash. This is particularly useful
|
|
|
|
|
for the JDEE package (@file{http://jdee.sunsite.dk/}). The following
|
|
|
|
|
settings are for Emacs 21.1:
|
2000-09-13 17:13:17 +02:00
|
|
|
|
|
2000-10-18 16:15:09 +02:00
|
|
|
|
@example
|
|
|
|
|
;; This assumes that Cygwin is installed in C:\cygwin (the
|
|
|
|
|
;; default) and that C:\cygwin\bin is not already in your
|
|
|
|
|
;; Windows Path (it generally should not be).
|
|
|
|
|
;;
|
|
|
|
|
(setq exec-path (cons "C:/cygwin/bin" exec-path))
|
|
|
|
|
(setenv "PATH" (concat "C:\\cygwin\\bin;" (getenv "PATH")))
|
|
|
|
|
;;
|
|
|
|
|
;; NT-emacs assumes a Windows command shell, which you change
|
|
|
|
|
;; here.
|
|
|
|
|
;;
|
|
|
|
|
(setq process-coding-system-alist '(("bash" . undecided-unix)))
|
|
|
|
|
(setq shell-file-name "bash")
|
|
|
|
|
(setenv "SHELL" shell-file-name)
|
|
|
|
|
(setq explicit-shell-file-name shell-file-name)
|
|
|
|
|
;;
|
|
|
|
|
;; This removes unsightly ^M characters that would otherwise
|
|
|
|
|
;; appear in the output of java applications.
|
|
|
|
|
;;
|
|
|
|
|
(add-hook 'comint-output-filter-functions
|
|
|
|
|
'comint-strip-ctrl-m)
|
|
|
|
|
@end example
|
2000-09-13 17:13:17 +02:00
|
|
|
|
|
2002-11-13 01:23:18 +01:00
|
|
|
|
If you want NT Emacs to understand Cygwin paths, get
|
2002-03-21 00:48:16 +01:00
|
|
|
|
cygwin-mount.el from @file{http://www.emacswiki.org/elisp/index.html}.
|
|
|
|
|
|
2002-11-13 01:23:18 +01:00
|
|
|
|
Note that all of this ``just works'' if you use the Cygwin port of
|
|
|
|
|
Emacs from Cygwin Setup.
|
|
|
|
|
|
|
|
|
|
@subsection What about XEmacs?
|
|
|
|
|
|
|
|
|
|
For a concise description of the current situation with XEmacs, see
|
|
|
|
|
this message from the Cygwin mailing list:
|
|
|
|
|
@file{http://cygwin.com/ml/cygwin/2002-11/msg00609.html}.
|
2002-03-21 00:48:16 +01:00
|
|
|
|
|
2002-11-18 01:25:14 +01:00
|
|
|
|
@subsection Is there a better alternative to the standard console window?
|
|
|
|
|
|
|
|
|
|
Yes! Use rxvt instead. It's an optional package in Cygwin Setup.
|
|
|
|
|
You can use it with or without X11. You can resize it easily by
|
|
|
|
|
dragging an edge or corner. Copy and paste is easy with the left and
|
|
|
|
|
middle mouse buttons, respectively. It will honor settings in your
|
|
|
|
|
~/.Xdefaults file, even without X.
|
|
|
|
|
|
|
|
|
|
Don't invoke as simply ``rxvt'' because that will run /bin/sh (really
|
|
|
|
|
ash) which is not a good interactive shell. For details see
|
2005-01-22 20:12:33 +01:00
|
|
|
|
@code{/usr/doc/Cygwin/rxvt-<ver>.README}.
|
2002-11-18 01:25:14 +01:00
|
|
|
|
|
2000-09-13 17:13:17 +02:00
|
|
|
|
@subsection info error "dir: No such file or directory"
|
|
|
|
|
|
2004-07-16 16:17:15 +02:00
|
|
|
|
Cygwin packages install their info documentation in the
|
|
|
|
|
@code{/usr/share/info} directory. But you need to create a @code{dir}
|
|
|
|
|
file there before the standalone info program (probably
|
|
|
|
|
@code{/usr/bin/info}) can be used to read those info files. This is how
|
|
|
|
|
you do it:
|
2000-09-13 17:13:17 +02:00
|
|
|
|
@example
|
2004-07-16 16:17:15 +02:00
|
|
|
|
bash$ cd /usr/share/info
|
2000-09-13 17:13:17 +02:00
|
|
|
|
bash$ for f in *.info ; do install-info $f dir ; done
|
|
|
|
|
@end example
|
|
|
|
|
This may generate warnings:
|
|
|
|
|
@example
|
|
|
|
|
install-info: warning: no info dir entry in `gzip.info'
|
|
|
|
|
install-info: warning: no info dir entry in `time.info'
|
|
|
|
|
@end example
|
|
|
|
|
The @code{install-info} command cannot parse these files, so you will
|
2004-07-16 16:17:15 +02:00
|
|
|
|
have to add their entries to @code{/usr/share/info/dir} by hand.
|
2000-09-13 17:13:17 +02:00
|
|
|
|
|
2002-03-21 00:53:50 +01:00
|
|
|
|
Even if the dir file already exists, you may have to update it when
|
|
|
|
|
you install new Cygwin packages. Some packages update the dir file
|
|
|
|
|
for you, but many don't.
|
|
|
|
|
|
2000-09-13 17:13:17 +02:00
|
|
|
|
@subsection Why do I get a message saying Out of Queue slots?
|
|
|
|
|
|
|
|
|
|
"Out of queue slots!" generally occurs when you're trying to remove
|
|
|
|
|
many files that you do not have permission to remove (either because
|
|
|
|
|
you don't have permission, they are opened exclusively, etc). What
|
|
|
|
|
happens is Cygwin queues up these files with the supposition that it
|
|
|
|
|
will be possible to delete these files in the future. Assuming that
|
|
|
|
|
the permission of an affected file does change later on, the file will
|
|
|
|
|
be deleted as requested. However, if too many requests come in to
|
|
|
|
|
delete inaccessible files, the queue overflows and you get the message
|
|
|
|
|
you're asking about. Usually you can remedy this with a quick chmod,
|
|
|
|
|
close of a file, or other such thing. (Thanks to Larry Hall for
|
|
|
|
|
this explanation).
|
|
|
|
|
|
|
|
|
|
@subsection Why don't symlinks work on samba-mounted filesystems?
|
|
|
|
|
|
|
|
|
|
Symlinks are marked with "system" file attribute. Samba does not
|
|
|
|
|
enable this attribute by default. To enable it, consult your Samba
|
|
|
|
|
documentation and then add these lines to your samba configuration
|
|
|
|
|
file:
|
|
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
|
map system = yes
|
|
|
|
|
create mask = 0775
|
|
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
|
|
Note that the 0775 can be anything as long as the 0010 bit is set.
|
|
|
|
|
|
|
|
|
|
@subsection Why does df report sizes incorrectly.
|
|
|
|
|
|
|
|
|
|
There is a bug in the Win32 API function GetFreeDiskSpace that
|
|
|
|
|
makes it return incorrect values for disks larger than 2 GB in size.
|
|
|
|
|
Perhaps that may be your problem?
|
|
|
|
|
|
2001-07-06 02:40:38 +02:00
|
|
|
|
@subsection Why doesn't Cygwin tcl/tk understand Cygwin paths?
|
|
|
|
|
|
2002-03-21 00:14:30 +01:00
|
|
|
|
The versions of Tcl/Tk distributed with Cygwin (e.g. cygtclsh80.exe,
|
|
|
|
|
cygwish80.exe) are not actually "Cygwin versions" of those tools.
|
|
|
|
|
They are built with the @samp{-mno-cygwin} option to @code{gcc}, which
|
|
|
|
|
means they do not understand Cygwin mounts or symbolic links.
|
2001-07-06 02:40:38 +02:00
|
|
|
|
|
|
|
|
|
See the entry "How do I convert between Windows and UNIX paths?"
|
|
|
|
|
elsewhere in this FAQ.
|