<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4480815098372090797</id><updated>2011-11-07T10:53:23.283-08:00</updated><category term='ibus'/><category term='GAL'/><category term='System'/><category term='meld'/><category term='latex'/><category term='ssh'/><category term='skype'/><category term='pidgin'/><category term='gtalk'/><category term='new disk'/><category term='migrate'/><category term='Windows'/><category term='api'/><category term='ubuntu 9.10'/><category term='no password'/><category term='rapidsvn'/><category term='evolution'/><category term='library'/><category term='c'/><category term='on fly'/><category term='clone'/><category term='jpicedt'/><category term='timer'/><category term='jabref'/><category term='downgrade'/><category term='pinyin'/><category term='Linux'/><category term='swap'/><category term='gcc'/><category term='QEMU'/><category term='kile'/><category term='vim'/><category term='eclipse'/><category term='ubuntu'/><category term='Check'/><category term='okular'/><category term='c++'/><category term='chinese'/><category term='svn'/><title type='text'>GUO Jian's Technical Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ntuguo.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ntuguo.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jian Guo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4480815098372090797.post-5129380192617868724</id><published>2010-11-28T20:03:00.000-08:00</published><updated>2010-11-28T20:04:29.584-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pidgin'/><category scheme='http://www.blogger.com/atom/ns#' term='gtalk'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Configure gtalk in pidgin</title><content type='html'>Basic Tab&lt;br /&gt;Protocol: xmpp&lt;br /&gt;Username ; username_only (no need for @gmail)&lt;br /&gt;Domain: gmail.com&lt;br /&gt;Resource: Home&lt;br /&gt;Password: Your_GMAIL_ Password&lt;br /&gt;&lt;br /&gt;Advance tab&lt;br /&gt;Force old (port 5223) SSL: Checked&lt;br /&gt;Allow plaintext auth over unencrypted streams: Un-Checked&lt;br /&gt;Connect Port: 443&lt;br /&gt;Connect Server: talk.google.com&lt;br /&gt;File Transfer For Proxies: Leave blank or proxy.jabber.org&lt;br /&gt;&lt;br /&gt;Proxy type&lt;br /&gt;Use Global Proxy Settings&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4480815098372090797-5129380192617868724?l=ntuguo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ntuguo.blogspot.com/feeds/5129380192617868724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ntuguo.blogspot.com/2010/11/configure-gtalk-in-pidgin.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/5129380192617868724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/5129380192617868724'/><link rel='alternate' type='text/html' href='http://ntuguo.blogspot.com/2010/11/configure-gtalk-in-pidgin.html' title='Configure gtalk in pidgin'/><author><name>Jian Guo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4480815098372090797.post-7326717137529457303</id><published>2010-11-23T22:21:00.001-08:00</published><updated>2010-11-23T22:50:06.010-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gcc'/><category scheme='http://www.blogger.com/atom/ns#' term='library'/><category scheme='http://www.blogger.com/atom/ns#' term='c'/><title type='text'>create shared C library</title><content type='html'>How to create and use your own shared C library using gcc? This can be done in 4 steps.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;write  your library code, say sum.c with header file sum.h, and save them in your library folder, say ~/local/lib for the source, and ~/local/include for the header file.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;compile it using gcc&lt;br /&gt;&lt;br /&gt;gcc -I ~/local/include -c sum.c&lt;br /&gt;&lt;br /&gt;This will produce a object file sum.o&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;create a static library named "hash", do&lt;br /&gt;&lt;br /&gt;ar rcs libhash.a sum.o&lt;br /&gt;&lt;br /&gt;More than one *.o files can be included in single library&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;you are ready to use it by :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;include the "sum.h"&lt;br /&gt;&lt;/li&gt;&lt;li&gt;compile it using gcc -I ~/local/include -L ~/local/lib -lhash ...&lt;/li&gt;&lt;/ul&gt;To save typing -I xxx and -L xxx every time to use the library, save the path for auto lookup by adding the following lines to ~/.bashrc or ~/.bash_profile:&lt;br /&gt;&lt;br /&gt;# for header files&lt;br /&gt;export C_INCLUDE_PATH=~/local/include:$C_INCLUDE_PATH&lt;br /&gt;# for linking library&lt;br /&gt;exprot LD_LIBRARY_PATH=~/local/lib:$LD_LIBRARY_PATH&lt;br /&gt;export LIBRARY_PATH=~/local/lib:$LIBRARY_PATH&lt;/li&gt;&lt;/ol&gt;For more readings on differences of shared and static library, see &lt;a href="http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4480815098372090797-7326717137529457303?l=ntuguo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ntuguo.blogspot.com/feeds/7326717137529457303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ntuguo.blogspot.com/2010/11/create-shared-c-library.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/7326717137529457303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/7326717137529457303'/><link rel='alternate' type='text/html' href='http://ntuguo.blogspot.com/2010/11/create-shared-c-library.html' title='create shared C library'/><author><name>Jian Guo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4480815098372090797.post-4351310928307791446</id><published>2010-11-18T21:50:00.000-08:00</published><updated>2010-11-20T03:09:04.364-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='timer'/><title type='text'>Timing in C</title><content type='html'>&lt;pre&gt;&lt;span class="pre"&gt;#include &amp;lt;sys/time.h&amp;gt;&lt;br /&gt;#include &amp;lt;time.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdint.h&amp;gt;&lt;/span&gt;&lt;span class="keyword"&gt;&lt;br /&gt;&lt;br /&gt;typedef&lt;/span&gt; uint64_t u64&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="keyword"&gt;&lt;br /&gt;static inline&lt;/span&gt; u64 T2L&lt;span class="operator"&gt;()&lt;br /&gt;{&lt;/span&gt;&lt;span class="keyword"&gt;&lt;br /&gt;  struct&lt;/span&gt; timeval tv&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;  gettimeofday&lt;span class="operator"&gt;(&amp;amp;&lt;/span&gt;tv&lt;span class="operator"&gt;,&lt;/span&gt; NULL&lt;span class="operator"&gt;);&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;  return&lt;/span&gt; 1000000ULL&lt;span class="operator"&gt; *&lt;/span&gt; tv&lt;span class="operator"&gt;.&lt;/span&gt;tv_sec&lt;span class="operator"&gt; +&lt;/span&gt; tv&lt;span class="operator"&gt;.&lt;/span&gt;tv_usec&lt;span class="operator"&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;span class="keyword"&gt;&lt;br /&gt;&lt;br /&gt;static&lt;/span&gt; u64 _t_start_&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;u64 tstart&lt;span class="operator"&gt;()&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt;  _t_start_&lt;span class="operator"&gt; =&lt;/span&gt; T2L&lt;span class="operator"&gt;();&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;  return&lt;/span&gt; _t_start_&lt;span class="operator"&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;u64 tdiff&lt;span class="operator"&gt;()&lt;br /&gt;{&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;  return&lt;/span&gt; T2L&lt;span class="operator"&gt;() -&lt;/span&gt; _t_start_&lt;span class="operator"&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt;void&lt;/span&gt; ptdiff&lt;span class="operator"&gt;()&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt;  u64 d&lt;span class="operator"&gt; =&lt;/span&gt; T2L&lt;span class="operator"&gt;() -&lt;/span&gt; _t_start_&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;  printf&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="string"&gt;"%lu sec %lu usec\n"&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt; d&lt;span class="operator"&gt;/&lt;/span&gt;&lt;span class="int"&gt;1000000&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt; d&lt;span class="operator"&gt;%&lt;/span&gt;&lt;span class="int"&gt;1000000&lt;/span&gt;&lt;span class="operator"&gt;);&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4480815098372090797-4351310928307791446?l=ntuguo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ntuguo.blogspot.com/feeds/4351310928307791446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ntuguo.blogspot.com/2010/11/timing-in-c.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/4351310928307791446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/4351310928307791446'/><link rel='alternate' type='text/html' href='http://ntuguo.blogspot.com/2010/11/timing-in-c.html' title='Timing in C'/><author><name>Jian Guo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4480815098372090797.post-7959603176886696020</id><published>2010-07-12T00:01:00.000-07:00</published><updated>2010-07-12T00:19:11.322-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><title type='text'>My Experience with Latex</title><content type='html'>Most of the papers on Maths, especially those with mathematical formulas, are typeset with Latex. Here I list some of tips:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;To include images with different formats:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;PDF, one can use pdflatex to compile&lt;/li&gt;&lt;li&gt;ps, eps, use latex&lt;/li&gt;&lt;/ul&gt;Sometimes, when one has to latex (because of some other packages used), one can convert the formats of the images, using the command&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;blockquote&gt;convert&lt;/blockquote&gt;&lt;/div&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;To draw and include pictures, as I mentioned in previous posts, I use &lt;a href="http://jpicedt.sourceforge.net/"&gt;JPicEdt&lt;/a&gt; for editing to pst files, and then include them by &lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: center;"&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div style="text-align: center;"&gt;\include{picture.pst}&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;However, when pst format is used for Latex, one has to use three steps to compile:&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="text-align: center;"&gt;&lt;blockquote&gt;latex -&gt; dvi2ps -&gt; ps2pdf&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;in order to get the PDF file.&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4480815098372090797-7959603176886696020?l=ntuguo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ntuguo.blogspot.com/feeds/7959603176886696020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ntuguo.blogspot.com/2010/07/my-experience-with-latex.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/7959603176886696020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/7959603176886696020'/><link rel='alternate' type='text/html' href='http://ntuguo.blogspot.com/2010/07/my-experience-with-latex.html' title='My Experience with Latex'/><author><name>Jian Guo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4480815098372090797.post-6840649792775105358</id><published>2010-05-31T08:58:00.000-07:00</published><updated>2010-09-30T00:25:06.902-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu 9.10'/><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='skype'/><category scheme='http://www.blogger.com/atom/ns#' term='chinese'/><title type='text'>reinstalled ubuntu 9.10</title><content type='html'>Here is what I do to customize it according to my working package:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;sudo apt-get update&lt;/li&gt;&lt;li&gt;Chinese Support:&lt;br /&gt;sudo apt-get install ibus ibus-qt4 ibus-pinyin&lt;br /&gt;im-switch -s ibus&lt;/li&gt;&lt;li&gt;vim: my favorite editor and copy my customized .vimrc file&lt;br /&gt;sudo apt-get install vim&lt;/li&gt;&lt;li&gt;To add me to sudoer list, and enable the nopasswd function to avoid keep keying in the password. see: /etc/sudoers&lt;/li&gt;&lt;li&gt;Customize my firefox:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;enable the add-on Xmarks, and greasemonkey for downloading google PDF documents&lt;br /&gt;&lt;/li&gt;&lt;li&gt;sudo aptitude install ubuntu-restricted-extras (flashplayer)&lt;/li&gt;&lt;li&gt;sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts(jre)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;IM - pidgin with integrated skype&lt;br /&gt;&lt;ul&gt;&lt;li&gt;sudo apt-get install pidgin &lt;/li&gt;&lt;li&gt;download http://www.skype.com/go/getskype-linux-beta-ubuntu-32&lt;/li&gt;&lt;li&gt;http://eion.robbmob.com/skype4pidgin.deb&lt;/li&gt;&lt;li&gt; sudo dpkg -i *.deb&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;workspace: kile, latex, etc&lt;br /&gt;&lt;ul&gt;&lt;li&gt;sudo apt-get install kile jabref rapidsvn meld okular&lt;/li&gt;&lt;li&gt;configure rapidsvn to use kile and meld&lt;/li&gt;&lt;li&gt;download and install: http://downloads.sourceforge.net/jpicedt/jpicedt-install_1_4_1_03_20071021.jar?download&lt;br /&gt;&lt;/li&gt;&lt;li&gt;add llncs.cls to /usr/share/texmf/tex/latex/guojian/; sudo texhash&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Eclipse with C/C++&lt;br /&gt;&lt;ul&gt;&lt;li&gt;sudo apt-get install eclipse&lt;/li&gt;&lt;li&gt;Help &gt;&gt; Install New Software, select "Galileo Update Site - http://download.eclipse.org/releases/galileo/", and choose "Eclipse C/C++ Development Tools"&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Lastly, copy my customized .bashrc, download from: &lt;a href="https://mail.google.com/mail/?ui=2&amp;amp;ik=836154c62e&amp;amp;view=att&amp;amp;th=128f82ef96120500&amp;amp;attid=0.1&amp;amp;disp=attd&amp;amp;realattid=f_g9y0d5wj1&amp;amp;zw"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;That's all for today :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4480815098372090797-6840649792775105358?l=ntuguo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ntuguo.blogspot.com/feeds/6840649792775105358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ntuguo.blogspot.com/2010/05/reinstalled-ubuntu-910.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/6840649792775105358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/6840649792775105358'/><link rel='alternate' type='text/html' href='http://ntuguo.blogspot.com/2010/05/reinstalled-ubuntu-910.html' title='reinstalled ubuntu 9.10'/><author><name>Jian Guo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4480815098372090797.post-2685406655339825918</id><published>2009-11-07T01:51:00.000-08:00</published><updated>2009-11-07T01:54:17.774-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='chinese'/><category scheme='http://www.blogger.com/atom/ns#' term='pinyin'/><category scheme='http://www.blogger.com/atom/ns#' term='ibus'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Install Chinese input method</title><content type='html'>Recent ubuntu versions switch to use ibus as the system input. ibus supports chinese well also, so I switch from scim. To install&lt;br /&gt;&lt;br /&gt;sudo apt-get install ibus ibus-qt4 ibus-pinyin&lt;br /&gt;im-switch -s ibus&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4480815098372090797-2685406655339825918?l=ntuguo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ntuguo.blogspot.com/feeds/2685406655339825918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ntuguo.blogspot.com/2009/11/install-chinese-input-method.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/2685406655339825918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/2685406655339825918'/><link rel='alternate' type='text/html' href='http://ntuguo.blogspot.com/2009/11/install-chinese-input-method.html' title='Install Chinese input method'/><author><name>Jian Guo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4480815098372090797.post-3665337829918579939</id><published>2009-10-24T02:40:00.000-07:00</published><updated>2009-10-24T02:42:10.772-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='new disk'/><category scheme='http://www.blogger.com/atom/ns#' term='migrate'/><category scheme='http://www.blogger.com/atom/ns#' term='clone'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>clone ubuntu to new disk</title><content type='html'>source is from &lt;a href="https://answers.launchpad.net/ubuntu/+question/49298"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div class="boardCommentBody"&gt;&lt;p&gt;"I always make this, booting from Ubuntu live cd and using dd to make a copy from older disk to newer disk&lt;/p&gt; &lt;p&gt;Assuming /dev/hda size is &lt;&gt; &lt;p&gt;Open a terminal and type:&lt;/p&gt; &lt;p&gt;sudo -i&lt;/p&gt; &lt;p&gt;fdisk -l&lt;/p&gt; &lt;p&gt;dd if=/dev/hda of=/dev/hdb&lt;/p&gt; &lt;p&gt;Replace /dev/hda with your Ubuntu Drive&lt;br /&gt;Replace /dev/hdb with the drive you wish to copy TO!&lt;/p&gt; &lt;p&gt;check &amp;amp; double check the fdisk -l output&lt;/p&gt; &lt;p&gt;Unplug the older disk and keep it as secure backup of your current installation for a while and plug the new hard disk as primary and boot your pc.&lt;br /&gt;After you can put your old disk as secondary on the same pc or use it on a different pc (it usually works, you might need to reconfigure graphics layer) .&lt;/p&gt; &lt;p&gt;Then booting from Ubuntu live cd and using System → Administration → Partition editor, increase the just copied partitition size to fill new disk size (bigger than previous disk).&lt;/p&gt; &lt;p&gt;This is my usual Ubuntu cloning method...&lt;/p&gt; &lt;p&gt;Hope this helps"&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4480815098372090797-3665337829918579939?l=ntuguo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ntuguo.blogspot.com/feeds/3665337829918579939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ntuguo.blogspot.com/2009/10/clone-ubuntu-to-new-disk.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/3665337829918579939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/3665337829918579939'/><link rel='alternate' type='text/html' href='http://ntuguo.blogspot.com/2009/10/clone-ubuntu-to-new-disk.html' title='clone ubuntu to new disk'/><author><name>Jian Guo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4480815098372090797.post-5049861035967431578</id><published>2009-10-23T09:55:00.001-07:00</published><updated>2009-10-23T10:01:51.395-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='meld'/><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='okular'/><category scheme='http://www.blogger.com/atom/ns#' term='jabref'/><category scheme='http://www.blogger.com/atom/ns#' term='rapidsvn'/><category scheme='http://www.blogger.com/atom/ns#' term='jpicedt'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><category scheme='http://www.blogger.com/atom/ns#' term='kile'/><title type='text'>Write paper using Latex under ubuntu</title><content type='html'>To write a paper using Latex under ubuntu&lt;br /&gt;&lt;ol&gt;&lt;li&gt;kile - good editor using KDE for latex&lt;/li&gt;&lt;li&gt;jabref - maintain reference bib file&lt;/li&gt;&lt;li&gt;jPicEdt - draw graph&lt;/li&gt;&lt;li&gt;RapidSVN - graphic svn client&lt;/li&gt;&lt;li&gt;meld - graphic diff tool&lt;/li&gt;&lt;li&gt;okular - document preview&lt;/li&gt;&lt;/ol&gt;To install all&lt;br /&gt;&lt;ul&gt;&lt;li&gt;sudo apt-get install kile jabref jpicedt rapidsvn meld okular&lt;/li&gt;&lt;li&gt;jPicEdt can be downloaded from &lt;a href="http://downloads.sourceforge.net/jpicedt/jpicedt-install_1_4_1_03_20071021.jar?download"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Note rapidsvn does not use meld automatically, needs to configure manually&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4480815098372090797-5049861035967431578?l=ntuguo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ntuguo.blogspot.com/feeds/5049861035967431578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ntuguo.blogspot.com/2009/10/write-paper-using-latex-under-ubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/5049861035967431578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/5049861035967431578'/><link rel='alternate' type='text/html' href='http://ntuguo.blogspot.com/2009/10/write-paper-using-latex-under-ubuntu.html' title='Write paper using Latex under ubuntu'/><author><name>Jian Guo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4480815098372090797.post-5491216301828457558</id><published>2009-10-23T09:48:00.000-07:00</published><updated>2009-10-23T09:54:48.997-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='api'/><category scheme='http://www.blogger.com/atom/ns#' term='skype'/><category scheme='http://www.blogger.com/atom/ns#' term='pidgin'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Install Skype</title><content type='html'>&lt;ol&gt;&lt;li&gt;download from &lt;a href="http://www.skype.com/go/getskype-linux-beta-ubuntu-32"&gt;here&lt;/a&gt; for 32-bit or &lt;a href="http://www.skype.com/go/getskype-linux-beta-ubuntu-64"&gt;here&lt;/a&gt; for 64-bit&lt;/li&gt;&lt;li&gt;sudo dpkg -i skype-ubuntu-intrepid_2.1.0.47-1_i386.deb&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;(Optional) To integrate skype with pidgin&lt;br /&gt;&lt;ul&gt;&lt;li&gt;sudo apt-get install pidgin skype4pidgin&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4480815098372090797-5491216301828457558?l=ntuguo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ntuguo.blogspot.com/feeds/5491216301828457558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ntuguo.blogspot.com/2009/10/install-skype.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/5491216301828457558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/5491216301828457558'/><link rel='alternate' type='text/html' href='http://ntuguo.blogspot.com/2009/10/install-skype.html' title='Install Skype'/><author><name>Jian Guo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4480815098372090797.post-971836128209511812</id><published>2009-10-23T09:35:00.000-07:00</published><updated>2009-10-23T09:45:26.624-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='on fly'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='swap'/><title type='text'>Creating/Adding Swap on Fly</title><content type='html'>Source is from &lt;a href="http://ubuntuforums.org/showthread.php?t=89782"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;sudo dd if=/dev/zero of=/swap_file bs=1M count=1000&lt;/li&gt;&lt;li&gt;sudo chown root:root /swap_file&lt;/li&gt;&lt;li&gt;sudo chmod 600 /swap_file&lt;/li&gt;&lt;li&gt;sudo mkswap /swap_file&lt;/li&gt;&lt;li&gt;sudo swapon /swap_file&lt;/li&gt;&lt;li&gt;sudo gedit /etc/fstab&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;/swap_file       none            swap    sw              0       0&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Comments:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;create a file named "swap_file" with size 1000MB&lt;/li&gt;&lt;li&gt;change the ownership to "root"&lt;/li&gt;&lt;li&gt;change the access so that it can be read and write by owner only&lt;/li&gt;&lt;li&gt;make it be to "swap" type&lt;/li&gt;&lt;li&gt;turn on the swap&lt;/li&gt;&lt;li&gt;edit the sytem file so that the swap is mounted when system is started&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4480815098372090797-971836128209511812?l=ntuguo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ntuguo.blogspot.com/feeds/971836128209511812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ntuguo.blogspot.com/2009/10/creatingadding-swap-on-fly.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/971836128209511812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/971836128209511812'/><link rel='alternate' type='text/html' href='http://ntuguo.blogspot.com/2009/10/creatingadding-swap-on-fly.html' title='Creating/Adding Swap on Fly'/><author><name>Jian Guo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4480815098372090797.post-4472491538816946869</id><published>2009-09-07T02:18:00.000-07:00</published><updated>2009-09-07T02:21:19.697-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='QEMU'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Installing Windows under Ubuntu -- QEMU</title><content type='html'>Original source is from &lt;a href="http://ubuntuforums.org/showthread.php?t=179472"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:Red;"&gt;&lt;i&gt;*note: KQEMU is the QEMU Accelorator&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;REMEMBER: If it's not covered here RTFM....&lt;br /&gt;&lt;br /&gt;Step 1) Compile and setup of Qemu and KQemu&lt;br /&gt;Step 2) Installation of GuestOS [ Windows 98se in this example ]&lt;br /&gt;Step 3) Setup of Tun/Tap network interface on host and guest OS.&lt;br /&gt;Step 4) NAT setup to allow guestOS access to the internet.&lt;br /&gt;&lt;br /&gt;Brief Description:&lt;br /&gt;QEMU is an Open-Source Emulator that emulates x86 arch as well as several others.... allowing for guestOS's to be installed inside the host OS.&lt;br /&gt;QEMU is available for Linux, Mac, and Windows. We'll be covering the Linux Package in this HowTo.&lt;br /&gt;For more information on QEMU visit the projectpage @ &lt;a href="http://fabrice.bellard.free.fr/qemu/" target="_blank"&gt;http://fabrice.bellard.free.fr/qemu/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What you'll need:&lt;br /&gt;+ QEMU source tarball from &lt;a href="http://fabrice.bellard.free.fr/qemu/" target="_blank"&gt;http://fabrice.bellard.free.fr/qemu/&lt;/a&gt;&lt;br /&gt;+ KQEMU binary tarball from &lt;a href="http://fabrice.bellard.free.fr/qemu/" target="_blank"&gt;http://fabrice.bellard.free.fr/qemu/&lt;/a&gt;&lt;br /&gt;+ linux-headers package&lt;br /&gt;+ IPTables ( should already be installed ) package&lt;br /&gt;+ libsdl1.2-dev package&lt;br /&gt;+ Tun/Tap package&lt;br /&gt;+ uml-utilities package&lt;br /&gt;+ windows98 install cd and valid windows98 serial.&lt;br /&gt;+ GCC-3.4 package&lt;br /&gt;&lt;br /&gt;Ok, so this is the first HowTo i've wrote in quite a long time. First for ubuntu, and Qemu..&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;##################################################  ##############&lt;br /&gt;[ Step 1 ] - Compilation and Installation of KQEMU and QEMU&lt;br /&gt;&lt;br /&gt; Outlined here is the steps taken to compile and setup Qemu and Kernel Module KQemu&lt;br /&gt;&lt;br /&gt;A) Download the latest source tarball of QEMU from &lt;a href="http://fabrice.bellard.free.fr/qemu/download.html" target="_blank"&gt;http://fabrice.bellard.free.fr/qemu/download.html&lt;/a&gt; current version is 0.8.1&lt;br /&gt;B) Download the latest binary of KQEMU from &lt;a href="http://fabrice.bellard.free.fr/qemu/qemu-accel.html" target="_blank"&gt;http://fabrice.bellard.free.fr/qemu/qemu-accel.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;C) Move the tarballs to your /usr/local/src directory and deflate&lt;br /&gt;  #&gt; sudo mv qemu-version.tar.gz /usr/local/src/&lt;br /&gt;  #&gt; sudo mv kqemu-version.tar.gz /usr/local/src/&lt;br /&gt;&lt;br /&gt; deflate...&lt;br /&gt;  #&gt; sudo gunzip qemu-version.tar.gz; sudo tar -xvf qemu-version.tar&lt;br /&gt;  #&gt; sudo gunzip kqemu-version.tar.gz; sudo tar -xvf kqemu-version.tar&lt;br /&gt;&lt;br /&gt;D) Install linux-headers for your current kernel version.&lt;br /&gt;     If you don't know your current kernel version you can do `uname -r` at the shell to find out...&lt;br /&gt;   &lt;br /&gt; #&gt; sudo apt-get install linux-headers-`uname -r`&lt;br /&gt;&lt;br /&gt;E) Install GCC-3.4 [ qemu complains on GCC-4 ] and libsdl1.2-dev&lt;br /&gt;&lt;br /&gt;  #&gt; sudo apt-get install gcc-3.4 libsdl1.2-dev&lt;br /&gt;&lt;br /&gt; locate the installed gcc-3.4 binary using whereis&lt;br /&gt;  #&gt; whereis gcc-3.4&lt;br /&gt;&lt;br /&gt; it should be located in /usr/bin/ if not found at all installation failed. repeat step E.&lt;br /&gt; make a note of it's location. you're going to need it in step F&lt;br /&gt;&lt;br /&gt;F) Configure and Compile QEMU and KQEMU&lt;br /&gt;&lt;br /&gt; change directories to your qemu-source you deflated in step C&lt;br /&gt;  #&gt; cd /usr/local/src/qemu-version&lt;br /&gt;  #&gt; sudo ./configure --cc=/usr/bin/gcc-3.4 [ remember the location of it from step E? ]&lt;br /&gt;&lt;br /&gt; once configuration is completed run make and make install to compile and install... do so as follows&lt;br /&gt;&lt;br /&gt;  #&gt; sudo make&lt;br /&gt;  #&gt; sudo make install&lt;br /&gt;&lt;br /&gt; verify that QEMU installed correctly...&lt;br /&gt;  #&gt; whereis qemu&lt;br /&gt;&lt;br /&gt; change directories to your kqemu-source you deflated in step C, and configure make and make install&lt;br /&gt;&lt;br /&gt;  #&gt; cd /usr/local/src/kqemu-version&lt;br /&gt;  #&gt; sudo ./configure&lt;br /&gt;  #&gt; sudo make&lt;br /&gt;  #&gt; sudo make install&lt;br /&gt;&lt;br /&gt; verify that device node /dev/kqemu exists&lt;br /&gt; if not...execute following commands&lt;br /&gt;&lt;br /&gt;  #&gt; sudo mknod /dev/kqemu c 250 0&lt;br /&gt;  #&gt; sudo chmod 666 /dev/kqemu&lt;br /&gt;&lt;br /&gt; Active module KQEMU&lt;br /&gt;  #&gt; sudo modprobe kqemu&lt;br /&gt; Verify that it loaded properly&lt;br /&gt;  #&gt; lsmod | grep kqemu&lt;br /&gt; If it failed to show up. issue a dmesg | tail to see what the error was&lt;br /&gt;  #&gt; dmesg | tail&lt;br /&gt; Anyway... continuing...&lt;br /&gt;&lt;br /&gt;[ Step 1 Completed ]&lt;br /&gt;##################################################  ################&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[ Step 2 ] Installing Guest OS&lt;br /&gt;&lt;span style="color:Red;"&gt;&lt;i&gt;*notes:   you can use either the actual install CD or an ISO made from the original install disk, I used an iso.&lt;br /&gt;        you can also use the dd command with the seek option to create your hard disk image file, in place of qemu-img create&lt;br /&gt;        for convenience we're going to use the qemu-img binary installed with QEMU&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;*help:  Run qemu/qemu-img without any arguements to view it's help&lt;br /&gt;&lt;br /&gt;A) Create the Hard Drive Image File to use as HDA&lt;br /&gt; choose the directory you wish to store your disk images you can use mkdir to create a new one. I use ~/qemu&lt;br /&gt;  #&gt; cd ~/qemu&lt;br /&gt; A brief rundown of what we're executing here....&lt;br /&gt; qemu-img create [filename] [-f format( raw, vvfat, cloop,... )] [size G(gigs), M(megs) ]&lt;br /&gt;  #&gt; qemu-img create win98.img -f raw 2G&lt;br /&gt;Ok, we've created the 2G image file to install windows98se into....now we load QEMU to boot from the cdrom/iso file specified to start installation&lt;br /&gt;&lt;br /&gt;  #&gt; qemu -hda win98.img -cdrom /dev/cdrom -boot d -localtime -net nic -net tap&lt;br /&gt; Now QEMU should boot from CD, just follow the steps to complete the installation...&lt;br /&gt;&lt;br /&gt; Once installation has completed now we can move onto Step 3&lt;br /&gt;[ Step 2 Complete ]&lt;br /&gt;##################################################  ################&lt;br /&gt;&lt;br /&gt;[ Step 3 ] Setting up TUN/TAP network interface on HostOS and GuestOS&lt;br /&gt;&lt;br /&gt;A) Install uml-utilities via apt&lt;br /&gt; #&gt; sudo apt-get install uml-utilities&lt;br /&gt;B) Load kernel module tun&lt;br /&gt; #&gt; sudo modprobe tun66.202.65.50&lt;br /&gt;C) Create the /dev/net/tun device node&lt;br /&gt; #&gt; mkdir /dev/net&lt;br /&gt;  #&gt; mknod /dev/net/tun c 10 200&lt;br /&gt;D) Setup the tap0 interface, with an ip address i use 192.168.100.1 for this.&lt;br /&gt; Create the tap0 interface using tunctl&lt;br /&gt; #&gt; sudo tunctl&lt;br /&gt;&lt;br /&gt; Give it an IP-Address&lt;br /&gt; #&gt; sudo ifconfig tap0 192.168.100.1 up&lt;br /&gt; Make sure it was configured properly...&lt;br /&gt; #&gt; ifconfig&lt;br /&gt;&lt;br /&gt; You should see tap0 with an inet addr: 192.168.100.1 and a Mask: 255.255.255.0&lt;br /&gt; If there is no mask set...sometimes this happens don't know why but it's happend....do this&lt;br /&gt; #&gt; sudo ifconfig tap0 192.168.100.1 netmask 255.255.255.0 up&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; Ok, we're done with the HOST side of this&lt;br /&gt;&lt;br /&gt;E) Setting up the GuestOS's network configuration&lt;br /&gt;&lt;br /&gt; If you don't have QEMU booted into windows already then do so by this command...&lt;br /&gt;  #&gt; qemu -hda win98.img -boot c -net nic -net tap &amp;amp;&lt;br /&gt;&lt;br /&gt; Once windows has loaded goto your Control panel and open Network Settings&lt;br /&gt; At the configuration tab Select TCP/IP and click properties&lt;br /&gt;&lt;br /&gt; In the Properties window&lt;br /&gt; - Select the IP Address Tab&lt;br /&gt;  select specify an IP address&lt;br /&gt;  enter 192.168.100.2 as your ip address&lt;br /&gt;  enter 255.255.255.0 as your subnet mask&lt;br /&gt; - Select the Gateway Tab&lt;br /&gt;  add a new gateway as 192.168.100.1&lt;br /&gt; - Select Ok&lt;br /&gt; Select Ok&lt;br /&gt; Now you will be promted for a restart....restart and you should be able to ping the guestOS from the hostOS&lt;br /&gt;&lt;br /&gt;F) Testing the network connection&lt;br /&gt; from a terminal&lt;br /&gt; #&gt; ping 192.168.100.2 -c 4&lt;br /&gt; You should reach 192.168.100.2 if not, verify you followed every step.&lt;br /&gt;&lt;br /&gt; Make sure you can Ping the Host from the guest&lt;br /&gt;&lt;br /&gt; on Windows from a dosprmpt&lt;br /&gt; #&gt; ping 192.168.100.1 -n 4&lt;br /&gt; You should reach 192.168.100.1 if not, verify you followed every step correctly.&lt;br /&gt;&lt;br /&gt;[ Step 3 Complete ]&lt;br /&gt;##################################################  ###############&lt;br /&gt;&lt;br /&gt;[ Step 4 Setting up NAT to allow GuestOS access to the internet ]&lt;br /&gt;&lt;span style="color:Red;"&gt;&lt;i&gt;*note: i'm going to go ahead and assume you have iptables already installed.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A) Load Required Kernel Modules&lt;br /&gt; #&gt; sudo modprobe ip_tables&lt;br /&gt; #&gt; sudo modprobe iptable_nat&lt;br /&gt; #&gt; sudo modprobe ip_nat_ftp&lt;br /&gt; #&gt; sudo modprobe ip_nat_irc&lt;br /&gt;&lt;br /&gt;B) Enable IP-Forwarding&lt;br /&gt; as root run&lt;br /&gt; #&gt; echo "1" &gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;&lt;br /&gt; If you get your IP Address Dynamically e.g. PPP0 (Dial-up)&lt;br /&gt; as root run&lt;br /&gt; #&gt; echo "1" &gt; /proc/sys/net/ipv4/ip_dynaddr&lt;br /&gt;&lt;br /&gt; Enable SNAT (MASQUERADE) functionality on eth0/ppp0&lt;br /&gt; *note: replace eth0 with ppp0 for dialup&lt;br /&gt;&lt;br /&gt; #&gt; sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE&lt;br /&gt;&lt;br /&gt;C) Setup DNS on guestOS&lt;br /&gt; &lt;span style="color:Red;"&gt;&lt;i&gt;*note: this is for windows98se, methods aren't listed for other OS's&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; You can retrieve your DNS Server Ip's from your /etc/resolv.conf file after connected to the internet.&lt;br /&gt;&lt;br /&gt;  #&gt; sudo cat /etc/resolv.conf&lt;br /&gt; &lt;br /&gt; In windows, goto control panel -&gt; networking -&gt; TCP/IP Properties -&gt; DNS Configuration&lt;br /&gt; Select Enable DNS&lt;br /&gt;&lt;br /&gt; Set Host to your gateway address, i set mine to 192.168.100.1 for my gateway&lt;br /&gt; Set Domain to your Domain i just set it to one of the DNS servers IP Address's&lt;br /&gt; Add your ISP DNS Servers to the DNS List..&lt;br /&gt;&lt;br /&gt; Ok, reboot! everything should work fine now..&lt;br /&gt;[ Step 4 Complete ]&lt;br /&gt;&lt;br /&gt;After following these steps you should have a working Qemu using the KQEMU accelerator as well as Tun/Tap Virtual Network forwarding Requests from the guest to the internet.&lt;br /&gt;If something isn't working, double check to make sure you set it up correctly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4480815098372090797-4472491538816946869?l=ntuguo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ntuguo.blogspot.com/feeds/4472491538816946869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ntuguo.blogspot.com/2009/09/installing-windows-under-ubuntu-qemu.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/4472491538816946869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/4472491538816946869'/><link rel='alternate' type='text/html' href='http://ntuguo.blogspot.com/2009/09/installing-windows-under-ubuntu-qemu.html' title='Installing Windows under Ubuntu -- QEMU'/><author><name>Jian Guo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4480815098372090797.post-8116054436384264986</id><published>2009-09-07T02:08:00.000-07:00</published><updated>2009-09-07T02:15:39.697-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Check'/><category scheme='http://www.blogger.com/atom/ns#' term='System'/><title type='text'>Check System</title><content type='html'>Here I list some common commands used for checking system utilization:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;top -- check the information of most resource consuming threads&lt;/li&gt;&lt;li&gt;cat /proc/cpuinfo  -- check the CPU information&lt;/li&gt;&lt;li&gt;cat /proc/meminfo (or free -m) -- check the memory information&lt;/li&gt;&lt;li&gt;ps -- report a snapshot of the current processes&lt;/li&gt;&lt;li&gt;df -h -- check the disk information&lt;/li&gt;&lt;li&gt;du -h -- check the size of current directory&lt;/li&gt;&lt;li&gt;kill -- kill process, for example when some program is dead. use -9 to force kill, or pkill (program name) in case you can't find process id.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;To be updated for more ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4480815098372090797-8116054436384264986?l=ntuguo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ntuguo.blogspot.com/feeds/8116054436384264986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ntuguo.blogspot.com/2009/09/check-system.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/8116054436384264986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/8116054436384264986'/><link rel='alternate' type='text/html' href='http://ntuguo.blogspot.com/2009/09/check-system.html' title='Check System'/><author><name>Jian Guo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4480815098372090797.post-6586422491629132184</id><published>2009-07-03T05:04:00.000-07:00</published><updated>2009-07-03T05:05:24.654-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='no password'/><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><title type='text'>ssh login without password</title><content type='html'>&lt;p&gt;First log in on A as user a and generate a pair of authentication keys.  Do not enter a passphrase:&lt;/p&gt; &lt;pre class="shell"&gt;a@A:~&gt; ssh-keygen -t rsa&lt;br /&gt;Generating public/private rsa key pair.&lt;br /&gt;Enter file in which to save the key (/home/a/.ssh/id_rsa):&lt;br /&gt;Created directory '/home/a/.ssh'.&lt;br /&gt;Enter passphrase (empty for no passphrase):&lt;br /&gt;Enter same passphrase again:&lt;br /&gt;Your identification has been saved in /home/a/.ssh/id_rsa.&lt;br /&gt;Your public key has been saved in /home/a/.ssh/id_rsa.pub.&lt;br /&gt;The key fingerprint is:&lt;br /&gt;3e:4f:05:79:3a:9f:96:7c:3b:ad:e9:58:37:bc:37:e4 a@A&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt;Now use &lt;tt&gt;ssh&lt;/tt&gt; to create a directory &lt;tt&gt;~/.ssh&lt;/tt&gt; as user b on B. (The directory may already exist, which is fine):&lt;/p&gt; &lt;pre class="shell"&gt;a@A:~&gt; ssh b@B mkdir -p .ssh&lt;br /&gt;b@B's password:&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt;Finally append a's new public key to &lt;tt&gt;b@B:.ssh/authorized_keys&lt;/tt&gt; and enter b's password one last time:&lt;/p&gt;  &lt;pre class="shell"&gt;a@A:~&gt; cat .ssh/id_rsa.pub | ssh b@B 'cat &gt;&gt; .ssh/authorized_keys'&lt;br /&gt;b@B's password:&lt;br /&gt;&lt;/pre&gt;   &lt;p&gt;From now on you can log into B as b from A as a without password:&lt;/p&gt; &lt;pre class="shell"&gt;a@A:~&gt; ssh b@B hostname&lt;br /&gt;B&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4480815098372090797-6586422491629132184?l=ntuguo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ntuguo.blogspot.com/feeds/6586422491629132184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ntuguo.blogspot.com/2009/07/ssh-login-without-password.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/6586422491629132184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/6586422491629132184'/><link rel='alternate' type='text/html' href='http://ntuguo.blogspot.com/2009/07/ssh-login-without-password.html' title='ssh login without password'/><author><name>Jian Guo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4480815098372090797.post-18165722335704705</id><published>2009-06-04T23:39:00.000-07:00</published><updated>2009-06-04T23:41:05.647-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Eclipse with C++</title><content type='html'>In ubuntu,&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;sudo apt-get install eclipse eclipse-cdt&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4480815098372090797-18165722335704705?l=ntuguo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ntuguo.blogspot.com/feeds/18165722335704705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ntuguo.blogspot.com/2009/06/eclipse-with-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/18165722335704705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/18165722335704705'/><link rel='alternate' type='text/html' href='http://ntuguo.blogspot.com/2009/06/eclipse-with-c.html' title='Eclipse with C++'/><author><name>Jian Guo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4480815098372090797.post-4314686997220717075</id><published>2009-06-03T20:27:00.000-07:00</published><updated>2009-06-03T20:30:26.078-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='downgrade'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>A script to downgrade svn versions</title><content type='html'>&lt;span style="font-family: verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="h3" id="working-copy-format-change" title="working-copy-format-change"&gt; &lt;h3&gt;I got an error saying "This client is too old to work with working     copy '...' ".  How can I fix it without upgrading Subversion?&lt;/h3&gt;  &lt;p&gt;Sometimes the working copy metadata format changes incompatibly between minor releases.  For example, say you have a working copy created with Subversion 1.4.4, but one day you decide to try out Subversion 1.5.0.  Afterwards, you attempt to switch back to 1.4.4, but it doesn't work — it just gives the above error.&lt;/p&gt;  &lt;p&gt;This is because 1.5.0 upgraded your working copy format to support some new features (in this case, changelists, the keep-local flag, and variable-depth directories).  Although 1.4.4 doesn't know anything about these new features, it can at least recognize that the working copy format has been upgraded to something higher than it can handle.&lt;/p&gt;  &lt;p&gt;1.5.0 upgraded the working copy for a good reason: it realizes that 1.4.4 does not know about these new features, and that if 1.4.4 were to meddle with the working copy metadata now, important information might be lost, possibly causing corruption (see &lt;a href="http://subversion.tigris.org/issues/show_bug.cgi?id=2961"&gt;issue #2961&lt;/a&gt;, for example).&lt;/p&gt;  &lt;p&gt;But this automatic upgrade behavior can be annoying, if you just want to try out a new release of Subversion without installing it permanently.  For this reason, we distribute a script that can downgrade working copies when doing so is safe:&lt;/p&gt;  &lt;blockquote&gt; &lt;p&gt;&lt;a href="http://svn.collab.net/repos/svn/trunk/tools/client-side/change-svn-wc-format.py"&gt;http://svn.collab.net/repos/svn/trunk/tools/client-side/change-svn-wc-format.py&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Run that script with the "&lt;tt&gt;--help&lt;/tt&gt;" option to see how to use it.  As future versions of Subversion are released, we will try to keep this FAQ entry up-to-date with potential downgrade scenarios and their implications.&lt;/p&gt;  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4480815098372090797-4314686997220717075?l=ntuguo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ntuguo.blogspot.com/feeds/4314686997220717075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ntuguo.blogspot.com/2009/06/script-to-downgrade-svn-versions.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/4314686997220717075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/4314686997220717075'/><link rel='alternate' type='text/html' href='http://ntuguo.blogspot.com/2009/06/script-to-downgrade-svn-versions.html' title='A script to downgrade svn versions'/><author><name>Jian Guo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4480815098372090797.post-7037802681422208111</id><published>2009-06-03T20:04:00.000-07:00</published><updated>2009-06-03T20:09:14.080-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GAL'/><category scheme='http://www.blogger.com/atom/ns#' term='evolution'/><title type='text'>Evolution - Global Catalog server name</title><content type='html'>&lt;pre style="font-family: verdana;"&gt;&lt;span style="font-size:100%;"&gt;To discover the Global Address List/Active Directory in Outlook:&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li style="font-family: verdana;"&gt;&lt;span style="font-size:100%;"&gt;Open a new email message in Outlook.&lt;/span&gt;&lt;/li&gt;&lt;li style="font-family: verdana;"&gt;&lt;span style="font-size:100%;"&gt;Click on the "To:" button to get the "Select Names" dialog&lt;/span&gt;&lt;/li&gt;&lt;li style="font-family: verdana;"&gt;&lt;span style="font-size:100%;"&gt;Put "Show Names from the" to "Global Address List".&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: verdana;font-size:100%;" &gt;Right-click on the "Global Address List" to get "Properties". This opens a dialog with the name of the Global Address List server and the path. You just need the server name.&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4480815098372090797-7037802681422208111?l=ntuguo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ntuguo.blogspot.com/feeds/7037802681422208111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ntuguo.blogspot.com/2009/06/evolution-global-catalog-server-name.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/7037802681422208111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4480815098372090797/posts/default/7037802681422208111'/><link rel='alternate' type='text/html' href='http://ntuguo.blogspot.com/2009/06/evolution-global-catalog-server-name.html' title='Evolution - Global Catalog server name'/><author><name>Jian Guo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
