2010年3月2日火曜日

cmakeでGUI @WIN32

cmake2.8でCUIからcmake GUIを起動するには、
たとえばVC++のprojects,solutionを1つしたのbuildに入れるとすると、buildでcmake-gui.exe ..とするとよい。
参照

2010年3月1日月曜日

Debian lennyをiBook G4へインストール

まずは使えんポインティングデバイスから。
/etc/sysctl.confに
# 3-button mouse emulation
# 3 ボタンマウスエミュレーション
# turn on emulation
# エミュレーション開始
/dev/mac_hid/mouse_button_emulation = 1
# Send middle mouse button signal with the F11 key
# F11 キーでマウスの中ボタン信号を送る
/dev/mac_hid/mouse_button2_keycode = 87
# Send right mouse button signal with the F12 key
# F12 キーでマウスの右ボタン信号を送る
/dev/mac_hid/mouse_button3_keycode = 88
# For different keys, use showkey to tell you what the code is.
# ほかのキーを使う場合は showkey で必要なコードがわかる
で右クリックが可能になる。

gdmでのキーボードを/etc/X11/xorg.confで変更
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "jp106"
Option "XkbLayout" "jp"
EndSection
で軽い用途には充分。

2010年2月23日火曜日

vtkAnimationSceneの実行順

vtkAnimationSceneに複数のvtkAnimationCueを食わせたとき。StartCue,Tickの実行順は
cue1->StartCue
cue1->Tick
cue2->StartCue
cue2->Tick
cue3->StartCue
cue3->Tick
...........
であった。

2010年2月22日月曜日

upTexインストール

内部もUnicodeで動くというpTex。
インストールは、tetex3から。 ここにしたがってファイルを取ってきて、ptetexを解凍しておく。
続いてここから uptex-0.29.tar.gz,uptex_font-0.22.tar.gzを取ってきてtetex3を置いたところに置き、uptex-0.29.tar.gzを解凍する。解凍した中のpatchフォルダの内容をptetexのフォルダの中にコピーする。あとは、
./0uptex.sh
make fonty

make test

make install

make distclean

田中さんありがとう。

ところで、00readme_jis.txtと00uptex_doc_jis.txtは本当にjisエンコードだった。ubuntuで直接読めない。 nkfで変換しました。

2010年2月19日金曜日

grub再インストール

起動ディスクをさして、起動画面でF6
オプションを変更”boot=casper"の部分を”root=/dev/sda1"(sda1は起動したいディスク)に変える。
起動してきたら、grubの呪文を唱える。
Goroさんありがとう。

2010年2月18日木曜日

acroread9でGB,CNフォントの利用

ここからacroread8用のFontPack81_chs_i486-linux.tar.gzとFontPack81_cht_i486-linuxを取ってくる。
それぞれ解凍すると、中にINSTALLというスクリプトあり。
エディタで開いて
if [ ! -d "$dir/Adobe/Reader8/Reader" -o ! -d "$dir/Adobe/Reader8/Resource" ]
を
if [ ! -d "$dir/Adobe/Reader9/Reader" -o ! -d "$dir/Adobe/Reader9/Resource" ]
に変更して
sudo ./INSTALL
入れ終えたら、
sudo mv -rv /opt/Adobe/Reader8/* /opt/Adobe/Reader9/
で終了。

2010年2月17日水曜日

ubuntuで環境整備

#Desktop
gconftool-2 --type bool --set /apps/nautilus/desktop/trash_icon_visible true
gconftool-2 --type bool --set /apps/nautilus/desktop/computer_icon_visible true
gconftool-2 --type bool --set /apps/nautilus/desktop/home_icon_visible true
#gconftool-2 --type bool --set /apps/nautilus/desktop/network_icon_visible true

#portland
LANG=C xdg-user-dirs-gtk-update

#Desktop GUI
sudo apt-get install ubuntu-desktop
wget -q https://www.ubuntulinux.jp/ubuntu-ja-archive-keyring.gpg -O- | sudo apt-key add -
wget -q https://www.ubuntulinux.jp/ubuntu-jp-ppa-keyring.gpg -O- | sudo apt-key add -
sudo wget https://www.ubuntulinux.jp/sources.list.d/karmic.list -O /etc/apt/sources.list.d/ubuntu-ja.list
sudo apt-get update
sudo apt-get install ubuntu-desktop-ja

#gedit
gnome-terminal --geometry=100x60-0-280

#update
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get autoreclean

grubの呪文

sudo grub-install /dev/sda
sudo update-grub2

ubuntu仮想化

こことここ
ゲストとホストの移動alt+ctrl+1,alt+ctrl+2
 sudo apt-get install ubuntu-vm-builder
コアラを作るなら
sudo ubuntu-vm-builder kvm karmic --mirror=http://jp.archive.ubuntu.com/ubuntu
sudo ubuntu-vm-builder kvm lucid --mirror=http://jp.archive.ubuntu.com/ubuntu
あとは
sudo tasksel install ubuntu-desktop 

2010年2月4日木曜日

boost 1.42.0をMSVC2005

.\bjam.exe --build-type=completeを忘れない。
FindBoost.cmakeのversionも忘れずに。

2010年2月3日水曜日

ubuntuでpythonをutf-8

sitecustomize.pyはvirtualenvではsite-package内ではなく併置

#-*- coding:utf-8 -*-

import sys
sys.setdefaultencoding('utf-8')

subversionでタグ表示

svnlook tree /path/to/repos/ tags -N
-Nでサブディレクトリは表示しない。