Friday, June 15, 2007

[Link] 今日連結 (6-15-2007)

When small is career beautiful
-- 一個值得深入研究的topic, 簡言之, 公司size是個key, 但組成的人員才是關鍵中的關鍵.
-- Mr. 6 提供的感想.

Thursday, June 14, 2007

[Link] 今日連結 (6-14-2007)

避免cross-compile的陷阱:
Avoiding libtool minefields when cross-compiling

Format My Source Code for Blogging
-- A javascript web application application that will format source code text into html for inserting into your blog.
-- 插入source code 就全靠它了!

[Linux] 945GM + ATI 9250 PCI card = upto 4 displays

這兩天又有客戶想要我們Linux support, what a free rider!
言歸正傳, 今次的主題是945GM(CRT, LVDS) + AIT 9250 PCI(CRT, DVI), 在xorg 下要輸出Quad Displays (謎之音, 為何不用4, 要用quad!? 客倌不覺得這樣比較炫嗎?)

首先, 要先檢查是不是所有的vga 都有認到, 抄傢伙 "lspci"
frodo@frodo-desktop:~$ lspci
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1e.2 Multimedia audio controller: Intel Corporation 82801G (ICH7 Family) AC'97 Audio Controller (rev 02)
00:1f.0 ISA bridge: Intel Corporation 82801GHM (ICH7-M DH) LPC Interface Bridge (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
01:06.0 VGA compatible controller: ATI Technologies Inc RV280 [Radeon 9200 PRO] (rev 01)
01:06.1 Display controller: ATI Technologies Inc RV280 [Radeon 9200 PRO] (Secondary) (rev 01)
01:08.0 Ethernet controller: Intel Corporation 82801G (ICH7 Family) LAN Controller (rev 01)



報告, 在"00:02.0" "01:06.0" 發現有不明vga 出没, 所以就順手記下這些位置.

正式動工了! 拿xorg.conf 來開刀吧!
首先是945GM 部分:
Section "Device"
Identifier "945GM"
Driver "i810"
BusID "PCI:0:2:0"
Option "MonitorLayout" "CRT,LFP"
Screen 0
EndSection

Section "Device"
Identifier "945GM-1"
Driver "i810"
BusID "PCI:0:2:0"
Screen 1
EndSection



再來處理ATI:
Section "Device"
Identifier "ati"
Driver "radeon"
BusID "PCI:1:6:0"
Option "CRT,TMDS"
Screen 2
EndSection

Section "Device"
Identifier "ati-1"
Driver "radeon"
BusID "PCI:1:6:0"
Option "CRT,TMDS"
Screen 3
EndSection



設定Monitor type
Section "Monitor"
Identifier "Acer AL1711"
Option "DPMS"
EndSection

Section "Monitor"
Identifier "Acer AL1711-1"
Option "DPMS"
EndSection
Section "Monitor"
Identifier "Acer AL1711-2"
Option "DPMS"
EndSection

Section "Monitor"
Identifier "Acer AL1711-3"
Option "DPMS"
EndSection



設定Screen,
Section "Screen"
Identifier "Screen0"
Device "945GM"
Monitor "Acer AL1711"
DefaultDepth 24
SubSection "Display"
Depth 16
Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
EndSubSection
EndSection
Section "Screen"
Identifier "Screen1"
Device "945GM-1"
Monitor "Acer AL1711-1"
DefaultDepth 24
SubSection "Display"
Depth 16
Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
EndSubSection
EndSection
Section "Screen"
Identifier "Screen2"
Device "ati"
Monitor "Acer AL1711-2"
DefaultDepth 24
SubSection "Display"
Depth 16
Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
EndSubSection
EndSection
Section "Screen"
Identifier "Screen3"
Device "ati-1"
Monitor "Acer AL1711-3"
DefaultDepth 24
SubSection "Display"
Depth 16
Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
EndSubSection
EndSection



最後是ServerLayout,
Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
Screen 2 "Screen1" RightOf "Screen1"
Screen 3 "Screen1" RightOf "Screen2"
Option "Xinerama" "on"
Option "Clone" "off"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "stylus" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
EndSection


這樣就大功告成了, 只是我現在手邊只有兩個monitor, 下次再拿兩個來指揮艇組合.

Thursday, June 07, 2007

如何整盜用wifi 的鄰居

這實在太黯然太銷魂了, 使用iptables+perl script 來惡搞content,
筆記ing, 剛好手邊有一台Linux+AP, 學起來下次試試.
Upside-Down-Ternet