cygwin

perl, python, ruby などのスクリプト環境が簡単に手に入る。

WinSCP や putty における ssh の設定や動作確認に重宝する。

gcc/g++ が使える。

欠点は cygwin1.dll が必須であること。gcc でコンパイルして Windows 用バイナリを構築する目的では mingw が用いられることの方が多いようだ。

http://cygwin.com

http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html

cygwin gcc-3 で mingw 互換(cygwin1.dll非依存)のコンパイルができる libopenjtalk

quiet mode

since 2012-07-08

コマンドプロンプトからパッケージを追加する方法

setup.exe --quiet-mode --packages libtool

ただし最初に UAC のダイアログが出る。また、進捗のウィンドウは表示される。

ちなみに -M オプションを使うといきなりパッケージ選択画面が出る。

>setup.exe --help

>Starting cygwin install, version 2.774
User has backup/restore rights

Command Line Options:
 -D --download                          Download from internet
 -L --local-install                     Install from local directory
 -s --site                              Download site
 -O --only-site                         Ignore all sites except for -s
 -R --root                              Root installation directory
 -P --packages                          Specify packages to install
 -C --categories                        Specify entire categories to install
 -p --proxy                             HTTP/FTP proxy (host:port)
 -q --quiet-mode                        Unattended setup mode
 -M --package-manager                   Semi-attended chooser-only mode
 -h --help                              print help
 -l --local-package-dir                 Local package directory
 -r --no-replaceonreboot                Disable replacing in-use files on next
                                        reboot.
 -X --no-verify                         Don't verify setup.ini signatures
 -n --no-shortcuts                      Disable creation of desktop and start
                                        menu shortcuts
 -N --no-startmenu                      Disable creation of start menu shortcut
 -d --no-desktop                        Disable creation of desktop shortcut
 -K --pubkey                            URL of extra public key file (gpg
                                        format)
 -S --sexpr-pubkey                      Extra public key in s-expr format
 -u --untrusted-keys                    Use untrusted keys from last-extrakeys
 -U --keep-untrusted-keys               Use untrusted keys and retain all
 -A --disable-buggy-antivirus           Disable known or suspected buggy anti
                                        virus software packages during
                                        execution.

Cygwin Terminal

since 2011-12-13

cygwin 1.7.9 で確認。

Cygwin Terminal は文字コードを UTF-8 にできる。

オーディオ出力

OSSエミュレーションのデバイスがある。

$ cat /cygdrive/c/Windows/Media/ding.wav > /dev/dsp

/etc/passwd の効果

since 2011-01-16

Windows に新しいユーザを作ったところ、ホームディレクトリが適切に認識されなくなった(かどうか怪しい)。

/etc/passwd にユーザ名を追加したら、問題が解決した(かどうかも怪しい)。

具体的な経緯:

  • Windows XP のユーザ nishi で cygwin をインストールして利用。
  • Windows に新しいユーザ nishimotz を作り、ログオンし直した。
  • cygwin は最初の実行時に /home/nishimotz を作ってくれたが、シェルのプロンプトが # になっている。
  • http://oshiete.goo.ne.jp/qa/685975.html を読んで /etc/passwd が関係ありそうだと推測
  • cygwin で vi /etc/passwd して nishimotz ユーザのエントリを作る
    • nishimotz::1009:513::/home/nishimotz:/bin/bash
  • 別のウィンドウで cygwin を実行するとプロンプトが $ になった。
  • と思ったが再度実行したら # に戻っていた。

ssh でエラーになる

since 2011-07-06

Windows 7 x64 で cygwin 1.7.9-1 を使用。

ssh: Could not resolve hostname と言われてしまう。

http://www.pistolfly.jp/weblog/2010/01/cygwin-17sshssh-could-not-reso.html

に書かれているように

$ cat ~/.ssh/config
AddressFamily inet

で解決。

cygwin.txt · 最終更新: 2012/07/08 12:43 by Takuya Nishimoto
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0