cygwin.rst
changeset 943 453f1f40c0b7
equal deleted inserted replaced
942:8aed53c326aa 943:453f1f40c0b7
       
     1 -*- coding: utf-8 -*-
       
     2 
       
     3 =========
       
     4  Cygwin.
       
     5 =========
       
     6 
       
     7 Installation.
       
     8 =============
       
     9 
       
    10 Run setup.exe. Use output dir like::
       
    11 
       
    12   d:\opt\cygwin
       
    13 
       
    14 Add to your PATH env var exactly before C:\WINDOWS\system32;C:\WINDOWS values::
       
    15 
       
    16   set PATH=d:\opt\cygwin\bin;d:\opt\cygwin\usr\local\bin;%PATH%
       
    17 
       
    18   REM Set CYGWIN variable to 'nontsec'. That makes sure that permissions
       
    19   REM on your windows machine are not updated as a side effect of cygwin
       
    20   REM operations.
       
    21   set CYGWIN=binary nontsec nodosfilewarning codepage:cp1251 noglob
       
    22 
       
    23   set LANG=ru_RU.cp1251
       
    24 
       
    25 Set HOME env var (where places config file and projects)::
       
    26 
       
    27   set HOME=d:\home
       
    28 
       
    29 Set TMP and TEMP env vars with good path (without spaces, etc.; these vars
       
    30 already set as used defined, so you need change their values)::
       
    31 
       
    32   set TMP=c:\tmp
       
    33   set TEMP=c:\tmp
       
    34 
       
    35 Also you need edit /etc/passwd to point to correct home path.
       
    36 
       
    37 Cygwin ports.
       
    38 =============
       
    39 
       
    40 This project provides Cygwin binary and source packages for a large variety of programs and
       
    41 libraries, including the GNOME  and KDE desktop environments
       
    42 
       
    43   http://cygwin-ports.sourceforge.net/
       
    44                 newest home of the Cygwin Ports project
       
    45   http://sourceware.org/cygwinports/
       
    46                 home page
       
    47   http://cygwinports.blogspot.com
       
    48                 official blog??
       
    49 
       
    50 Which Cygwin version you run?
       
    51 =============================
       
    52 ::
       
    53 
       
    54   $ uname -r
       
    55   1.7.7(0.230/5/3)
       
    56   $ cygcheck -c cygwin
       
    57   Cygwin Package Information
       
    58   Package              Version        Status
       
    59   cygwin               1.7.7-1        OK
       
    60 
       
    61 Recreate /etc/passwd and /etc/groups.
       
    62 =====================================
       
    63 ::
       
    64 
       
    65   $ mkpasswd -d | grep $yourlogin > /etc/passwd  # if you in Windows domain
       
    66   $ mkpasswd -l > /etc/passwd                    # if you in Windows domain
       
    67 
       
    68   $ mkgroup -l > /etc/group
       
    69 
       
    70 Running X Window.
       
    71 =================
       
    72 ::
       
    73 
       
    74   $ XWin -multiwindow&
       
    75 
       
    76 or::
       
    77 
       
    78   $ XWin -clipboard -silent-dup-error -xkblayout "us,ru" -xkboptions "grp:caps_toggle"&
       
    79 
       
    80 To start X application you must set 'DISPLAY'::
       
    81 
       
    82   $ DISPLAY=:0 xterm&
       
    83 
       
    84 Working with packages.
       
    85 ======================
       
    86 
       
    87 Installed package list with versions.
       
    88 -------------------------------------
       
    89 ::
       
    90 
       
    91   $ cygcheck -c -d
       
    92 
       
    93 List of package files.
       
    94 ----------------------
       
    95 ::
       
    96 
       
    97   $ cygcheck -l pkg-name
       
    98 
       
    99 Search package by containing file (only under installed packages).
       
   100 ------------------------------------------------------------------
       
   101 ::
       
   102 
       
   103   $ cygcheck -f full-path-to-file
       
   104 
       
   105 Search packages by containing path (only under installed packages).
       
   106 -------------------------------------------------------------------
       
   107 ::
       
   108 
       
   109   $ for f in /etc/setup/*.lst.gz; do gzip -c -d $f | grep $WORD  2>&1 >/dev/null && { echo $f; break; } || :; done
       
   110 
       
   111 Search for package.
       
   112 -------------------
       
   113 
       
   114 If you have file name or regex use (need internet connection)::
       
   115 
       
   116   $ cygcheck -p REGEX
       
   117 
       
   118 cygcheck use such link:
       
   119 
       
   120   http://cygwin.com/cgi-bin2/package-grep.cgi?grep=REGEX
       
   121 
       
   122 Cygwin installation info.
       
   123 =========================
       
   124 ::
       
   125 
       
   126   $ uname -a
       
   127   $ cygcheck -s -r
       
   128 
       
   129 Cygwin acronyms.
       
   130 ================
       
   131 
       
   132   http://www.cygwin.com/acronyms
       
   133                 One encounters all sorts of acronyms on the Cygwin mailing lists.
       
   134 
       
   135 Check dll dependency.
       
   136 =====================
       
   137 ::
       
   138 
       
   139   $ ldd my.dll
       
   140   $ ldd my.exe
       
   141   $ cygcheck ./my.dll
       
   142   $ cygcheck ./my.exe
       
   143 
       
   144 Cygwin alternatives.
       
   145 ====================
       
   146 
       
   147   http://www.suacommunity.com/SUA.aspx
       
   148                 Subsystem for Unix-based Applications and Services for Unix