<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>小兔的筆記本</title>
	<atom:link href="http://usagiblog.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://usagiblog.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Mon, 18 Apr 2011 11:49:52 +0000</lastBuildDate>
	<language>zh-tw</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='usagiblog.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>小兔的筆記本</title>
		<link>http://usagiblog.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://usagiblog.wordpress.com/osd.xml" title="小兔的筆記本" />
	<atom:link rel='hub' href='http://usagiblog.wordpress.com/?pushpress=hub'/>
		<item>
		<title>在Linux下關閉純文字介面的螢幕保護</title>
		<link>http://usagiblog.wordpress.com/2007/12/13/disable_screen_auto_blanking_in_linux_console/</link>
		<comments>http://usagiblog.wordpress.com/2007/12/13/disable_screen_auto_blanking_in_linux_console/#comments</comments>
		<pubDate>Wed, 12 Dec 2007 21:18:11 +0000</pubDate>
		<dc:creator>Tsukino Usagi</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[開機時自動執行]]></category>
		<category><![CDATA[電源]]></category>
		<category><![CDATA[螢幕]]></category>
		<category><![CDATA[setterm]]></category>

		<guid isPermaLink="false">http://usagiblog.wordpress.com/2007/12/13/disable_screen_auto_blanking_in_linux_console/</guid>
		<description><![CDATA[Linux主機可以按照需求選擇純文字介面來使用, 若將系統調校成開機時不進入XWindow, 開機之後會進入純文字模式, 預設情況下, 閒置一段時間之後螢幕會整個變黑(但是螢幕電源還在), 若是想關閉這個功能, 執行: setterm -powersave off -blank 0 即可(一定要在本機執行, 遠端ssh進去執行沒有作用). 要是想每次開機執行此指令, 以Ubuntu 7.10為例, 修改/etc/init.d/bootmisc.sh, 在大約第68行的地方改成像下面這樣(必須先變身成root): case "$1" in start&#124;"") do_start setterm -powersave off -blank 0 ;; 即可. 其他有/etc/rc.d/rc.local的Linux distrobution則寫在該檔的最後一行即可. 其實這種半調子的「螢幕保護」方式害我好幾次沒注意到螢幕還開著&#8230;.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=142&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Linux主機可以按照需求選擇純文字介面來使用, 若將系統調校成開機時不進入XWindow, 開機之後會進入純文字模式, 預設情況下, 閒置一段時間之後螢幕會整個變黑(但是螢幕電源還在), 若是想關閉這個功能, 執行:</p>
<table border="1">
<tbody>
<tr>
<td>
<pre>setterm -powersave off -blank 0
</pre>
</td>
</tr>
</tbody>
</table>
<p>即可(一定要在本機執行, 遠端ssh進去執行沒有作用).</p>
<p>要是想每次開機執行此指令, 以Ubuntu 7.10為例, 修改/etc/init.d/bootmisc.sh, 在大約第68行的地方改成像下面這樣(必須先變身成root):</p>
<table border="1">
<tbody>
<tr>
<td>
<pre>case "$1" in
  start|"")
        do_start
        setterm -powersave off -blank 0
        ;;
</pre>
</td>
</tr>
</tbody>
</table>
<p>即可.</p>
<p>其他有/etc/rc.d/rc.local的Linux distrobution則寫在該檔的最後一行即可.</p>
<p>其實這種半調子的「螢幕保護」方式害我好幾次沒注意到螢幕還開著&#8230;.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/usagiblog.wordpress.com/142/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/usagiblog.wordpress.com/142/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usagiblog.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usagiblog.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usagiblog.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usagiblog.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usagiblog.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usagiblog.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usagiblog.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usagiblog.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usagiblog.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usagiblog.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usagiblog.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usagiblog.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usagiblog.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usagiblog.wordpress.com/142/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=142&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usagiblog.wordpress.com/2007/12/13/disable_screen_auto_blanking_in_linux_console/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d148c335cf2b58659367262f1de149b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">usagiblog</media:title>
		</media:content>
	</item>
		<item>
		<title>使用MeGUI將DVD轉成H.264視訊檔</title>
		<link>http://usagiblog.wordpress.com/2007/12/06/convert_dvd_video_to_h264_using_megui/</link>
		<comments>http://usagiblog.wordpress.com/2007/12/06/convert_dvd_video_to_h264_using_megui/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 06:47:20 +0000</pubDate>
		<dc:creator>Tsukino Usagi</dc:creator>
				<category><![CDATA[多媒體]]></category>
		<category><![CDATA[.mkv製作]]></category>
		<category><![CDATA[DVD備份]]></category>
		<category><![CDATA[音效壓縮]]></category>
		<category><![CDATA[視訊壓縮]]></category>
		<category><![CDATA[轉檔]]></category>
		<category><![CDATA[H.264]]></category>
		<category><![CDATA[MeGUI]]></category>
		<category><![CDATA[x264]]></category>

		<guid isPermaLink="false">http://usagiblog.wordpress.com/2007/12/06/convert_dvd_video_to_h264_using_megui-2/</guid>
		<description><![CDATA[本文將介紹將DVD格式的影片轉換成H.264的視訊檔的方法. 注意事項: 本文所用的轉檔方式是採用x264獨立的轉檔程式, 搭配MeGUI, 並非透過vfw, 因此照著本教學進行下去, 並不會影響系統裡現有的vfw codec, 適合不喜歡裝一大堆雜七雜八codec的人用. 一些轉檔的參數設定是作者的喜好, 每個人對畫質, 音質的喜好, 儲存空間的要求和願意花在轉檔時間的長短並不相同. 本文僅提供一個方向讓讀者學會如何轉檔, 希望讀者們在多次嘗試之後, 找出適合自己的轉檔參數和方式. 複製有版權保護的DVD可能會觸犯您所在地區的法律. 準備軟體: DVD Decrypter: 用來將DVD格式的影音光碟的內容複製到硬碟, 由於這軟體的官方網站已關閉, 且本身不再更新, 因此請自行尋找. 安裝過程很簡單, 但安裝程式若詢問是否連上官方網站檢查更新, 記得回答「否」. MeGUI: 主要用來轉檔的軟體, 此軟體需配合.NET Framework 2.0才能正常運作, 記得一併安裝. mkvtoolnix: 將轉檔完的視訊, 音訊和字幕打包成.mkv檔的軟體, 雖然MeGUI已內建此功能, 不過無法滿足較特殊的需求(例如視訊縱橫比微調等等), 因此打包的部份, 另外用它來做. VobSub: 用來從DVD當中抽取字幕用, 若不打算處理字幕則可以不用安裝. 官方網站沒有提供它的binary, 得自行尋找. 安裝過程當中請選擇自訂安裝, 所有的元件都「不要」打勾, 因為只是要用它抽取字幕, 用它裝的.dll檔就夠了. AviSynth: 以frameserver型式來作視訊檔處理的軟體, MeGUI當中的影片裁切, 去雜訊, 去交錯等等功能都靠它運作, 下載時只需要下載主程式即可, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=141&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>本文將介紹將<a href="http://en.wikipedia.org/wiki/Dvd" target="_blank">DVD</a>格式的影片轉換成<a href="http://en.wikipedia.org/wiki/H.264" target="_blank">H.264</a>的視訊檔的方法.</p>
<p>注意事項:</p>
<ul>
<li>本文所用的轉檔方式是採用<a href="http://www.videolan.org/developers/x264.html" target="_blank">x264</a>獨立的轉檔程式, 搭配MeGUI, 並非透過<a href="http://en.wikipedia.org/wiki/Video_for_Windows" target="_blank">vfw</a>, 因此照著本教學進行下去, 並不會影響系統裡現有的vfw <a href="http://en.wikipedia.org/wiki/Codec" target="_blank">codec</a>, 適合不喜歡裝一大堆雜七雜八codec的人用.
<li>一些轉檔的參數設定是作者的喜好, 每個人對畫質, 音質的喜好, 儲存空間的要求和願意花在轉檔時間的長短並不相同. 本文僅提供一個方向讓讀者學會如何轉檔, 希望讀者們在多次嘗試之後, 找出適合自己的轉檔參數和方式.
<li>複製有版權保護的DVD可能會觸犯您所在地區的法律. </li>
</ul>
<p>準備軟體:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/DVD_Decrypter" target="_blank">DVD Decrypter</a>: 用來將DVD格式的影音光碟的內容複製到硬碟, 由於這軟體的官方網站已關閉, 且本身不再更新, 因此請自行<a href="http://www.google.com/search?q=dvd%20decrypter" target="_blank">尋找</a>. 安裝過程很簡單, 但安裝程式若詢問是否連上官方網站檢查更新, 記得回答「否」.
<li><a href="http://sourceforge.net/projects/megui" target="_blank">MeGUI</a>: 主要用來轉檔的軟體, 此軟體需配合<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&amp;DisplayLang=en" target="_blank">.NET Framework 2.0</a>才能正常運作, 記得一併安裝.
<li><a href="http://www.bunkus.org/videotools/mkvtoolnix/downloads.html" target="_blank">mkvtoolnix</a>: 將轉檔完的視訊, 音訊和字幕打包成.mkv檔的軟體, 雖然MeGUI已內建此功能, 不過無法滿足較特殊的需求(例如視訊縱橫比微調等等), 因此打包的部份, 另外用它來做.
<li><a href="http://sourceforge.net/projects/guliverkli/" target="_blank">VobSub</a>: 用來從DVD當中抽取字幕用, 若不打算處理字幕則可以不用安裝. 官方網站沒有提供它的binary, 得自行<a href="http://www.google.com/search?q=vobsub" target="_blank">尋找</a>. 安裝過程當中請選擇自訂安裝, 所有的元件都「不要」打勾, 因為只是要用它抽取字幕, 用它裝的.dll檔就夠了.
<li><a href="http://avisynth.org/mediawiki/Main_Page" target="_blank">AviSynth</a>: 以frameserver型式來作視訊檔處理的軟體, MeGUI當中的影片裁切, 去雜訊, 去交錯等等功能都靠它運作, 下載時只需要下載主程式即可, 安裝時不用更改任何選項.
<li>若您還有<a href="http://www.xvid.org/" target="_blank">XviD</a>轉檔的需求, 不妨考慮直接安裝<a href="http://www.autogk.me.uk/" target="_blank">AutoGK</a>, 它包含了VobSub和AviSynth這兩個軟體. </li>
</ul>
<p>將DVD影音光碟的內容複製到硬碟:</p>
<ol>
<li>執行DVD Decrypter, 在Source裡選擇DVD光碟所在的光碟機, 接著從功能表中選Mode→IFO(或者直接按鍵盤上的「I」鍵). <br /><img style="border-width:0;" height="374" alt="dd1" src="http://usagiblog.files.wordpress.com/2007/12/dd1.png?w=582&#038;h=374" width="582" border="0">
<li>右邊會以樹狀結構現此光碟所有的標題(Title)和章節(Chapter), 如果光碟內容是連續劇之類的影片, 可以預先替每一個章節各建立一個空資料夾, 方便作業. 接著右邊將要複製的標題選取起來, 左邊Destination則點資料夾的圖示, 出現瀏覽資料夾的視窗時選擇要存放的資料夾, 並按下方按鈕開始將DVD的內容複製到硬碟. <br /><img style="border-width:0;" height="374" alt="dd2" src="http://usagiblog.files.wordpress.com/2007/12/dd2.png?w=579&#038;h=374" width="579" border="0">
<li>接著會出現進度畫面 <br /><img style="border-width:0;" height="373" alt="dd3" src="http://usagiblog.files.wordpress.com/2007/12/dd3.png?w=582&#038;h=373" width="582" border="0">
<li>完成時會出現此畫面 <br /><img style="border-width:0;" height="143" alt="dd4" src="http://usagiblog.files.wordpress.com/2007/12/dd4.png?w=259&#038;h=143" width="259" border="0">
<li>重覆步驟2至4, 將DVD光碟裡所有要轉檔的標題都複製到硬碟. </li>
</ol>
<p>更新MeGUI:</p>
<ol>
<li>第一次啟動MeGUI時會作更新, 主要是更新MeGUI用到的其他軟體(畢竟MeGUI只是個<a href="http://en.wikipedia.org/wiki/Front_end" target="_blank">frontend</a>, 很多動作都是呼叫外部程式來完成), 以及轉檔用到的設定值以及AviSynth用到的Plugins.
<li>啟動MeGUI之後若出現「Updates Available」的視窗時, 選「是」進行更新. <br /><img style="border-width:0;" height="512" alt="megui update" src="http://usagiblog.files.wordpress.com/2007/12/megui-update.png?w=531&#038;h=512" width="531" border="0">
<li>點Update更新. <br /><img style="border-width:0;" height="416" alt="megui update2" src="http://usagiblog.files.wordpress.com/2007/12/megui-update2.png?w=662&#038;h=416" width="662" border="0">
<li>更新過程當中若出現選擇設定值的畫面, 請全部選取(選第一個, 再按Shift點最後一個), 並按Import匯入所有的設定值. <br /><img style="border-width:0;" height="359" alt="megui update3" src="http://usagiblog.files.wordpress.com/2007/12/megui-update3.png?w=406&#038;h=359" width="406" border="0"> <br /><img style="border-width:0;" height="365" alt="megui update4" src="http://usagiblog.files.wordpress.com/2007/12/megui-update4.png?w=410&#038;h=365" width="410" border="0">
<li>更新完的畫面應該是這個樣子, 可以再點「Update」確認所有的檔案都正確地更新了. <br /><img style="border-width:0;" height="427" alt="megui update5" src="http://usagiblog.files.wordpress.com/2007/12/megui-update5.png?w=667&#038;h=427" width="667" border="0">&nbsp; </li>
</ol>
<p>影音分離及前置處理:</p>
<ol>
<li>在MeGUI主畫面下, 選「Tools」→「D2V Creator」. <br /><img style="border-width:0;" height="521" alt="megui01" src="http://usagiblog.files.wordpress.com/2007/12/megui01.png?w=539&#038;h=521" width="539" border="0">
<li>點「Video Input」右邊的按鈕, 出現開啟舊檔畫面時, 選擇第一個.VOB檔開啟. <br /><img style="border-width:0;" height="542" alt="megui02" src="http://usagiblog.files.wordpress.com/2007/12/megui02.png?w=643&#038;h=542" width="643" border="0">
<li>接著選擇「Demux al Audio Tracks」, 按一下「Queue」, 接著將此視窗關閉. <br /><img style="border-width:0;" height="342" alt="megui03" src="http://usagiblog.files.wordpress.com/2007/12/megui03.png?w=468&#038;h=342" width="468" border="0">
<li>切換到「Queue」頁面, 並按「Start」開始執行抽出音軌及建立.d2v檔的動作. <br /><img style="border-width:0;" height="519" alt="megui04" src="http://usagiblog.files.wordpress.com/2007/12/megui04.png?w=533&#038;h=519" width="533" border="0">
<li>若您是第一次使用MeGUI, 會看到此畫面, 回答「是」, 並輸入Worker的名稱, 建立新的Worker(可隨意輸入).<img style="border-width:0;" height="139" alt="megui05" src="http://usagiblog.files.wordpress.com/2007/12/megui05.png?w=703&#038;h=139" width="703" border="0"> <br /><img style="border-width:0;" height="168" alt="megui06" src="http://usagiblog.files.wordpress.com/2007/12/megui06.png?w=376&#038;h=168" width="376" border="0">
<li>轉檔時會出現像這樣的進度畫面, 請等它跑完, 畫面的「Priority」是調整轉檔工作的優先權, 作者實驗的結果發現調這裡對轉檔快慢與否影響不大, 反而是調到「HIGH」時電腦整個動彈不得. <br /><img style="border-width:0;" height="544" alt="megui07" src="http://usagiblog.files.wordpress.com/2007/12/megui07.png?w=593&#038;h=544" width="593" border="0">
<li>完成時剛才那個進度畫面會消失, 「Worker」畫面會像下圖這樣, 而「Queue」畫面裡剛才的工作會顯示「done」字樣. <br /><img style="border-width:0;" height="542" alt="megui08" src="http://usagiblog.files.wordpress.com/2007/12/megui08.png?w=595&#038;h=542" width="595" border="0">
<li>回到MeGUI主畫面, 選擇「Tools」→「AviSynth Script Creator」. <br /><img style="border-width:0;" height="517" alt="megui09" src="http://usagiblog.files.wordpress.com/2007/12/megui09.png?w=536&#038;h=517" width="536" border="0">
<li>點「Video Input」右邊的按鈕, 選擇剛才建立的.d2v檔. <br /><img style="border-width:0;" height="576" alt="megui10" src="http://usagiblog.files.wordpress.com/2007/12/megui10.png?w=613&#038;h=576" width="613" border="0">
<li>檔案開啟之後會另外出現畫面預覽的視窗:
<ul>
<li>「Input DAR」右邊的下拉式選單這裡通常會偵測影片的格式和縱橫比, 若偵測錯誤的話再修改即可(台灣通常是NTSC, 若是片源是16:9加上下黑邊之後形成的4:3, 也選擇4:3, 稍後再做處理).
<li>接下來將「Crop」打勾, 再按「Auto Crop」按鈕自動裁切影片黑邊(若影片本身就是以暗畫面為主, 這裡可能會偵測錯誤, 請手動調整中間的數字.)
<li>接下來將「Resize」打勾, 再調整影片畫面的寬度和高度, 注意寬度和高度必須為16的倍數, 若您的影片不是4:3, 請參考本文下方關於畫面縱橫比的說明. <br /><img style="border-width:0;" height="514" alt="megui11" src="http://usagiblog.files.wordpress.com/2007/12/megui11.png?w=454&#038;h=514" width="454" border="0"> </li>
</ul>
<li>接著切換到「Filters」的頁面, 按「Analyse」鈕開始分析影片, 它會找出這影片適合用哪一種方式去交錯(拉絲的現象). <br /><img style="border-width:0;" height="513" alt="megui12" src="http://usagiblog.files.wordpress.com/2007/12/megui12.png?w=454&#038;h=513" width="454" border="0">
<li>以下針對此畫面的選項一一說明
<ol>
<li>去交錯偵測完成時使用它偵測出來的設定值即可, 但有時候會出現它偵測的結果說不需要去交錯, 但卻很明顯在預覽畫面裡看到拉絲現象時, 請將「Deinterlace」打勾, 「Source type」選「Interlaced」.
<li>若片源是卡通, 「Source is Anime」請務必打勾.
<li>若片源大量用柔焦效果, 或者是用DV拍攝成的影片, 「Resize Filter」可以選「Bicubic(Neutral)」, 否則盡量選「Lanczos(Sharp)」.
<li>「Noise Filter」打勾, 右邊選「Minimal Noise」, 若片源雜訊情況嚴重, 可以試著調整這裡的設定值看是否能改善.
<li>若片源是DVD, 「Mpeg2Deblocking」通常是不勾的, 除非片源有嚴重到很離譜的方塊出現(像衛星電視或數位電視訊號變差時的那種樣子)才需要打勾.
<li>「Colour Correction」通常要打勾, 可以改善影片顏色上的一些問題(卡通會比較明顯)
<li>接著按「Preview AVS Script」看看輸出的影片的樣子, 若覺得滿意, 就按「Save」存檔. <br /><img style="border-width:0;" height="512" alt="megui13" src="http://usagiblog.files.wordpress.com/2007/12/megui13.png?w=450&#038;h=512" width="450" border="0">&nbsp; <br /><img style="border-width:0;" height="505" alt="megui14" src="http://usagiblog.files.wordpress.com/2007/12/megui141.png?w=578&#038;h=505" width="578" border="0"> </li>
</ol>
<li>接著回到主畫面, 點「Audio Input」右邊的按鈕, 開啟之前抽出的音訊檔(可能是.wav或.ac3). <br /><img style="border-width:0;" height="513" alt="megui15" src="http://usagiblog.files.wordpress.com/2007/12/megui15.png?w=644&#038;h=513" width="644" border="0">
<li>只有左右聲道的音訊, 作者是習慣壓成.ogg, 在「Codec」這裡選「Ogg Vorbis」, 點「Config」之後, 會出現調整音訊品質的畫面, 在這裡把品質調到3.0, 並按「New」建立一個自己的設定檔. <br /><img style="border-width:0;" height="631" alt="megui16" src="http://usagiblog.files.wordpress.com/2007/12/megui16.png?w=537&#038;h=631" width="537" border="0">
<li>回到主畫面時按「Enqueue」. <br /><img style="border-width:0;" height="516" alt="megui17" src="http://usagiblog.files.wordpress.com/2007/12/megui17.png?w=535&#038;h=516" width="535" border="0">
<li>接著按「Audio Input」右邊的按鈕選擇另一個音訊檔, 「Audio Profile」就直接選剛才建立的設定檔, 按「Enqueue」排進排程即可. <br /><img style="border-width:0;" height="518" alt="megui18" src="http://usagiblog.files.wordpress.com/2007/12/megui18.png?w=534&#038;h=518" width="534" border="0">
<li>接著按「Queue」切換到排程工作頁面, 按「Start」開始音訊壓縮的工作. <br /><img style="border-width:0;" height="518" alt="megui19" src="http://usagiblog.files.wordpress.com/2007/12/megui19.png?w=533&#038;h=518" width="533" border="0"> <br /><img style="border-width:0;" height="518" alt="megui20" src="http://usagiblog.files.wordpress.com/2007/12/megui20.png?w=535&#038;h=518" width="535" border="0">
<li>音訊都壓縮好之後回到「Input」頁面, 確認「AviSynth Script」是剛才建立的檔案, 「Codec」是「x264」, 「File format」是「MKV」之後, 「Video profile」這裡選「HQ-Slower」(若片源是卡通, 請選「AE-Goodquality」). <br /><img style="border-width:0;" height="517" alt="megui20-2" src="http://usagiblog.files.wordpress.com/2007/12/megui20-2.png?w=536&#038;h=517" width="536" border="0">
<li>主畫面選「Tools」→「Bitrate Calculator」: <br /><img style="border-width:0;" height="515" alt="megui20-3" src="http://usagiblog.files.wordpress.com/2007/12/megui20-3.png?w=535&#038;h=515" width="535" border="0">
<li>在Bitrate Calculator畫面裡, 選擇「Audio1」裡頭的「Select」, 開啟剛剛「壓縮好的」音訊檔. <br /><img style="border-width:0;" height="540" alt="megui22" src="http://usagiblog.files.wordpress.com/2007/12/megui22.png?w=664&#038;h=540" width="664" border="0">
<li>接著在「Audio1」這個頁籤上點右鍵, 選「Add track」, 並一樣按「Select」選另一個壓縮好的音訊檔. <br /><img style="border-width:0;" height="427" alt="megui23" src="http://usagiblog.files.wordpress.com/2007/12/megui23.png?w=609&#038;h=427" width="609" border="0"> <br /><img style="border-width:0;" height="542" alt="megui24" src="http://usagiblog.files.wordpress.com/2007/12/megui24.png?w=733&#038;h=542" width="733" border="0">
<li>確認「Video」, 「Codecs」, 「Container」裡的數值都跟目前要轉檔的影片符合, 點「Total Size」裡的箭頭, 選擇或輸入這個影片轉檔之後希望的大小(若要燒錄成光碟, 為了預留字幕或其他檔案的空間, 可以稍微降低一點大小), 選好之後記下「Result」裡的Bitrate值, 並按「Apply」離開此畫面. <br /><img style="border-width:0;" height="506" alt="megui25" src="http://usagiblog.files.wordpress.com/2007/12/megui25.png?w=714&#038;h=506" width="714" border="0"> <br /><img style="border-width:0;" height="168" alt="megui26" src="http://usagiblog.files.wordpress.com/2007/12/megui26.png?w=361&#038;h=168" width="361" border="0">
<li>回到主畫面之後按「Config」, 先檢查「Bitrate」裡的值是否跟剛剛在Bitrate Calculator 計算的是否一樣, 接著按「Profiles」裡的「New」, 替這個設定檔取一個名字, 往後片源相同的轉檔就直接用這個設定值. <br /><img style="border-width:0;" height="708" alt="megui27" src="http://usagiblog.files.wordpress.com/2007/12/megui27.png?w=604&#038;h=708" width="604" border="0">
<li>按「Enqueue」把視訊轉檔的工作排進排程. <br /><img style="border-width:0;" height="520" alt="megui28" src="http://usagiblog.files.wordpress.com/2007/12/megui28.png?w=534&#038;h=520" width="534" border="0">
<li>接著切換到「Queue」頁面, 按「Start」開始漫長的轉檔時間. <br /><img style="border-width:0;" height="515" alt="megui29" src="http://usagiblog.files.wordpress.com/2007/12/megui29.png?w=530&#038;h=515" width="530" border="0"> <br /><img style="border-width:0;" height="516" alt="megui30" src="http://usagiblog.files.wordpress.com/2007/12/megui30.png?w=535&#038;h=516" width="535" border="0">
<li>都完成之後會像下圖這個樣子 <br /><img style="border-width:0;" height="519" alt="megui31" src="http://usagiblog.files.wordpress.com/2007/12/megui31.png?w=536&#038;h=519" width="536" border="0"> </li>
</ol>
<p>從DVD當中抽取字幕:</p>
<ol>
<li>在Windows工作列中, 點「開始」→「執行」, 輸入「rundll32.exe vobsub.dll,Configure」 <br /><img style="border-width:0;" height="196" alt="vobsub01" src="http://usagiblog.files.wordpress.com/2007/12/vobsub01.png?w=359&#038;h=196" width="359" border="0">
<li>出現VobSub視窗之後, 點左下角的「Open」, 檔案類型選「*.ifo」, 接著找到由DVD Decrypter複製到硬碟的.ifo檔並開啟它.&nbsp; <br /><img style="border-width:0;" height="538" alt="vobsub02" src="http://usagiblog.files.wordpress.com/2007/12/vobsub021.png?w=679&#038;h=538" width="679" border="0">
<li>選擇字幕檔要放在哪個資料夾, 建議存放在轉檔時存的資料夾以方便作業. <br /><img style="border-width:0;" height="388" alt="vobsub03" src="http://usagiblog.files.wordpress.com/2007/12/vobsub03.png?w=343&#038;h=388" width="343" border="0">
<li>參考下圖所示選擇要抽取的字幕軌(要抽取的字幕軌要在右邊), 並按「Ok」開始抽取字幕. <br /><img style="border-width:0;" height="411" alt="vobsub04" src="http://usagiblog.files.wordpress.com/2007/12/vobsub04.png?w=346&#038;h=411" width="346" border="0"> <br /><img style="border-width:0;" height="184" alt="vobsub05" src="http://usagiblog.files.wordpress.com/2007/12/vobsub05.png?w=356&#038;h=184" width="356" border="0">
<li>字幕抽取完成時會是這個畫面 <br /><img style="border-width:0;" height="185" alt="vobsub06" src="http://usagiblog.files.wordpress.com/2007/12/vobsub06.png?w=354&#038;h=185" width="354" border="0">&nbsp; </li>
</ol>
<p>將視訊, 音訊和字幕合併:</p>
<ol>
<li>執行mkvtoolnix附帶的mkvmerge GUI, 點右上角的「add」, 開啟轉檔好的視訊檔. <br /><img style="border-width:0;" height="694" alt="mkvmerge01" src="http://usagiblog.files.wordpress.com/2007/12/mkvmerge01.png?w=616&#038;h=694" width="616" border="0">
<li>接著按照相同的步驟, 依序加入音訊檔和字幕檔, 第一個加入的音訊和字幕會成為預設值, 因此請留意加入的順序. <br /><img style="border-width:0;" height="694" alt="mkvmerge02" src="http://usagiblog.files.wordpress.com/2007/12/mkvmerge02.png?w=614&#038;h=694" width="614" border="0">
<li>全部都加好之後畫面會像下面這個樣子. <br /><img style="border-width:0;" height="698" alt="mkvmerge03" src="http://usagiblog.files.wordpress.com/2007/12/mkvmerge03.png?w=615&#038;h=698" width="615" border="0">
<li>接下來在「Tracks」裡點選視訊(找「type: video」這個), 並點下方的「Format specific options」, 選擇「Display width/height」, 右邊輸入影片的長度和寬度(參考本文下方關於畫面縱橫比的說明): <br /><img style="border-width:0;" height="696" alt="mkvmerge04" src="http://usagiblog.files.wordpress.com/2007/12/mkvmerge04.png?w=617&#038;h=696" width="617" border="0">
<li>按「Start Muxing」開始產生合併的檔案. <br /><img style="border-width:0;" height="694" alt="mkvmerge05" src="http://usagiblog.files.wordpress.com/2007/12/mkvmerge05.png?w=739&#038;h=694" width="739" border="0">
<li>合併完之後畫面會像下面這個樣子, 接下來就試試檔案能不能正常播放吧. <br /><img style="border-width:0;" height="576" alt="mkvmerge06" src="http://usagiblog.files.wordpress.com/2007/12/mkvmerge06.png?w=517&#038;h=576" width="517" border="0">&nbsp; </li>
</ol>
<p>關於畫面縱橫比:</p>
<ul>
<li>在進行x264轉檔時有畫面的寬度和高度必須為16的倍數的限制, 但是.mkv可以在播放時進行縮放(使用與原本視訊資料不同的解析度), 若是轉16:9的影片, 在建立AviSynth Script這個步驟時, 可以先輸入一個接近16:9比例的數字, 到最後包成.mkv檔時再調整到正確的比例, 整理如下: <br /> <br />
<table cellspacing="0" cellpadding="2" width="508" border="1">
<tbody>
<tr>
<td valign="top" width="126">畫面比例</td>
<td valign="top" width="120">4:3</td>
<td valign="top" width="133">16:9</td>
<td valign="top" width="127">16:9<a href="http://en.wikipedia.org/wiki/Letterbox" target="_blank">Letterbox</a>成4:3</td>
</tr>
<tr>
<td valign="top" width="127">建立AviSynth Script時用的解析度</td>
<td valign="top" width="121">640&#215;480</td>
<td valign="top" width="133">704&#215;400</td>
<td valign="top" width="127">640&#215;368</td>
</tr>
<tr>
<td valign="top" width="129">包成.mkv時調整成</td>
<td valign="top" width="122">640&#215;480(不用調整)</td>
<td valign="top" width="133">711&#215;400(左右拉寬)或704&#215;396(上下壓扁)</td>
<td valign="top" width="127">654&#215;368(左右拉寬)或640&#215;360(上下壓扁)</td>
</tr>
</tbody>
</table>
<p>您也可以去下載 <a href="http://aspect.fre3.com/index.html" target="_blank">Aspect</a>這個專用的計算程式來找出適合的解析度, 雖然這軟體的計算方式是以.avi為基礎, 不過還是有參考的價值. </li>
</ul>
<ul></ul>
<ul></ul>
<ul></ul>
<ul></ul>
<p>補充說明:</p>
<ul>
<li>事實上MeGUI還有更自動化和更方便的使用方式(例如AutoEncode和One Click Encoder等), 本文是針對初次使用MeGUI以及尚未熟悉轉檔原理的使用者而編寫, 因此未加以說明, 若您有重覆壓製相同片源的需求(例如連續劇), 而且相關設定檔也都建立過了, 不妨嘗試看看.
<li>關於轉檔時用的設定值和參數必須隨著影片內容而作調整, 作者的經驗和建議如下:
<ul>
<li>一般影片以2-pass, 1200kbps為基準, 影片內容要是有大量動態畫面和特效則增加bitrate值, 要是以靜態畫面為主則減少.
<li>靜態畫面為主的卡通以2-pass, 750kbps為基準, 要是動態畫面或特效用很多, 則增加bitrate值.
<li>音訊的部份, 要是只有立體聲則一律壓成ogg vorbis, 品質設定在3.0~5.0之間.
<li>音訊的部份, 要是影片本身就是以音樂演奏為主的影片, 就考慮不做壓縮, 直接將抽出的音軌包進.mkv裡.
<li>無法忍受漫長轉檔時間的人, 可以考慮Single Pass Quantizer或Single Pass Quality的方式轉檔, 注意Single Pass Quantizer模式下quantizer值越高, 品質越差. </li>
</ul>
<li>MeGUI也可以用在DVD以外的片源轉檔, 視訊部份只要能讓AviSynth處理即可, 音訊部份可以先還原成.wav, 再讓MeGUI處理即可.
<li>字幕的部份, 本文的作法是直接將DVD抽出的字幕包進.mkv, DVD的字幕其實是一張張的圖檔, 若有需要辨識成文字再進一步編輯, 不妨去找<a href="http://www.google.com/search?q=sub轉srt" target="_blank">相關教學</a>, 轉成文字格式(.srt, .ssa或.ass)後的字幕一樣可以用本文裡的方式包進.mkv裡. </li>
</ul>
<p>參考資料:</p>
<ul>
<li><a title="http://forum.doom9.org/showthread.php?t=96032" href="http://forum.doom9.org/showthread.php?t=96032">http://forum.doom9.org/showthread.php?t=96032</a>
<li><a title="http://forum.doom9.org/showthread.php?t=101813" href="http://forum.doom9.org/showthread.php?t=101813">http://forum.doom9.org/showthread.php?t=101813</a>
<li><a title="http://mewiki.project357.com/wiki/Guides:Basic_Guide" href="http://mewiki.project357.com/wiki/Guides:Basic_Guide">http://mewiki.project357.com/wiki/Guides:Basic_Guide</a>
<li><a title="http://www.digital-digest.com/articles/x264_options_page2.html" href="http://www.digital-digest.com/articles/x264_options_page2.html">http://www.digital-digest.com/articles/x264_options_page2.html</a> </li>
</ul>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/usagiblog.wordpress.com/141/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/usagiblog.wordpress.com/141/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usagiblog.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usagiblog.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usagiblog.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usagiblog.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usagiblog.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usagiblog.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usagiblog.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usagiblog.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usagiblog.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usagiblog.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usagiblog.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usagiblog.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usagiblog.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usagiblog.wordpress.com/141/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=141&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usagiblog.wordpress.com/2007/12/06/convert_dvd_video_to_h264_using_megui/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d148c335cf2b58659367262f1de149b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">usagiblog</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/dd1.png" medium="image">
			<media:title type="html">dd1</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/dd2.png" medium="image">
			<media:title type="html">dd2</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/dd3.png" medium="image">
			<media:title type="html">dd3</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/dd4.png" medium="image">
			<media:title type="html">dd4</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui-update.png" medium="image">
			<media:title type="html">megui update</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui-update2.png" medium="image">
			<media:title type="html">megui update2</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui-update3.png" medium="image">
			<media:title type="html">megui update3</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui-update4.png" medium="image">
			<media:title type="html">megui update4</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui-update5.png" medium="image">
			<media:title type="html">megui update5</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui01.png" medium="image">
			<media:title type="html">megui01</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui02.png" medium="image">
			<media:title type="html">megui02</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui03.png" medium="image">
			<media:title type="html">megui03</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui04.png" medium="image">
			<media:title type="html">megui04</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui05.png" medium="image">
			<media:title type="html">megui05</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui06.png" medium="image">
			<media:title type="html">megui06</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui07.png" medium="image">
			<media:title type="html">megui07</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui08.png" medium="image">
			<media:title type="html">megui08</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui09.png" medium="image">
			<media:title type="html">megui09</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui10.png" medium="image">
			<media:title type="html">megui10</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui11.png" medium="image">
			<media:title type="html">megui11</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui12.png" medium="image">
			<media:title type="html">megui12</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui13.png" medium="image">
			<media:title type="html">megui13</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui141.png" medium="image">
			<media:title type="html">megui14</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui15.png" medium="image">
			<media:title type="html">megui15</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui16.png" medium="image">
			<media:title type="html">megui16</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui17.png" medium="image">
			<media:title type="html">megui17</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui18.png" medium="image">
			<media:title type="html">megui18</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui19.png" medium="image">
			<media:title type="html">megui19</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui20.png" medium="image">
			<media:title type="html">megui20</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui20-2.png" medium="image">
			<media:title type="html">megui20-2</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui20-3.png" medium="image">
			<media:title type="html">megui20-3</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui22.png" medium="image">
			<media:title type="html">megui22</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui23.png" medium="image">
			<media:title type="html">megui23</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui24.png" medium="image">
			<media:title type="html">megui24</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui25.png" medium="image">
			<media:title type="html">megui25</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui26.png" medium="image">
			<media:title type="html">megui26</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui27.png" medium="image">
			<media:title type="html">megui27</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui28.png" medium="image">
			<media:title type="html">megui28</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui29.png" medium="image">
			<media:title type="html">megui29</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui30.png" medium="image">
			<media:title type="html">megui30</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/megui31.png" medium="image">
			<media:title type="html">megui31</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/vobsub01.png" medium="image">
			<media:title type="html">vobsub01</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/vobsub021.png" medium="image">
			<media:title type="html">vobsub02</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/vobsub03.png" medium="image">
			<media:title type="html">vobsub03</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/vobsub04.png" medium="image">
			<media:title type="html">vobsub04</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/vobsub05.png" medium="image">
			<media:title type="html">vobsub05</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/vobsub06.png" medium="image">
			<media:title type="html">vobsub06</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/mkvmerge01.png" medium="image">
			<media:title type="html">mkvmerge01</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/mkvmerge02.png" medium="image">
			<media:title type="html">mkvmerge02</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/mkvmerge03.png" medium="image">
			<media:title type="html">mkvmerge03</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/mkvmerge04.png" medium="image">
			<media:title type="html">mkvmerge04</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/mkvmerge05.png" medium="image">
			<media:title type="html">mkvmerge05</media:title>
		</media:content>

		<media:content url="http://usagiblog.files.wordpress.com/2007/12/mkvmerge06.png" medium="image">
			<media:title type="html">mkvmerge06</media:title>
		</media:content>
	</item>
		<item>
		<title>vim與多行註解</title>
		<link>http://usagiblog.wordpress.com/2007/11/26/multi-line-comments-in-vim/</link>
		<comments>http://usagiblog.wordpress.com/2007/11/26/multi-line-comments-in-vim/#comments</comments>
		<pubDate>Mon, 26 Nov 2007 00:05:48 +0000</pubDate>
		<dc:creator>Tsukino Usagi</dc:creator>
				<category><![CDATA[文字編輯器]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://usagiblog.wordpress.com/2007/11/26/vim%e8%88%87%e5%a4%9a%e8%a1%8c%e8%a8%bb%e8%a7%a3/</guid>
		<description><![CDATA[用vim寫程式或編輯設定檔時, 若使用的程式語言或設定檔格式不支援像C語言的/* &#8230; */註解符號, 可以用下面這個方式替數列文字加入註解. 先按Esc離開插入模式, 按h或j將游漂移到要開始註解的那一列, 並按0回到列首. 按Ctrl-V, 接著按j, 將要註解的那幾列反白. 按大寫I. 鍵入註解符號(例如「&#8217;」, 「//」或「#」等等). 按Esc, 大功告成. 類似的方式也可以用在列首以外的地方, 例如上述步驟1時就不一定要先回到列首, 或者步驟3時按大寫A, 就變成在每列的尾端插入相同的文字. 參考資料: http://www.vim.org/tips/tip.php?tip_id=194<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=83&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>用<a href="http://www.vim.org/">vim</a>寫程式或編輯設定檔時, 若使用的程式語言或設定檔格式不支援像C語言的/* &#8230; */註解符號, 可以用下面這個方式替數列文字加入註解.</p>
<ol>
<li>先按Esc離開插入模式, 按h或j將游漂移到要開始註解的那一列, 並按0回到列首.</li>
<li>按Ctrl-V, 接著按j, 將要註解的那幾列反白.</li>
<li>按大寫I.</li>
<li>鍵入註解符號(例如「&#8217;」, 「//」或「#」等等).</li>
<li>按Esc, 大功告成.</li>
</ol>
<p>類似的方式也可以用在列首以外的地方, 例如上述步驟1時就不一定要先回到列首, 或者步驟3時按大寫A, 就變成在每列的尾端插入相同的文字.</p>
<p>參考資料: <a href="http://www.vim.org/tips/tip.php?tip_id=194">http://www.vim.org/tips/tip.php?tip_id=194</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/usagiblog.wordpress.com/83/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/usagiblog.wordpress.com/83/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usagiblog.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usagiblog.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usagiblog.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usagiblog.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usagiblog.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usagiblog.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usagiblog.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usagiblog.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usagiblog.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usagiblog.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usagiblog.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usagiblog.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usagiblog.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usagiblog.wordpress.com/83/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=83&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usagiblog.wordpress.com/2007/11/26/multi-line-comments-in-vim/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d148c335cf2b58659367262f1de149b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">usagiblog</media:title>
		</media:content>
	</item>
		<item>
		<title>iftop介紹</title>
		<link>http://usagiblog.wordpress.com/2007/07/05/iftop%e4%bb%8b%e7%b4%b9/</link>
		<comments>http://usagiblog.wordpress.com/2007/07/05/iftop%e4%bb%8b%e7%b4%b9/#comments</comments>
		<pubDate>Thu, 05 Jul 2007 11:51:49 +0000</pubDate>
		<dc:creator>Tsukino Usagi</dc:creator>
				<category><![CDATA[網路]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://usagiblog.wordpress.com/2007/07/05/iftop%e4%bb%8b%e7%b4%b9/</guid>
		<description><![CDATA[iftop是許多top-like程式的其中一個, 主要用途是用來即時監看網路狀態. 安裝(以Ubuntu 7.04 Feisty為例): $ sudo apt-get install iftop 執行(必須以root身份): $ iftop 查看ppp0網路介面的即時流量: $ iftop -i ppp0 以位元組(bytes)為單位顯示流量(預設是位元bits): $ iftop -B 直接顯示IP, 不進行DNS反解: $ iftop -n 直接顯示連接埠編號, 不顯示服務名稱: $ iftop -N 其他參數可下 iftop -h 看說明. 進入iftop畫面時, 可按 p 切換是否顯示連接埠, n 切換顯示IP或主機的domain name, N切換顯示連接埠代號或名稱, p暫停顯示, b切換是否顯示長條, B切換計算幾秒內的平均流量, 其他按鍵可以按h觀看說明. 設定檔的位置在~/.iftoprc , 關於設定檔的寫法可以參考 iftop 的 info page.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=77&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ex-parrot.com/~pdw/iftop/" target="_blank">iftop</a>是許多top-like程式的其中一個, 主要用途是用來即時監看網路狀態.</p>
<p>安裝(以Ubuntu 7.04 Feisty為例):</p>
<p><code>$ sudo apt-get install iftop</code></p>
<p>執行(必須以root身份):</p>
<p><code>$ iftop</code></p>
<p>查看ppp0網路介面的即時流量:</p>
<p><code>$ iftop -i ppp0</code></p>
<p>以位元組(bytes)為單位顯示流量(預設是位元bits):<br />
<code><br />
$ iftop -B</code></p>
<p>直接顯示IP, 不進行DNS反解:</p>
<p><code>$ iftop -n</code></p>
<p>直接顯示連接埠編號, 不顯示服務名稱:</p>
<p><code>$ iftop -N</code></p>
<p>其他參數可下 <code>iftop -h</code> 看說明.</p>
<p>進入iftop畫面時, 可按 p 切換是否顯示連接埠, n 切換顯示IP或主機的domain name, N切換顯示連接埠代號或名稱, p暫停顯示, b切換是否顯示長條, B切換計算幾秒內的平均流量, 其他按鍵可以按h觀看說明.</p>
<p>設定檔的位置在~/.iftoprc , 關於設定檔的寫法可以參考 iftop 的 info page.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/usagiblog.wordpress.com/77/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/usagiblog.wordpress.com/77/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usagiblog.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usagiblog.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usagiblog.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usagiblog.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usagiblog.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usagiblog.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usagiblog.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usagiblog.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usagiblog.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usagiblog.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usagiblog.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usagiblog.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usagiblog.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usagiblog.wordpress.com/77/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=77&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usagiblog.wordpress.com/2007/07/05/iftop%e4%bb%8b%e7%b4%b9/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d148c335cf2b58659367262f1de149b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">usagiblog</media:title>
		</media:content>
	</item>
		<item>
		<title>pwgen介紹</title>
		<link>http://usagiblog.wordpress.com/2006/11/05/pwgen%e4%bb%8b%e7%b4%b9/</link>
		<comments>http://usagiblog.wordpress.com/2006/11/05/pwgen%e4%bb%8b%e7%b4%b9/#comments</comments>
		<pubDate>Sun, 05 Nov 2006 13:06:00 +0000</pubDate>
		<dc:creator>Tsukino Usagi</dc:creator>
				<category><![CDATA[系統安全]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://usagiblog.wordpress.com/2006/11/05/pwgen%e4%bb%8b%e7%b4%b9/</guid>
		<description><![CDATA[pwgen可以用來產生適合作為密碼的亂數字串, 遇到需要設定或更改密碼的時機時, 可以用它產生密碼並背下來. 安裝(以Ubuntu 6.10 Edgy為例): $ sudo apt-get install pwgen 用預設值產生密碼: $ pwgen 產生10組長度為6字元的密碼: $ pwgen 6 10 密碼裡不要有大寫字元: $ pwgen -A 密碼裡至少有一個符號字元: $ pwgen -y 密碼裡不要有容易混淆的字元(例如小寫的「l」和數字的「1」等等): $ pwgen -B 其他用法可下 pwgen --help 看說明.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=78&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="entrytext">
<div class="snap_preview">
<p><a href="http://sourceforge.net/projects/pwgen/" target="_blank">pwgen</a>可以用來產生適合作為密碼的亂數字串, 遇到需要設定或更改密碼的時機時, 可以用它產生密碼並背下來.</p>
<p><span>安裝(以Ubuntu 6.10 Edgy為例):</p>
<p><code>$ sudo apt-get install pwgen</code></p>
<p>用預設值產生密碼:</p>
<p><code>$ pwgen</code></p>
<p>產生10組長度為6字元的密碼:</p>
<p><code>$ pwgen 6 10</code></p>
<p>密碼裡不要有大寫字元:</p>
<p><code>$ pwgen -A</code></p>
<p>密碼裡至少有一個符號字元:</p>
<p><code>$ pwgen -y</code></p>
<p>密碼裡不要有容易混淆的字元(例如小寫的「l」和數字的「1」等等):</p>
<p><code>$ pwgen -B</code></p>
<p>其他用法可下 <code>pwgen --help</code> 看說明.</p>
</div>
</div>
<p></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/usagiblog.wordpress.com/78/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/usagiblog.wordpress.com/78/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usagiblog.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usagiblog.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usagiblog.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usagiblog.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usagiblog.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usagiblog.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usagiblog.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usagiblog.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usagiblog.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usagiblog.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usagiblog.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usagiblog.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usagiblog.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usagiblog.wordpress.com/78/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=78&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usagiblog.wordpress.com/2006/11/05/pwgen%e4%bb%8b%e7%b4%b9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d148c335cf2b58659367262f1de149b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">usagiblog</media:title>
		</media:content>
	</item>
		<item>
		<title>md5deep介紹</title>
		<link>http://usagiblog.wordpress.com/2006/11/01/md5deep%e4%bb%8b%e7%b4%b9/</link>
		<comments>http://usagiblog.wordpress.com/2006/11/01/md5deep%e4%bb%8b%e7%b4%b9/#comments</comments>
		<pubDate>Wed, 01 Nov 2006 04:53:00 +0000</pubDate>
		<dc:creator>Tsukino Usagi</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://usagiblog.wordpress.com/2006/11/01/md5deep%e4%bb%8b%e7%b4%b9/</guid>
		<description><![CDATA[md5deep是用來產生及檢驗檔案MD5檢查碼的工具, 比傳統的md5sum指令好用. 安裝方式(以Ubuntu 6.10 Edgy為例): $ sudo apt-get install md5deep 計算aaa目錄下所有檔案的MD5並存成aaa.md5: $ md5deep -l -r aaa &#62; aaa.md5 同上, 但是以binary方式計算: $ md5deep -k -l -r aaa &#62; aaa.md5 比對 *.iso 檔的MD5是否跟 xxx.md5 裡的MD5是否一樣, 並列出比對無誤的檔案: $ md5deep -m xxx.md5 *.iso 同上, 但列出比對時發現錯誤的檔案: $ md5deep -x xxx.md5 *.iso 同上, 但列出比對時發現錯誤的檔案時也一併列出該檔的MD5: $ md5deep -X xxx.md5 *.iso 同上, 但比對過程中顯示進度: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=79&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="entrytext">
<div class="snap_preview">
<p><a href="http://md5deep.sourceforge.net/" target="_blank">md5deep</a>是用來產生及檢驗檔案MD5檢查碼的工具, 比傳統的md5sum指令好用.</p>
<p><span>安裝方式(以Ubuntu 6.10 Edgy為例):</p>
<p><code>$ sudo apt-get install md5deep</code></p>
<p>計算aaa目錄下所有檔案的MD5並存成aaa.md5:</p>
<p><code>$ md5deep -l -r aaa &gt; aaa.md5</code></p>
<p>同上, 但是以binary方式計算:</p>
<p><code>$ md5deep -k -l -r aaa &gt; aaa.md5</code></p>
<p>比對 *.iso 檔的MD5是否跟 xxx.md5 裡的MD5是否一樣, 並列出比對無誤的檔案:</p>
<p><code>$ md5deep -m xxx.md5 *.iso</code></p>
<p>同上, 但列出比對時發現錯誤的檔案:</p>
<p><code>$ md5deep -x xxx.md5 *.iso</code></p>
<p>同上, 但列出比對時發現錯誤的檔案時也一併列出該檔的MD5:</p>
<p><code>$ md5deep -X xxx.md5 *.iso</code></p>
<p>同上, 但比對過程中顯示進度:</p>
<p><code>$ md5deep -e -X xxx.md5 *.iso</code></p>
<p>其他參數可下 <code>md5deep -h</code>或<code>info md5deep</code>查看說明.</p>
</div>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/usagiblog.wordpress.com/79/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/usagiblog.wordpress.com/79/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usagiblog.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usagiblog.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usagiblog.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usagiblog.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usagiblog.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usagiblog.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usagiblog.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usagiblog.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usagiblog.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usagiblog.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usagiblog.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usagiblog.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usagiblog.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usagiblog.wordpress.com/79/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=79&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usagiblog.wordpress.com/2006/11/01/md5deep%e4%bb%8b%e7%b4%b9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d148c335cf2b58659367262f1de149b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">usagiblog</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu 6.10 Edgy + VMware Tools</title>
		<link>http://usagiblog.wordpress.com/2006/10/29/ubuntu-610-edgy-vmware-tools/</link>
		<comments>http://usagiblog.wordpress.com/2006/10/29/ubuntu-610-edgy-vmware-tools/#comments</comments>
		<pubDate>Sun, 29 Oct 2006 02:16:00 +0000</pubDate>
		<dc:creator>Tsukino Usagi</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://usagiblog.wordpress.com/2006/10/29/ubuntu-610-edgy-vmware-tools/</guid>
		<description><![CDATA[VMware 5.5.2 官方有支援 Ubuntu 6.06, 但還沒支援 6.10, 但至少不用 any update 了, 至少我測試過是這樣. 本文將解說如何在 Ubuntu 6.10 裡安裝 VMware Tools, 搭配的 VMware 版本是 Workstation 5.5.2 build 29772. 在 VMware 裡安裝好 Ubuntu 6.10 之後, 先將網路設定好, 讓虛擬的機器能連上 Internet. 設定 root 的密碼, 先下$ sudo -s -H指令, 輸入目前登入的帳號的密碼, 之後下$ passwd來變更 root 的密碼, 往後就可以直接用 su 指令變身成 root. 更新 apt 資料庫, 先以 root [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=80&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="entrytext">
<div class="snap_preview">
<p class="entrytext">VMware 5.5.2 官方有支援 Ubuntu 6.06, 但還沒支援 6.10, 但至少不用 any update 了, 至少我測試過是這樣.</p>
<p class="entrytext">本文將解說如何在 Ubuntu 6.10 裡安裝 VMware Tools, 搭配的 VMware 版本是 Workstation 5.5.2 build 29772.</p>
<p class="entrytext"><span></p>
<ol>
<li>在 VMware 裡安裝好 Ubuntu 6.10 之後, 先將網路設定好, 讓虛擬的機器能連上 Internet.</li>
<li>設定 root 的密碼, 先下<br /><code>$ sudo -s -H</code><br />指令, 輸入目前登入的帳號的密碼, 之後下<br /><code>$ passwd</code><br />來變更 root 的密碼, 往後就可以直接用 su 指令變身成 root.</li>
<li>更新 apt 資料庫, 先以 root 的身份下以下這些指令<br /><code>$ cd /etc/apt<br />$ wget http://apt.ubuntu.org.tw/sources.list.dapper<br />$ mv sources.list sources.list.original<br />$ mv sources.list.dapper sources.list</code><br />接著用 vim 或其他慣用的文字編輯器打開 /etc/apt/sources.list 檔, 將所有的 dapper 字串取代成 edgy, 然後大約在第 21 行的地方找到「deb http://apt.ubuntu.org.tw ubtw-edgy/」先註解掉或刪除, 因為 apt.ubuntu.org.tw 主機上目前沒這個目錄, 編輯完成, 存檔之後, 下<code><br />$ apt-get update</code><br />指令更新來源.</li>
<li>安裝 VMware Tools 的過程會編譯 kernel module, 會需要一些 packages, 下這些指令將它們安裝上去:<br /><code>$ apt-get install linux-headers-`uname -r` build-essential</code></li>
<li>將 VMware Tools 的 tarball 拷貝到虛擬機器裡, 將處擬機器的光碟機掛載上 VMware 的 .iso 檔, 可以直接在 VMware 的主視窗功能表裡選擇 VM→Install VMware Tools.</li>
<li>下<br /><code>$ cd /media/cdrom0<br />$ ls</code><br />看看有沒有 VMware Tools 的 tarball, 沒有的話試試手動 mount 看看.</li>
<li>下這些指令:<br /><code>$ cd /tmp<br />$ tar zxvf /media/cdrom0/VMwareTools-5.5.2-29772.tar.gz</code></li>
<li>安裝 VMware Tools:<br /><code>$ cd /tmp/vmware-tools-distrib/<br />$ ./vmware-install.pl</code><br />當安裝程式問你是否要執行 vmware-config-tools.pl 時, 回答 yes.</li>
<li>跑 vmware-config-tools.pl 時, 所有問題都可以按 Enter 使用預設值, 它會自動偵測 kernel header 的路徑並編譯需要用到的 kernel modules.</li>
<li>安裝程式會詢問 X 環境的預設解析度, 留意一下, 若出現「No X install found」或其他訊息, 代表設定不成功.</li>
<li>下這些指令重新啟動網路介面:<br /><code>$ /etc/init.d/networking stop<br />$ rmmod pcnet32<br />$ rmmod vmxnet<br />$ depmod -a<br />$ modprobe vmxnet<br />$ /etc/init.d/networking start</code></li>
<li>編輯 /etc/X11/xorg.conf 大約第 55 行的地方, 把 mouse 改成 vmmouse.</li>
<li>將 vmware tools 漏裝的 vmmouse_drv.o 檔複製到正確路徑, 下這些指令:<br /><code>$ cp /usr/lib/vmware-tools/configurator/XOrg/6.8.x/vmmouse_drv.o /usr/lib/xorg/modules/input<br />$ chmod 644 /usr/lib/xorg/modules/input/vmmouse_drv.o</code></li>
<li>登出之後, 按 Ctrl-Alt-Backspace 重新啟動 X 環境, 順利的話滑鼠指標可以在 VMware 和其他視窗之間來回移動 不需要按 Ctrl-Alt 才能將滑鼠指標從 VMware 裡移出來.</li>
<li>將整個系統更新:<br /><code>$ apt-get upgrade</code></li>
<li>清除垃圾檔案:<br /><code>$ apt-get clean<br />$ rm -rf /tmp/*</code></li>
<li>作 Shrink 和保存 snapshot 的的動作, 在圖形介面下以 root 的身份執行 vmware-toolbox, 在 Shrink 頁籤裡選擇分割區並按 Shrink.</li>
<li>之後將虛擬機器關掉並建立 snapshot, 這樣就是一個可以作任何測試的 Linux 系統了.</li>
</ol>
<p>參考資料:</p>
<ul>
<li><a href="http://ubuntuforums.org/showthread.php?t=271593" target="_blank">http://ubuntuforums.org/showthread.php?t=271593</a></li>
</ul>
</div>
</div>
<p></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/usagiblog.wordpress.com/80/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/usagiblog.wordpress.com/80/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usagiblog.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usagiblog.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usagiblog.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usagiblog.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usagiblog.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usagiblog.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usagiblog.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usagiblog.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usagiblog.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usagiblog.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usagiblog.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usagiblog.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usagiblog.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usagiblog.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=80&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usagiblog.wordpress.com/2006/10/29/ubuntu-610-edgy-vmware-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d148c335cf2b58659367262f1de149b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">usagiblog</media:title>
		</media:content>
	</item>
		<item>
		<title>cacti介紹</title>
		<link>http://usagiblog.wordpress.com/2006/09/15/cacti%e4%bb%8b%e7%b4%b9/</link>
		<comments>http://usagiblog.wordpress.com/2006/09/15/cacti%e4%bb%8b%e7%b4%b9/#comments</comments>
		<pubDate>Fri, 15 Sep 2006 10:33:00 +0000</pubDate>
		<dc:creator>Tsukino Usagi</dc:creator>
				<category><![CDATA[系統管理]]></category>
		<category><![CDATA[網路]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://usagiblog.wordpress.com/2006/09/15/cacti%e4%bb%8b%e7%b4%b9/</guid>
		<description><![CDATA[cacti是rrdtool的一個frontend, 可以定時收集各種不同的資料並繪製成圖表, 例如網路流量, 主機的CPU, 記憶體, Processes狀況等等, 本文將解說如何在Ubuntu Dapper上架設cacti並繪製本機的網路流量圖表. 要安裝和設定的套件主要分成下列四大類: snmpd: 透過SNMP通訊協定來提供網路流量的資料. rrdtool: 向snmpd定時請求資料並繪製成圖表. cacti: 圖表的設定和管理. LAMP環境: 由於cacti它是web based的程式, 所以需要一個LAMP環境讓它運作. 以下指令全部都以root身份執行. 先安裝MySQL:$ apt-get install mysql-server 設定MySQL資料庫裡root的密碼:$ mysqladmin -u root password somepassword(somepassword請改成您想設定的密碼) 安裝Apache2和PHP5:$ apt-get install apache2 php5$ apt-get install php5-gd php5-cli$ apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin 讓主機的首頁秀出Apache2的預設頁:$ vim /etc/apache2/sites-enabled/000-default將第17行「RedirectMatch ^/$ /apache2-default/ 」前的註解刪除, 並下$ /etc/init.d/apache2 restart讓設定值生效. 安裝snmpd:$ apt-get [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=81&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="entrytext">
<div class="snap_preview">
<p><a href="http://www.cacti.net/" target="_blank" title="http://www.cacti.net/">cacti</a>是<a href="http://oss.oetiker.ch/rrdtool/" target="_blank" title="http://oss.oetiker.ch/rrdtool/">rrdtool</a>的一個frontend, 可以定時收集各種不同的資料並繪製成圖表, 例如網路流量, 主機的CPU, 記憶體, Processes狀況等等, 本文將解說如何在Ubuntu Dapper上架設cacti並繪製本機的網路流量圖表.</p>
<p><span>要安裝和設定的套件主要分成下列四大類:</p>
<ul>
<li>snmpd: 透過SNMP通訊協定來提供網路流量的資料.</li>
<li>rrdtool: 向snmpd定時請求資料並繪製成圖表.</li>
<li>cacti: 圖表的設定和管理.</li>
<li>LAMP環境: 由於cacti它是web based的程式, 所以需要一個LAMP環境讓它運作.</li>
</ul>
<p>以下指令全部都以root身份執行.</p>
<ol>
<li>先安裝MySQL:<br /><code>$ apt-get install mysql-server</code></li>
<li>設定MySQL資料庫裡root的密碼:<br /><code>$ mysqladmin -u root password somepassword</code><br />(somepassword請改成您想設定的密碼)</li>
<li>安裝Apache2和PHP5:<br /><code>$ apt-get install apache2 php5<br />$ apt-get install php5-gd php5-cli<br />$ apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin</code></li>
<li>讓主機的首頁秀出Apache2的預設頁:<br /><code>$ vim /etc/apache2/sites-enabled/000-default</code><br />將第17行「RedirectMatch ^/$ /apache2-default/ 」前的註解刪除, 並下<br /><code>$ /etc/init.d/apache2 restart</code><br />讓設定值生效.</li>
<li>安裝snmpd:<br /><code>$ apt-get install snmpd</code><br />接著編輯設定檔<br /><code>$ vim /etc/snmp/snmpd.conf</code><br />大約第60行的地方, 改成像下面這個樣子:<br /><code># sec.name source community<br />#com2sec paranoid default public<br />com2sec readonly default public<br />#com2sec readwrite default private</code><br />接著在大約第109行的地方, 編輯syslocation和syscontact, syslocation後面接主機的名稱, syscontact後面則接管理者的聯絡資料, 這兩樣設定只作識別用途, 可以隨意設定, 存檔後執行<br /><code>$ /etc/init.d/snmpd restart</code><br />讓設定檔生效.</li>
<li>安裝cacti和rrdtool:<br /><code>$ apt-get install cacti</code><br />設定套件時會詢問本機上MySQL伺服器的root的密碼, 輸入步驟2設定的密碼即可, 接著會在MySQL伺服器上建立名叫cacti的使用者, 並要求您設定cacti的密碼, 照著指示輸入即可, 最後會詢問主機上伺服器的類型, 請選apache2.</li>
<li>打開瀏覽器, 開啟 http://127.0.0.1/cacti/ 這個網址, 第一個畫面選擇next, 接下來會詢問安裝類型, 選new install並選next, 最後在確認程式路徑的畫面點finish即可.</li>
<li>接下來會秀出cacti的登入頁面, 帳號密碼都輸入admin並登入, 第一次登入時會要求修改密碼, 按照指示操作即可.</li>
<li>cacti預設會將主機上的記憶體, 負載狀況, 登入帳號數和Processes數量繪製成圖表, 請先點左上角的graphs看看這些圖表能不能正常顯示, 要是過5分鐘之後還是沒有圖出現的話, 請修改/etc/php5/cli/php.ini, 找到「extension=mysql.so」並將註解刪除.</li>
<li>接著要在cacti裡啟用snmp功能, 在cacti的管理頁面上點選devices→localhost, 出現的頁面會有「SNMP Information」, 下面會有「SNMP not in use」的字樣, 找到snmp community的欄位, 填入public並點最下面的save存檔, 接著點選devices→localhost, 檢查「SNMP not in use」的字樣還在不在, 要是還在的話, 檢查一下snmpd相關的設定和服務有沒有正常.</li>
<li>接著要在cacti裡設定繪製圖表, 選devices→localhost, 在Associated Data Queries裡的add data query裡選snmp &#8211; interface statistics並點選Add, 接著看Data Query Name有沒有已經增加了剛才選擇的項目, 以及右邊是否為Success.</li>
<li>選擇Create Graphics for this Host, 在「Data Query [SNMP - Interface Statistics]」下面應該會出現本機上所有的網路介面(跟ifconfig -a指令輸出的結果一樣), 勾選要繪製圖表的網路介面, 並在「Select a graph type:」裡選擇圖表類型(建議選「In/Out Bytes with Total Bandwidth」)並按最下方的Create.</li>
<li>接著點選上方的graphs, 應該可以看到新建的圖表項目, 正常的話, 5分鐘之後就可以看到繪製的圖表, 您也可以隨便瀏覽一下網頁或下載檔案來製造流量, 觀察cacti繪製出來的圖表是否正確.</li>
<li>一切都正常的話, 可以將graphs這一頁的網址加入書籤, 方便往後隨時查看流量, 若是要修改圖表相關的設定, 則從「http://127.0.0.1/cacti/」登入後進行修改, 當然也可以遠端登入操作.</li>
</ol>
<p>參考資料:</p>
<ul>
<li><a href="https://help.ubuntu.com/community/Cacti?action=show&amp;redirect=CactiHowTo" target="_blank" title="https://help.ubuntu.com/community/Cacti?action=show&amp;redirect=CactiHowTo">https://help.ubuntu.com/community/Cacti?action=show&amp;redirect=CactiHowTo</a></li>
<li><a href="http://blog.xuite.net/ericsk0313/ubuntu/8022230" target="_blank" title="http://blog.xuite.net/ericsk0313/ubuntu/8022230">http://blog.xuite.net/ericsk0313/ubuntu/8022230</a></li>
</ul>
</div>
</div>
<p></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/usagiblog.wordpress.com/81/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/usagiblog.wordpress.com/81/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usagiblog.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usagiblog.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usagiblog.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usagiblog.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usagiblog.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usagiblog.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usagiblog.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usagiblog.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usagiblog.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usagiblog.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usagiblog.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usagiblog.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usagiblog.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usagiblog.wordpress.com/81/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=81&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usagiblog.wordpress.com/2006/09/15/cacti%e4%bb%8b%e7%b4%b9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d148c335cf2b58659367262f1de149b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">usagiblog</media:title>
		</media:content>
	</item>
		<item>
		<title>在Linux下使用多媒體鍵盤調整音量</title>
		<link>http://usagiblog.wordpress.com/2006/08/24/%e5%9c%a8linux%e4%b8%8b%e4%bd%bf%e7%94%a8%e5%a4%9a%e5%aa%92%e9%ab%94%e9%8d%b5%e7%9b%a4%e8%aa%bf%e6%95%b4%e9%9f%b3%e9%87%8f/</link>
		<comments>http://usagiblog.wordpress.com/2006/08/24/%e5%9c%a8linux%e4%b8%8b%e4%bd%bf%e7%94%a8%e5%a4%9a%e5%aa%92%e9%ab%94%e9%8d%b5%e7%9b%a4%e8%aa%bf%e6%95%b4%e9%9f%b3%e9%87%8f/#comments</comments>
		<pubDate>Thu, 24 Aug 2006 12:11:00 +0000</pubDate>
		<dc:creator>Tsukino Usagi</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[多媒體]]></category>

		<guid isPermaLink="false">http://usagiblog.wordpress.com/2006/08/24/%e5%9c%a8linux%e4%b8%8b%e4%bd%bf%e7%94%a8%e5%a4%9a%e5%aa%92%e9%ab%94%e9%8d%b5%e7%9b%a4%e8%aa%bf%e6%95%b4%e9%9f%b3%e9%87%8f/</guid>
		<description><![CDATA[在Linux下要使用多媒體鍵盤調整音量, 可以透過actkbd和amixer 這兩支程式達成, 本文說明在Ubuntu 6.06.1 Dapper下使用這兩支程式的方式. Ubuntu本身的套件庫裡沒有actkbd, 因此需要自行下載原始碼回來編譯, 而amixer是alsamixer的一部份, Ubuntu預設會安裝, actkbd是用來偵測多媒體鍵盤的按鍵狀態並執行指定的指令, 而amixer則是用來調整音量的指令. 各個機器上的多媒體鍵盤和音效設備都不相同, 因此本文有可能不適用於您的環境. 1. 若之前沒有從原始碼的tarball安裝程式, 先安裝好編譯程式需要的packages:$ sudo apt-get linux-headers-`uname -r`$ sudo apt-get build-essential 2. 下載actkbd的原始碼回來並編譯:$ wget http://www.softlab.ece.ntua.gr/~thkala/projects/actkbd/files/actkbd-0.2.7.tar.bz2$ tar xvfj actkbd-0.2.7.tar.bz2$ cd actkbd-0.2.7$ make 3. 安裝:$ sudo make install 4. 載入多媒體鍵盤會用到的kernel module:$ sudo modprobe evdev 5. 測試鍵盤按鍵:$ sudo actkbd -n -s接著試著按按看多媒體鍵盤上的音量調整鍵(或者是轉盤), 以及切換靜音的按鍵, 若actkbd有偵測到, 畫面上會跑出一堆數字, 每個按鍵對應的數字是固定的, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=82&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="entrytext">
<div class="snap_preview">
<p>在Linux下要使用多媒體鍵盤調整音量, 可以透過<a href="http://www.softlab.ece.ntua.gr/%7Ethkala/projects/actkbd/actkbd.html">actkbd</a>和amixer 這兩支程式達成, 本文說明在Ubuntu 6.06.1 Dapper下使用這兩支程式的方式. Ubuntu本身的套件庫裡沒有actkbd, 因此需要自行下載原始碼回來編譯, 而amixer是alsamixer的一部份, Ubuntu預設會安裝, actkbd是用來偵測多媒體鍵盤的按鍵狀態並執行指定的指令, 而amixer則是用來調整音量的指令.</p>
<p><span>各個機器上的多媒體鍵盤和音效設備都不相同, 因此本文有可能不適用於您的環境.</p>
<p>1. 若之前沒有從原始碼的tarball安裝程式, 先安裝好編譯程式需要的packages:<br /><code>$ sudo apt-get linux-headers-`uname -r`<br />$ sudo apt-get build-essential</code></p>
<p>2. 下載actkbd的原始碼回來並編譯:<br /><code>$ wget http://www.softlab.ece.ntua.gr/~thkala/projects/actkbd/files/actkbd-0.2.7.tar.bz2<br />$ tar xvfj actkbd-0.2.7.tar.bz2<br />$ cd actkbd-0.2.7<br />$ make</code></p>
<p>3. 安裝:<br /><code>$ sudo make install</code></p>
<p>4. 載入多媒體鍵盤會用到的kernel module:<br /><code>$ sudo modprobe evdev</code></p>
<p>5. 測試鍵盤按鍵:<br /><code>$ sudo actkbd -n -s</code><br />接著試著按按看多媒體鍵盤上的音量調整鍵(或者是轉盤), 以及切換靜音的按鍵, 若actkbd有偵測到, 畫面上會跑出一堆數字, 每個按鍵對應的數字是固定的, 把各個要設定的按鍵和對應的數字抄下來, 以我的環境為例, 音量調大的按鍵是115, 調小是114, 靜音是113.</p>
<p>6. 測試音量的指令:<br />音效若有正常驅動, 應該就能用amixer這個指令, 下<br /><code>$ amixer scontrols</code><br />指令來查看有哪些裝置的音量可以調, 通常主音量是Master, 之後可以打開另一個可以調整音量的程式, 或開任何一個程式播放一首歌, 同時下這些指令聽看看有沒有作用, 例如音量調大是:<br /><code>$ amixer sset Master 1+</code><br />音量調小是:<br /><code>$ amixer sset Master 1-</code><br />切換靜音是:<br /><code>$ amixer sset Master toggle</code></p>
<p>7. 編寫設定檔:<br /><code>$ sudo vim /etc/actkbd.conf</code><br />內容如下:</p>
<p><code>114:key::amixer sset Master 1-<br />115:key::amixer sset Master 1+<br />113:key::amixer sset Master toggle</code></p>
<p>設定檔的格式是「按鍵代碼:事件類型:屬性:指令」, 詳細說明可以參考actkbd的README</p>
<p>8. 啟動:<br /><code>$ sudo actkbd</code><br />然後測試一下按鍵, 沒問題的話應該就能正常使用這些按鍵來調整音量, 之後可以按Ctrl+C離開, 並下:<br /><code>$ sudo actkbd -D</code><br />指令讓它在背景執行即可.</p>
</div>
</div>
<p></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/usagiblog.wordpress.com/82/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/usagiblog.wordpress.com/82/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usagiblog.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usagiblog.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usagiblog.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usagiblog.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usagiblog.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usagiblog.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usagiblog.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usagiblog.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usagiblog.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usagiblog.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usagiblog.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usagiblog.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usagiblog.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usagiblog.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=82&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usagiblog.wordpress.com/2006/08/24/%e5%9c%a8linux%e4%b8%8b%e4%bd%bf%e7%94%a8%e5%a4%9a%e5%aa%92%e9%ab%94%e9%8d%b5%e7%9b%a4%e8%aa%bf%e6%95%b4%e9%9f%b3%e9%87%8f/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d148c335cf2b58659367262f1de149b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">usagiblog</media:title>
		</media:content>
	</item>
		<item>
		<title>在cnews+nntp上加上email post功能</title>
		<link>http://usagiblog.wordpress.com/2006/07/30/%e5%9c%a8cnewsnntp%e4%b8%8a%e5%8a%a0%e4%b8%8aemail-post%e5%8a%9f%e8%83%bd/</link>
		<comments>http://usagiblog.wordpress.com/2006/07/30/%e5%9c%a8cnewsnntp%e4%b8%8a%e5%8a%a0%e4%b8%8aemail-post%e5%8a%9f%e8%83%bd/#comments</comments>
		<pubDate>Sun, 30 Jul 2006 14:30:47 +0000</pubDate>
		<dc:creator>Tsukino Usagi</dc:creator>
				<category><![CDATA[網路]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">https://usagiblog.wordpress.com/2006/07/30/%e5%9c%a8cnewsnntp%e4%b8%8a%e5%8a%a0%e4%b8%8aemail-post%e5%8a%9f%e8%83%bd/</guid>
		<description><![CDATA[本文說明如何利用newsgate裡的mail2news來達到email post to news的目的, 在進行下面的操作之前, 要先在Ubuntu 6.06 Dapper裡架設好postfix和cnews+nntp, cnews+nntp的設定方式可以參考這篇文章. 安裝newsgate和procmail, 以root的身份執行:$ apt-get install newsgate procmail 設定postfix的四個設定檔, 在/etc/postfix/main.cf裡加上:transport_maps = hash:/etc/postfix/transportvirtual_alias_maps = regexp:/etc/postfix/virtual 在/etc/postfix/master.cf裡加上:newsmail unix - n n - - pipeflags=FR user=news argv=/usr/bin/procmail -a ${mailbox} -a mail2news -d news第一行每段文字用tab作分隔, 第二行的flags前面要有個tab, 之後每段文字用「空白」作分隔. 在/etc/postfix/transport裡加上:newsmail.yourhostname newsmail: 在/etc/postfix/virtual裡加上:/^(.+)\.news@/ $1@newsmail.yourhostname 產生.db檔, 以root的身份執行:$ postmap /etc/postfix/transport$ postmap /etc/postfix/virtual 以news的身份編輯~/.procmailrc:$ su news$ vim ~/.procmailrc, 內容如下::0 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=67&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>本文說明如何利用<a href="http://packages.ubuntu.com/dapper/news/newsgate">newsgate</a>裡的mail2news來達到email post to news的目的, 在進行下面的操作之前, 要先在Ubuntu 6.06 Dapper裡架設好postfix和cnews+nntp, cnews+nntp的設定方式可以參考<a href="http://usagiblog.wordpress.com/2006/07/30/%e5%9c%a8ubuntu-606-dapper%e4%b8%8a%e6%9e%b6%e8%a8%adusenet-news-server/" target="_blank">這篇文章</a>.</p>
<ol>
<li>安裝newsgate和procmail, 以root的身份執行:<br /><code>$ apt-get install newsgate procmail</code></li>
<li>設定postfix的四個設定檔, 在/etc/postfix/main.cf裡加上:<br /><code>transport_maps = hash:/etc/postfix/transport<br />virtual_alias_maps = regexp:/etc/postfix/virtual</code></li>
<li>在/etc/postfix/master.cf裡加上:<br /><code>newsmail unix - n n - - pipe<br />flags=FR user=news argv=/usr/bin/procmail -a ${mailbox} -a mail2news -d news</code><br />第一行每段文字用tab作分隔, 第二行的flags前面要有個tab, 之後每段文字用「空白」作分隔.</li>
<li>在/etc/postfix/transport裡加上:<br /><code>newsmail.yourhostname newsmail:</code></li>
<li>在/etc/postfix/virtual裡加上:<br /><code>/^(.+)\.news@/ $1@newsmail.yourhostname</code></li>
<li>產生.db檔, 以root的身份執行:<br /><code>$ postmap /etc/postfix/transport</code><br /><code>$ postmap /etc/postfix/virtual</code></li>
<li>以news的身份編輯~/.procmailrc:<br /><code>$ su news<br />$ vim ~/.procmailrc</code><br />, 內容如下:<br /><code>:0 bhH<br />* ^To: [a-z0-9.]*.news@<br />| /usr/bin/$2 -n $1 -d news -o 'mail2news gateway' -x internet</code></li>
<li>重新啟動postfix:<br /><code>$ /etc/init.d/postfix restart</code></li>
<li>之後發一封信到主機上看看, Email的寫法是「群組名稱」.news@「主機名稱」, 例如要在group.blah這個群組裡發表文章, 那Email位址就要寫成group.blah.news@yourhostname ,信發完之後不會馬上就出現在newsgroup裡, 要等crond跑過cnews之後才會出現.</li>
</ol>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/usagiblog.wordpress.com/67/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/usagiblog.wordpress.com/67/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/usagiblog.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/usagiblog.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/usagiblog.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/usagiblog.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/usagiblog.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/usagiblog.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/usagiblog.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/usagiblog.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/usagiblog.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/usagiblog.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/usagiblog.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/usagiblog.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/usagiblog.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/usagiblog.wordpress.com/67/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=usagiblog.wordpress.com&amp;blog=92122&amp;post=67&amp;subd=usagiblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://usagiblog.wordpress.com/2006/07/30/%e5%9c%a8cnewsnntp%e4%b8%8a%e5%8a%a0%e4%b8%8aemail-post%e5%8a%9f%e8%83%bd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d148c335cf2b58659367262f1de149b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">usagiblog</media:title>
		</media:content>
	</item>
	</channel>
</rss>
