2011-02-09

Set Tor for linux and take care of internet censorship

aptitude install vidalia polipo
wget http://www.torproject.org/dist/tor-0.2.1.29.tar.gz
tar -xzvf tor-0.2.1.29.tar.gz
cd tor-xxx
./configure && make && make install
wget https://gitweb.torproject.org/torbrowser.git/blob_plain/HEAD:/build-scripts/config/polipo.conf
cp polipo.conf /etc/polipo/config
vidalia -> settings -> general
Tor
check:Start the Tor software when Vidalia starts
path:/usr/local/bin/tor
Proxy Application(optional)
check:Start a proxy applicaion when Tor starts
path:/usr/bin/polipo
ProxyApplicaion Arguments:
-c /etc/polipo/config
FireFox
install Tor addon
FireFox -> Tools -> Add-ons -> TorButton -> Preferences -> Proxy Settings
check:Use custom proxy settings
HTTP Proxy:127.0.0.1 Port:8118
SSL Proxy:127.0.0.1 Port:8118
SOCKS Host:127.0.0.1 Port:9050
check:SOCKS v5
No Proxies for:127.0.0.1
better use Test Settings button before you up some leaks.
and double check your IP by access http://ipid.shat.net/ before it.

2010-11-30

Debian Cgit nginx + simpleCGI

aptitude install nginx gitosis git-core
get cgit and build:http://hjemli.net/git/cgit/
cpan FCGI, FCGI::ProcManager,Socket


setup cgit
vi /etc/cgitrc



setup gitosis


refs1:http://gebi.supersized.org/archives/4-Installing-gitosis-on-debian.html
refs:2:http://dora.bk.tsukuba.ac.jp/~takeuchi/index.php?%A5%D7%A5%ED%A5%B0%A5%E9%A5%DF%A5%F3%A5%B0%2Fgitosis%20%A4%CB%A4%E8%A4%EB%20git%20%A5%B5%A1%BC%A5%D0%A1%BC%A4%CE%B4%C9%CD%FD
refs3:http://phichyudebow.blogspot.com/2010/07/cgit-on-debian-apache2.html

setup nginx
vi /etc/nginx/site-available/default



setup SimpleCGI:refs:http://wiki.nginx.org/SimpleCGI
vi /usr/local/bin/cgiwrap-fcgi.pl



.Start
perl /usr/local/bin/cgiwrap-fcgi.pl
bind/listen error: -> mkdir /var/run/nginx/
chmod 0666 /var/run/nginx/cgiwrap-dispatch.sock
/etc/init.d/nginx restart

2010-11-19

Bravo external display

Andoird Bravo external display






I build kernel cm-kernel 2.6.35.4 with USB host,Displaylink driver and aufs.
then my aim is use directvnc on extend monitor(usb-hosted displaylink dev).
But can not open /dev/tty0.
Does anyone know how fix it ?


by theway mplayer can play mp4 video on extend monitor from bravo device.

Forked kernel(ccyrowski/cm-kernel->defer/cm-kernel->teamdesire/cm-kernel)
then -> tknv / cm-kernel.
and modify.
+ USB host patch from sven.killig:http://sven.killig.de/android/N1/2.2/usb_host/
+ aufs from http://aufs.sourceforge.net/
+ udlfb from http://git.plugable.com/gitphp/index.php?p=udlfb&a=summary
+ Native and Chroot Debian from http://www.telesphoreo.org/pipermail/g1-hackers/2008-November/000032.html

This ROM Based on DeFroST6.0C.
How to
1.download:[ROM]:http://firestorage.jp/download/e05648f28bcd0a7582c102b3c7792b050d621dbf
2.download:native Debian set:http://firestorage.jp/download/2ba5aaebf241f4968592fbc83ffbb2020dbd83af
uncompress zip and put all in SDcard(same dir hierarchie)
3.put all download file to SDcard
4.Flash ROM to 1 ROM image(pls. backup your origin ROM)
5.Connect your USB devices,Should Powered USB hub,Displaylink USB monitor,USB keyboard(for easy input) and what ever you like.
6.Boot your bravo
7.Need gscript.apk or input your self for loading modules.
7a.from gscript:
  • load 01-ld-usb-cores -- wait loading modules and init device.
  • load 02-ld-usb-hid -- wait loading modules and init device until keyboard work etc.
  • load 03-ld-udlfb -- wait loading modules and init monitor,when active monitor show green panel.
