cygwin.rst
changeset 2335 df944b944b30
parent 2320 b7a2c43902f3
child 2336 4cd18bed8bac
equal deleted inserted replaced
2334:c44e4331713c 2335:df944b944b30
     4  Cygwin.
     4  Cygwin.
     5 =========
     5 =========
     6 .. contents::
     6 .. contents::
     7    :local:
     7    :local:
     8 
     8 
     9 Installation.
     9 Configuration
    10 =============
    10 =============
    11 
    11 
    12 Run setup.exe. Use output dir like::
    12 Run ``setup.exe``. Today you should prefer 64-bit flavor because it sould less BLODA. Add Cygwin
    13 
    13 ``/bin`` directory to your ``PATH`` env var::
    14   d:\opt\cygwin
    14 
    15 
    15   set PATH=c:\opt\cygwin\bin;%PATH%
    16 Add to your PATH env var exactly before C:\WINDOWS\system32;C:\WINDOWS values::
    16 
    17 
    17 Cygwin behavior can be altered via ``CYGWIN`` env var::
    18   set PATH=d:\opt\cygwin\bin;d:\opt\cygwin\usr\local\bin;%PATH%
    18 
    19 
    19   set CYGWIN=nodosfilewarning noglob
    20   REM Set CYGWIN variable to 'nontsec'. That makes sure that permissions
    20 
    21   REM on your windows machine are not updated as a side effect of cygwin
    21 Currently only ``noglob`` is useful. It disables interpreting special shell wildcard characters
    22   REM operations.
    22 passed verbatim from native Windows apps. So you will unable to do ``ls *`` from ``cmd.exe``. But
    23   set CYGWIN=binary nontsec nodosfilewarning codepage:cp1251 noglob
    23 without this option (``glob`` is default) Mercurial patterns, like ``{rev}`` are broken. For me
    24 
    24 native Windows Emacs can't determine file revision with my ``hg`` wrapper.
    25   set LANG=ru_RU.cp1251
    25 
    26 
    26 https://cygwin.com/cygwin-ug-net/using-cygwinenv.html
    27 Set HOME env var (where places config file and projects)::
    27   The CYGWIN environment variable. Available options.
    28 
    28 
    29   set HOME=d:\home
    29 Set ``HOME`` env var::
    30 
    30 
    31 Set TMP and TEMP env vars with good path (without spaces, etc.; these vars
    31   set HOME=c:\home
    32 already set as used defined, so you need change their values)::
    32 
       
    33 https://stackoverflow.com/questions/1494658/how-can-i-change-my-cygwin-home-folder-after-installation
       
    34   How can I change my Cygwin home folder after installation?
       
    35 
       
    36 Set ``TMP`` and ``TEMP`` env vars without dangerous symbols in path (without spaces, etc)::
    33 
    37 
    34   set TMP=c:\tmp
    38   set TMP=c:\tmp
    35   set TEMP=c:\tmp
    39   set TEMP=c:\tmp
    36 
    40 
    37 Also you need edit ``/etc/passwd`` to point to correct home path.
    41 Also you need to edit ``/etc/passwd`` to point to correct home path.
    38 
    42 
    39 Starting from Cygwin ``/etc/nsswitch.conf`` settings used to define user home.
    43 For Cygwin 1.7 ``/etc/nsswitch.conf`` settings is used to define user home. By default it is
    40 By default it is ``/home/%U`` so it is better to create symlink::
    44 ``/home/%U`` so it is better to create symlink::
    41 
    45 
    42   $ ln -s /cygdrive/d/home /home/user
    46   $ ln -s /cygdrive/d/home /home/user
    43 
    47 
    44 Alternatively with native Windows symlink (from build-in ``cmd`` command)::
    48 Alternatively with native Windows symlink (from build-in ``cmd`` command)::
    45 
    49 
    51 
    55 
    52 Alternatively look to file content::
    56 Alternatively look to file content::
    53 
    57 
    54   /etc/setup/installed.db
    58   /etc/setup/installed.db
    55 
    59 
    56 https://stackoverflow.com/questions/1494658/how-can-i-change-my-cygwin-home-folder-after-installation
    60 In a past I work with particular code point::
    57   How can I change my Cygwin home folder after installation?
    61 
       
    62   set LANG=ru_RU.cp1251
       
    63 
       
    64 Altering ``LANG`` for anything other then ``C`` cause only problems, when you get help and error
       
    65 messages in non-English. It is mostlry impossible to search for keywords, when text are translated.
    58 
    66 
    59 Documentation
    67 Documentation
    60 =============
    68 =============
    61 
    69 
    62 Cygwin C API man pages and user guide manuals available in ``cygwin-doc``
    70 Cygwin C API man pages and user guide manuals available in ``cygwin-doc``