xming + teratermでvmware上のlinuxからX11転送する

0 commnet
cygwinのX11 serverの調子が悪かったのでxmingでX11転送してみた。

前提条件:
 linuxマシンにssh serverがインストールされており、windowからログイン可能
 windowsマシンにteratermがインストールされている

1. xming, xming-fontsをインストール
2. xmingインストールフォルダのx0.hostsにlinuxマシンのIPアドレスを追加。

localhost
10.0.1.100

上の例だと、linuxマシンのIPは10.0.1.100。

3. linux側で環境変数DISPLAYを設定。

# export DISPLAY=10.0.1.3:0.0

10.0.1.3はwindowsマシンのIPアドレスを指定します。

4. linuxマシンの/etc/ssh/sshd.confのX11Forwarningをyesに変更。

# cat /etc/ssh/sshd.conf
...
X11Forwarding yes
...

最近はdefaultでyesのはず。変更したらsshdを再起動してください。

# /etc/init.d/ssh restart


これで設定は完了です。

teratermでlinuxマシンにsshでログインし、

# xeyes &

を実行して、windowsの画面に目玉が出てくれば正常に設定されています。

debianでiptablesの設定を保存する

0 commnet
設定の保存にはiptables-saveコマンドを使用する。
STDOUTに出力されるので、ファイルに落としたい場合はリダイレクトしてください。


lenny:/# iptables -A INPUT -p icmp -j ACCEPT
lenny:/# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT icmp -- anywhere anywhere

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
lenny:/# iptables-save
# Generated by iptables-save v1.4.2 on Tue Jun 30 22:59:22 2009
*filter
:INPUT ACCEPT [571:49060]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [492:172232]
-A INPUT -p icmp -j ACCEPT
COMMIT
# Completed on Tue Jun 30 22:59:22 2009
lenny:/# iptables-save > /etc/iptables/filter.rule



保存した設定を読み込む場合はiptables-restoreコマンドを使う。


lenny:/# iptables -F
lenny:/# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
lenny:/# iptables-restore /etc/iptables/filter.rule
lenny:/# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT icmp -- anywhere anywhere

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination



/etc/init.d/iptablesとして自動化する場合


# cat /etc/init.d/iptables
#!/bin/sh -e

CONFIG=/etc/iptables/filter.rule

. /lib/lsb/init-functions

[ -x /sbin/iptables ] || exit 0
[ -e ${CONFIG} ] || exit 0

case "$1" in
start)
log_daemon_msg "Configuration iptables"
iptables-restore $CONFIG
;;

stop)
log_daemon_msg "Deconfiguration iptables"
iptables -F
;;

*)
echo "Usage: /etc/init.d/iptables {start|stop}"
exit 1
;;
esac

exit 0

iphone OS 3.0が重い場合の対処

0 commnet
設定 -> 一般 -> ホーム -> 検索結果の表示で全てのチェックを外す。
電源ボタン長押しで電源OFF後、再起動。

自分はこれでかなり軽くなりました。
spotlightが重いのかな?