7b.from terminal emu:
be root
  • # sh /sdcard/gscript/01-ld-usb-cores.sh.sh
  • # sh /sdcard/gscript/02-ld-usb-hid.sh.sh
  • # sh /sdcard/gscript/03-ld-udlfb.sh.sh
8.Set Debian system from terminal emu
be root
# sh /sdcard/set-deb.sh
9.Set Framebuffer env from terminal emu
Maybe already Debian system ovelay on Android linux.
# export FRAMEBUFFER=/dev/graphics/fb1
# mplayer
Then should can see video on external display.

Now I am going to fork kernel, I need help fixing can not open /dev/tty0 for running directvnc on external monitor from Android.

In the ROM there is dvd driver etc. I did not test it,Because I do not have it.
WARNING: No Guarantee,No responsibility.

P.S.
apt-get is can not use at Native Debian on Android.
If you want use apt-get, please below way.
Run debian in chroot, use /sdcard/chroot-set-deb.sh at 8 of "HOW to" sequence.
# sh /sdcard/chroot-set-deb.sh
from here in chroot.
# mount -t devpts devpts /dev/pts
# mount -t proc proc /proc
# mount -t sysfs sysfs /sys

2010-10-20

Debian squeeze usb-lcd(Displaylink) dual head

Set up USB-LCD device and set Framebuffer option for kernel

apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get clean
apt-get install build-essential xorg-dev libusb-dev git-core


git clone http://git.plugable.com/webdav/udlfb
cd udlfb
make && make install

.../build pathがないエラー

当環境でmoduleをビルドしていないからで、moduleビルドする
or
apt-get install module-assistant
m-a prepare
module-assistant:http://wiki.debian.org/ModuleAssistant

apt-get install xserver-xorg-video-fbdev

set framebuffer(It is for grub v2)
/etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet vga=xxx"
update grub
vga params:http://tldp.org/HOWTO/Framebuffer-HOWTO/x168.html#AEN235
Here also details about grub v2.

2010-10-13

Article of Russian Tea

Russian Tea

1.2 What makes it Russian
If you adhere to the above rules, you make tea. Not necessarily good tea, but real tea, nevertheless. These rules are universal, there's nothing Russian so far. What makes all the difference, is the so-called "zavarka", the tea concentrate. The Russian process of tea-making is a two stage one; First, you make the zavarka, then water it down with hot, boiled water ("kipyatok" in Russian).
...continue...

Install tools for Open Embedded

apt-get --yes install git-core subversion patch help2man diffstat texi2html makeinfo libncurses5-dev cvs gawk python-dev python-pysqlite2 unzip python-psyco dosfstools quilt build-essential

Format SDcard for Gumstix and Beagle

フォーマットするスクリプトで楽に。
2つのファイルを同じディレクトリにおいて、rootで実行。
sh fdisk_for_overoSD.sh
でフォーマットするdeviceを聞いてきます。
fdisk_for_overoSD.sh
inputs.sh

Format SDcard for Android storage

fdisk /dev/-sdcard-
- type "c" - WIN FAT 32 (LBA)
他はお好みで。
mkfs.vfat -F 32 /dev/-sdcard-1 -n FAT

Make Debian squeeze image for running debian on Android

echo 'deb http://ftp.jp.debian.org/debian squeeze main contrib non-free' > /etc/apt/sources.list
apt-get install debootstrap qemu-user-static binfmt-support
cd ~/control-project/Android-dual-head/project/src/qemu-ubuntus
wget http://kr.archive.ubuntu.com/ubuntu/pool/universe/q/qemu-kvm/qemu-kvm-extras-static_0.12.3+noroms-0ubuntu9_i386.deb
dpkg -c qemu-kvm-extras-static_0.12.3+noroms-0ubuntu9_i386.deb
*パッケージの確認
dpkg -x qemu-kvm-extras-static_0.12.3+noroms-0ubuntu9_i386.deb .
*カレントで展開
*build-arm-chrootを確認、シンボリックリンクになっているので、元を/usr/bin/build-arm-chrootにリンクを貼る。
dd if=/dev/zero of=debian.img-rc1 bs=1024 count=1950000
*おおよそ2GBのデビアン領域を作成
mkfs.ext2 -F debian.img-rc1
tune2fs -c0 debian.img-rc1
mkdir debian
mount -o loop debian.img-rc1 debian-rc1/
build-arm-chroot --verbose --arch=armel --foreign squeeze debian http://ftp.jp.debian.org/debian
mkdir debian/sdcard
mount -t proc none debian-rc1/proc/
mount -t sysfs sysfs debian-rc1/sys/
mount -t devpts devpts debian-rc1/dev/pts
chroot debian-rc1/ /bin/bash
export HOME=/root
export USER=root
export LC_ALL=C
echo 'deb http://ftp.jp.debian.org/debian squeeze main contrib non-free' > /etc/apt/sources.list
aptitude update
aptitude --yes install openssh-server
*他に必要ならAndroid上でもaptできるので後から。
aptitude clean
echo localhost > /etc/hostname
echo 'nameserver 4.2.2.2' > /etc/resolv.conf
exit
umount debian-rc1/proc
umount debian-rc1/dev/pts
umount debian-rc1/sys
umount debian-rc1/
終わり
debian.imgが目的のブツ

