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