ミームの死骸を待ちながら

We are built as gene machines and cultured as meme machines, but we have the power to turn against our creators. We, alone on earth, can rebel against the tyranny of the selfish replicators. - Richard Dawkins "Selfish Gene"

We are built as gene machines and cultured as meme machines, but we have the power to turn against our creators.
We, alone on earth, can rebel against the tyranny of the selfish replicators.
- Richard Dawkins "Selfish Gene"

Macにおけるroot権限

今まで「コマンドラインからツールのインストールができない」理由がわからなかった(d:id:Hash:20070827)のだが、どうやらMac OS X (僕は10.4.10を使用)ではUnixのrootパスワードが初期状態で未設定になっているらしい。
設定するには「NetInfoマネージャ」を立ち上げ、

  1. セキュリティ > 認証...
    • で、通常ログインパスワードでロックを解除する。次に
  2. セキュリティ > ルートパスワードの変更...
    • でrootのパスワードを設定する。セキュリティ的におそらく最後の"鍵"なので、決して忘れない&誰にもわからないものにするのがよさそう。

sudo インストールsuとsudoについて

Unixのrootパスワードを設定したことで、コマンドラインからいろいろとインストールが可能になる。とりあえずgnuplotvim-rubyBiorubyptex、なんかをインストールした*1。suになるにはrootパスワードで、ノーマルユーザーの状態でsudoするには通常ログインのパスワード。vim-rubyをインストールした。

$ sudo gem install vim-ruby --remote
$ sudo vim-ruby-install.rb

↑ファイルが見あたらなくてもいい。実行権限。
~/.vim/下にいろいろインストール。また、.vimrcに

   set tabstop=2
   set shiftwidth=2
   set expandtab
   set autoindent
   set nocompatible
    
    syntax on
    filetype on
    filetype indent on
    filetype plugin on

を追加。これでRubyプログラムを書くと色が…色付かない。おかしいな。→ターミナルのウィンドウ設定「ANSIカラーを使用しない」チェックを外したらちゃんと色づけされた。インデントがきっちりして見やすいな。

*1:ptexは小川氏のバイナリパッケージを使ったが