boot debian on chroot

export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
mkdir /sdcard/debian-rc1
losetup /dev/block/loop5 /sdcard/debian.img-rc1
mount -t ext2 /dev/block/loop5 /sdcard/debian-rc1
rm -rf /sdcard/debian-rc1/tmp
mkdir /sdcard/debian-rc1/tmp
mount -t devpts devpts /sdcard/debian-rc1/dev/pts
mount -t proc proc /sdcard/debian-rc1/proc
mount -t sysfs sysfs /sdcard/debian-rc1/sys
mount -o bind /dev /sdcard/debian-rc1/dev
busybox mount /sdcard /sdcard/debian-rc1/root/sdcard
sysctl -w net.ipv4.ip_forward=1
chroot /sdcard/debian-rc1 /bin/bash

framebuffer vgaなどの設定

/boot/grub/menu.lstの
kernel /boot/vmlinuz-2.9.53-7-686 root=/dev/sda1 ro vga=771
この値が、bootで選択するものとなる。
vgaの設定がないと、framebufferすら有効にならん。
vgaの値について
値 解像度 色
771 800x600 256色
773 1024x7682 256色
775 1280x1024 256色
788 800x600 6万5000色
791 1024x768 6万5000色
794 1280x1024 6万5000色
789 800x600 1600万色
792 1024x768 1600万色
795 1280x1024 1600万色

GUIの停止、x-serverによるGUIの停止

aptitude removeする方法
/etc/init.d/(g)dm stopする方法(x)dmだったり環境しだい。

2010-09-09

ちょっと為になるいい話

巻紙で有名な、RIZLAは、聖書の紙を作ってたメーカー。
GIZEHは、ドイツの会社なんですが、パピルスを発明したエジプト由来の名前。

眠い、windowsのサーバはホント触りたくない、意味が分からない事が多すぎ

盆休み、まだ、とれない。
もう、盆も終わって、夏でもなくなり、あーあ。
暖かい、ところで休みたい。

---- windows7 delete service ----
C:\Windows\Microsoft.NET\Framework\v2.0.50727>sc.exe delete FooService
[SC] OpenService FAILED 5:

アクセスが拒否されました。

then

C:\Windows\System32\cmd.exeを管理者で開いて、同様におこなうと、SUCCESS

--------------------------
'/FOO_web' アプリケーションでサーバー エラーが発生しました。
--------------------------------------------------------------------------------

パーサー エラー
説明: この要求の処理に必要なリソースの解析中にエラーが発生しました。以下の解析エラーの詳細を確認し、ソースファイルに変更を加えてください。

パーサー エラー メッセージ: アセンブリ 'App_Web_Foo' を読み込めませんでした。ページにアクセスする前にアセンブリがコンパイルされているかどうか確認してください。

ソース エラー:


行 1: <%@ page language="C#" autoeventwireup="true" inherits="Login, App_Web_Foo" %>
行 2:
行 3:


ソース ファイル: /FOO_web/Login.aspx 行: 1


--------------------------------------------------------------------------------
バージョン情報: Microsoft .NET Framework バージョン:2.0.50727.4927; ASP.NET バージョン:2.0.50727.4927

------------------
/bin/App_Web_Foo.dllがあるか確かめる、なければ、正しいdllを指定。

BCM4321 on Latitude D430

At kernel 3 find wireless hardware lspci | grep -i wireless  check using current kernel module with PCI bus address lspci -vv -s 0c:...