<?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-1810057280041377847</id><updated>2012-02-21T05:27:57.831+01:00</updated><category term='tvants'/><category term='manifesto'/><category term='flash'/><category term='mediawiki'/><category term='distro'/><category term='gparted'/><category term='gentoo'/><category term='C'/><category term='rights'/><category term='zattoo'/><category term='irc bot'/><category term='fedora'/><category term='gnu'/><category term='wine'/><category term='hardy'/><category term='mplayer'/><category term='gutsy'/><category term='commands'/><category term='filesystems'/><category term='file extensions'/><category term='git'/><category term='python'/><category term='dhcpd'/><category term='internet'/><category term='debian'/><category term='dapper'/><category term='windows'/><category term='boinc'/><category term='xen'/><category term='repository'/><category term='sony-ericsson-k530i'/><category term='backup'/><category term='arduino'/><category term='linux'/><category term='livedistro'/><category term='emacs'/><category term='java'/><category term='usb'/><category term='php'/><category term='sqlite'/><category term='lisp'/><category term='video_streaming'/><category term='bash'/><category term='chroot'/><category term='shell-scripting'/><category term='Qt library'/><category term='bluetooth'/><category term='primes'/><category term='hello world'/><category term='android'/><category term='eclair'/><category term='errors'/><category term='kernel'/><category term='grid computing'/><category term='qemu'/><category term='ubuntu'/><title type='text'>LINUX CLUES</title><subtitle type='html'>Blog dedicated to linux based systems, open source, free software and other computer related things...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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>57</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1810057280041377847.post-4294648819822523547</id><published>2012-01-05T06:09:00.010+01:00</published><updated>2012-01-05T15:00:29.861+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mplayer'/><title type='text'>Split a Media Video File (AVI, FLV,...) using Mencoder and Mplayer</title><content type='html'>Mencoder is a movie encoder program that allows us to split a media video(e.g AVI) file into several AVI files.&lt;br&gt;&lt;br&gt;We are going to &lt;b&gt;split a media video file maintaining same video and audio codecs&lt;/b&gt;.&lt;br&gt;&lt;br&gt;As mencoder accepts other file formats than avi files, we will be able to split them too, but result will be avi files.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;SPLIT ONE FILE INTO TWO&lt;/b&gt;&lt;br&gt;&lt;br&gt;E.g: We are going to &lt;b&gt;split foo.avi file into foo1.avi(600 seconds long) and remaining length in foo2.avi&lt;/b&gt;.&lt;br&gt;&lt;br&gt;Following mencoder man page advice, we could try these options:&lt;br&gt;&lt;code&gt;$ mencoder foo.avi -o foo1.avi -oac copy -ovc copy -endpos 600&lt;/code&gt;&lt;br&gt;&lt;code&gt;$ mencoder foo.avi -o foo3.avi -oac copy -ovc copy -ss 600&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;mencoder options&lt;/b&gt;:&lt;br&gt;&lt;a href="http://linuxclues.blogspot.com/2012/01/mencoder-split-video-avi-file-mplayer.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-4294648819822523547?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/4294648819822523547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=4294648819822523547' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/4294648819822523547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/4294648819822523547'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2012/01/mencoder-split-video-avi-file-mplayer.html' title='Split a Media Video File (AVI, FLV,...) using Mencoder and Mplayer'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-4129325956263508290</id><published>2012-01-04T09:37:00.003+01:00</published><updated>2012-01-06T15:38:57.036+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><title type='text'>Swapping on a File in Linux</title><content type='html'>This article shows how to &lt;b&gt;create a standard file&lt;/b&gt; and configure your linux based system to &lt;b&gt;activate swapping or paging on it&lt;/b&gt;.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;CREATE THE SWAP FILE&lt;/b&gt;&lt;br&gt;&lt;br&gt;First &lt;b&gt;we create the swap file using dd command&lt;/b&gt;. cp is not useful here because &lt;b&gt;swap file has not to contain holes&lt;/b&gt;.&lt;br&gt;&lt;code&gt;# dd if=/dev/zero of=/mnt/swapfile bs=1M count=200&lt;/code&gt;  # We create a swap file of 200MByte in size.&lt;br&gt;&lt;br&gt;For safety we disallow other users to read and modify the file:&lt;br&gt;&lt;code&gt;# chown root.root /mnt/swapfile&lt;/code&gt;&lt;br&gt;&lt;code&gt;# chmod 600 /mnt/swapfile&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;Swap size is unlimited&lt;/b&gt; for linux kernels after 2.3.3&lt;br&gt;Kernels after 2.4.10 support up to 32 swap areas.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;SET UP THE SWAP FILE&lt;/b&gt;&lt;br&gt;&lt;a href="http://linuxclues.blogspot.com/2012/01/page-swap-on-file-linux-kernel.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-4129325956263508290?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/4129325956263508290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=4129325956263508290' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/4129325956263508290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/4129325956263508290'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2012/01/page-swap-on-file-linux-kernel.html' title='Swapping on a File in Linux'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-2528518500110176461</id><published>2011-12-24T18:28:00.006+01:00</published><updated>2011-12-29T07:31:34.252+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>Git Command Quick Reminder</title><content type='html'>&lt;b&gt;INSTALLING GIT&lt;/b&gt;&lt;br&gt;&lt;code&gt;$ aptitude install git-core&lt;/code&gt;  # &lt;b&gt;git basic tools&lt;/b&gt;.&lt;br&gt;&lt;br&gt;&lt;b&gt;gitk&lt;/b&gt; graphic tool.&lt;br&gt;&lt;code&gt;$ aptitude install gitk&lt;/code&gt;  # this graphic tool allows us to browse a git repo.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;INITIALIZE A REPOSITORY&lt;/b&gt;&lt;br&gt;&lt;br&gt;&lt;code&gt;$ git init&lt;/code&gt;  # &lt;b&gt;Creates an empty repository&lt;/b&gt; in current directory, or reinitializes an existing one.&lt;br&gt;&lt;code&gt;$ git init directory_name&lt;/code&gt;  # Creates an empty repo in directory_name directory.&lt;br&gt;&lt;br&gt;&lt;code&gt;$ git clone remote_url&lt;/code&gt;  # &lt;b&gt;clone a&lt;/b&gt; remote &lt;b&gt;repo&lt;/b&gt;. Passing as argument a local directory this command clones a local repo.&lt;br&gt;&lt;br&gt;&lt;code&gt;$ git clone source_repo dest_repo&lt;/code&gt;  # clones a local repository source_repo in another local repository dest_repo,&lt;br&gt;if both are directories.&lt;br&gt;&lt;code&gt;$ git clone file:///path/to/source/repo file:///path/to/dest/repo&lt;/code&gt;  # another way to specify local directories.&lt;br&gt;This way we are sure git does not use hard links when cloning source repo.&lt;br&gt;&lt;code&gt;$ git clone --no-hardlinks source_local_repo dest_local_repo&lt;/code&gt;  # clone a repository and copy object files instead of using hardlinks for local repo objects.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;GIT SVN&lt;/b&gt;&lt;br&gt;&lt;a href="http://linuxclues.blogspot.com/2011/12/git-command-quick-reminder.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-2528518500110176461?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/2528518500110176461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=2528518500110176461' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/2528518500110176461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/2528518500110176461'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2011/12/git-command-quick-reminder.html' title='Git Command Quick Reminder'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-2321217294086345690</id><published>2011-08-04T05:24:00.005+02:00</published><updated>2011-10-01T18:09:09.172+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lisp'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>My .emacs configuration file</title><content type='html'>This post describes my .emacs configuration file.&lt;br&gt;&lt;br&gt;&lt;b&gt;.emacs&lt;/b&gt; configuration file is loaded by emacs editor when it starts.&lt;br&gt;&lt;br&gt;Let&amp;#39;s divide the &lt;b&gt;.emacs&lt;/b&gt; configuration file into parts to describe it better:&lt;br&gt;&lt;br&gt;&lt;b&gt;Customized variables&lt;/b&gt;&lt;br&gt;Install user customizations of variable values specified in arguments.&lt;br&gt;&lt;pre&gt;(custom-set-variables&lt;br /&gt;  ;; custom-set-variables was added by Custom.&lt;br /&gt;  ;; If you edit it by hand, you could mess it up, so be careful.&lt;br /&gt;  ;; Your init file should contain only one such instance.&lt;br /&gt;  ;; If there is more than one, they won&amp;#39;t work right.&lt;br /&gt; &amp;#39;(column-number-mode t)&lt;br /&gt; &amp;#39;(desktop-save-mode t)&lt;br /&gt; &amp;#39;(display-battery-mode t)&lt;br /&gt; &amp;#39;(display-time-24hr-format t)&lt;br /&gt; &amp;#39;(display-time-day-and-date nil)&lt;br /&gt; &amp;#39;(display-time-mode t)&lt;br /&gt; &amp;#39;(fringe-mode 0 nil (fringe))&lt;br /&gt; &amp;#39;(menu-bar-mode nil)&lt;br /&gt; &amp;#39;(network-speed-format-string &amp;quot; [%NI %AX %AB] &amp;quot;)&lt;br /&gt;;; &amp;#39;(network-speed-interface-list (list &amp;quot;eth0&amp;quot; &amp;quot;eth1&amp;quot;))&lt;br /&gt; &amp;#39;(network-speed-interface-list (list &amp;quot;eth1&amp;quot;))&lt;br /&gt; &amp;#39;(network-speed-precision 1)&lt;br /&gt; &amp;#39;(network-speed-update-interval 2)&lt;br /&gt;;; &amp;#39;(org-agenda-files (quote (&amp;quot;~/org/task_list.org&amp;quot;)))&lt;br /&gt; &amp;#39;(scroll-bar-mode nil)&lt;br /&gt; &amp;#39;(size-indication-mode t)&lt;br /&gt; &amp;#39;(tool-bar-mode nil)&lt;br /&gt; &amp;#39;(tooltip-mode nil)&lt;br /&gt; &amp;#39;(w3m-session-load-last-sessions t))&lt;br /&gt;&lt;/pre&gt;&lt;a href="http://linuxclues.blogspot.com/2011/08/my-emacs-configuration-file.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-2321217294086345690?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/2321217294086345690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=2321217294086345690' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/2321217294086345690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/2321217294086345690'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2011/08/my-emacs-configuration-file.html' title='My &lt;b&gt;.emacs&lt;/b&gt; configuration file'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-5087623819026045453</id><published>2011-07-20T19:57:00.001+02:00</published><updated>2011-07-20T19:58:22.334+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='primes'/><title type='text'>Calculate Prime Numbers using an ARDUINO Board</title><content type='html'>Following example uses an &lt;b&gt;Arduino board to calculate a prime number list&lt;/b&gt;, starting from one.&lt;br /&gt;It shows the result using serial port communication.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;BUILDING AND RUNNING THE CODE&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You should copy this code into your Arduino IDE window, compile it (C-R), upload the code into the board (C-U) and to see the result open the serial monitor (C-Shift-M).&lt;br /&gt;&lt;br /&gt;If everything goes fine your serial monitor will show a prime on each line every time it is calculated. Maximum prime able to be calculated depends on long type maximum value.  &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;long number = 3;&lt;br /&gt;&lt;br /&gt;void setup()&lt;br /&gt;{&lt;br /&gt;  Serial.begin(9600);&lt;br /&gt;  Serial.println("#");&lt;br /&gt;  Serial.println("1");&lt;br /&gt;  Serial.println("2");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void loop()&lt;br /&gt;{&lt;br /&gt;  int is_prime = 1;&lt;br /&gt;  long i = 3;&lt;br /&gt;  long top = sqrt(number);&lt;br /&gt;  while (i&amp;lt;top)&lt;br /&gt;  {&lt;br /&gt;    if (number%i == 0)&lt;br /&gt;    {&lt;br /&gt;      is_prime = 0;&lt;br /&gt;      break;&lt;br /&gt;    }&lt;br /&gt;    i++;&lt;br /&gt;  }&lt;br /&gt;  if (is_prime)&lt;br /&gt;  {&lt;br /&gt;    Serial.println(number,DEC);&lt;br /&gt;  }&lt;br /&gt;  number += 2;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Within setup function, it shows 1 and 2 primes. It then starts calculating in the main loop using number 3.&lt;br /&gt;&lt;br /&gt;Primality test here consists on performing divisions and checking the remainder. It is not needed to test with every divisor, when square root is reached we know it is a prime.&lt;br /&gt;&lt;br /&gt;When a prime number is found it is sent over serial line.&lt;br /&gt;&lt;br /&gt;As we start calculations with number three, we can skip all even numbers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-5087623819026045453?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/5087623819026045453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=5087623819026045453' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/5087623819026045453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/5087623819026045453'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2011/07/arduino-calculate-prime-numbers.html' title='Calculate Prime Numbers using an ARDUINO Board'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-6590756990494981257</id><published>2011-07-06T19:32:00.003+02:00</published><updated>2011-10-01T18:14:35.518+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><title type='text'>Install and run a program in Arduino using 64 bits Ubuntu (lucid) distro</title><content type='html'>From &lt;a href="http://www.arduino.cc/"&gt;Arduino home page&lt;/a&gt;:&lt;br&gt;&lt;b&gt;Arduino is an open-source electronics prototyping platform&lt;/b&gt; based on flexible, easy-to-use hardware and software. &lt;br&gt;&lt;br&gt;Arduino provides a Java based IDE and examples are written in C language: &lt;a href="http://arduino.cc/en/Reference/HomePage"&gt;http://arduino.cc/en/Reference/HomePage&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;MY SYSTEM&lt;/b&gt; consists on:&lt;br&gt;&lt;br&gt;&lt;b&gt;Arduino Duemilanove&lt;/b&gt;: An ATmega328 running at 16 MHz with auto-reset. It connects to the computer using a USB cable.&lt;br&gt;&lt;br&gt;&lt;b&gt;Ubuntu&lt;/b&gt; distro:&lt;br&gt;Release: 10.04&lt;br&gt;Codename: &lt;b&gt;lucid&lt;/b&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;Linux kernel&lt;/b&gt;&lt;br&gt;2.6.32-32-generic&lt;br&gt;&lt;b&gt;x86_64&lt;/b&gt; AMD 64 bits architecture.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;INSTALLING ARDUINO IDE SOFTWARE&lt;/b&gt;&lt;br&gt;&lt;br&gt;First we install needed &lt;b&gt;dependencies&lt;/b&gt;:&lt;br&gt;&lt;ul&gt;&lt;li&gt;openjdk-6-jre&lt;/li&gt;&lt;li&gt;avr-gcc (aka &amp;quot;gcc-avr&amp;quot;)&lt;/li&gt;version 4.3.2 or later 4.3.x version (4.4.x and 4.5.x seem to have various problems)&lt;li&gt;avr-libc &lt;/li&gt;&lt;/ul&gt;&lt;br&gt;&lt;b&gt;NOTE&lt;/b&gt;: On the contrary to what Arduino page said, I did not need avr-gcc-c++.&lt;br&gt;&lt;br&gt;&lt;code&gt;$ sudo aptitude install openjdk-6-jre gcc-avr avr-libc&lt;/code&gt;&lt;br&gt;&lt;b&gt;NOTE&lt;/b&gt;: gcc-avr version is 4.3.4 in my system&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;DOWNLOADING ARDUINO IDE&lt;/b&gt;&lt;br&gt;&lt;a href="http://linuxclues.blogspot.com/2011/07/arduino-duemilanuove-ubuntu-lucid.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-6590756990494981257?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/6590756990494981257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=6590756990494981257' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6590756990494981257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6590756990494981257'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2011/07/arduino-duemilanuove-ubuntu-lucid.html' title='Install and run a program in &lt;b&gt;Arduino&lt;/b&gt; using &lt;b&gt;64 bits Ubuntu&lt;/b&gt; (lucid) distro'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-8292113173942066131</id><published>2011-04-25T19:31:00.005+02:00</published><updated>2011-10-01T18:15:26.224+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lisp'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>Installing and Configuring ANYTHING.EL for Emacs</title><content type='html'>&lt;b&gt;anything.el&lt;/b&gt; is an application framework written by TamasPatrovics (current maintainer is rubikitch). &lt;br&gt;It provides a better way to &lt;b&gt;choose between alternatives when typing a command, switching buffers, searching for help, files, etc.&lt;/b&gt;&lt;br&gt;After you select a candidate option from the list anything provides, you can &lt;b&gt;choose between several actions&lt;/b&gt;.&lt;br&gt;&lt;br&gt;&lt;b&gt; DOWNLOAD ANYTHING&lt;/b&gt;&lt;br&gt;We are going to download anything from its source code repository.&lt;br&gt;&lt;code&gt; $ cd ~/.emacs.d&lt;/code&gt;&lt;br&gt;&lt;code&gt; $ git clone git://repo.or.cz/anything-config.git&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;CONFIGURE .emacs FILE&lt;/b&gt;&lt;br&gt;&lt;pre&gt;;; Anything.el&lt;br /&gt;(add-to-list &amp;#39;load-path &amp;quot;~/.emacs.d/anything-config/&amp;quot;)&lt;br /&gt;(add-to-list &amp;#39;load-path &amp;quot;~/.emacs.d/anything-config/extensions/&amp;quot;)&lt;br /&gt;(require &amp;#39;anything-startup)&lt;br /&gt;&lt;/pre&gt;&lt;br&gt;That it is enough for using anything:&lt;br&gt;e.g: &lt;code&gt;M-x anything&lt;/code&gt;&lt;br&gt;&lt;br&gt;Also common functions like switch-to-buffer are automatically remapped to anything ones.&lt;br&gt;&lt;br&gt;&lt;br&gt;However you could also &lt;b&gt;customize your anything buffers&lt;/b&gt;, selecting the &lt;b&gt;anything sources&lt;/b&gt; you want:&lt;br&gt;&lt;a href="http://linuxclues.blogspot.com/2011/04/anything-emacs-configuring.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-8292113173942066131?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/8292113173942066131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=8292113173942066131' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/8292113173942066131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/8292113173942066131'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2011/04/anything-emacs-configuring.html' title='Installing and Configuring ANYTHING.EL for Emacs'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-6122774826983543143</id><published>2011-03-19T19:05:00.009+01:00</published><updated>2011-10-01T18:18:07.163+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='irc bot'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Simple Python IRC Bot</title><content type='html'>This article shows the &lt;b&gt;code&lt;/b&gt; of a simple &lt;b&gt;python irc bot&lt;/b&gt;.&lt;br&gt;&lt;br&gt;To run it, you should create a file, e.g: pybot.py, copy following code in it, and exec:&lt;br&gt;&lt;code&gt;$ python pybot.py&lt;/code&gt;&lt;br&gt;&lt;br&gt;other way to run it:&lt;br&gt;&lt;code&gt;$ chmod a+x pybot.py&lt;/code&gt;&lt;br&gt;&lt;code&gt;$ ./pybot.py&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;BOT SOURCE CODE&lt;/b&gt;&lt;br&gt;&lt;a href="http://linuxclues.blogspot.com/2011/03/simple-python-irc-bot.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-6122774826983543143?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/6122774826983543143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=6122774826983543143' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6122774826983543143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6122774826983543143'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2011/03/simple-python-irc-bot.html' title='Simple Python IRC Bot'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-3317107634470468912</id><published>2011-01-27T03:09:00.004+01:00</published><updated>2011-01-27T18:05:09.190+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='primes'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Calculate prime numbers using PHP</title><content type='html'>Simply create a file named &lt;b&gt;primeNumberCalculator.php&lt;/b&gt;. Copy following text in it. &lt;br /&gt;&lt;br /&gt;You need a web server supporting php scripting.&lt;br /&gt;Place the file where your http web server see it. e.g: /var/www&lt;br /&gt;&lt;br /&gt;Open the file in a web browser. e.g: &lt;b&gt;http://localhost/primeNumberCalculator.php&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;html&gt;&lt;br /&gt;&amp;lt;body&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;h2&gt;PHP Prime number calculator&amp;lt;/h2&gt;&lt;br /&gt;&amp;lt;form name="input" action="primeNumberCalculator.php" method="get"&gt;&lt;br /&gt;How many primes?: &amp;lt;input type="text" name="count" /&gt;&lt;br /&gt;&amp;lt;input type="submit" value="Submit" /&gt;&lt;br /&gt;&amp;lt;/form&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;// How many prime numbers are we going to calculate:&lt;br /&gt;$count=$_GET["count"];&lt;br /&gt;if ($count == "") {&lt;br /&gt;   $count = 10;  // Default value&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// We show the first prime number:&lt;br /&gt;$prime_array=array("2");&lt;br /&gt;echo $prime_array[0];&lt;br /&gt;echo " ";&lt;br /&gt;&lt;br /&gt;$total=1; // prime number array length.&lt;br /&gt;$number = 3; // current number we are going to test for primality.&lt;br /&gt;&lt;br /&gt;$i=1; // We start with 1 because first prime is already printed.&lt;br /&gt;while ( $i&lt;$count ) {&lt;br /&gt;   $index=0;&lt;br /&gt;   $is_prime="true";&lt;br /&gt;   $max = floor(sqrt($number));&lt;br /&gt;   $n = $prime_array[$index];&lt;br /&gt;   while(($n &amp;lt;= $max) &amp;&amp; ($is_prime == "true")) {&lt;br /&gt;      if (($number % $n) == 0) {&lt;br /&gt;         $is_prime="false";&lt;br /&gt;      }&lt;br /&gt;      $index++;&lt;br /&gt;      $n = $prime_array[$index];&lt;br /&gt;   }&lt;br /&gt;   if ($is_prime=="true") {&lt;br /&gt;      echo " " . $number;&lt;br /&gt;      $prime_array[$total] = $number;&lt;br /&gt;      $total++;&lt;br /&gt;      $i++;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   $number += 2;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;?&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&gt;&lt;br /&gt;&amp;lt;/html&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/1810057280041377847-3317107634470468912?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/3317107634470468912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=3317107634470468912' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/3317107634470468912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/3317107634470468912'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2011/01/php-calculate-prime-numbers.html' title='Calculate prime numbers using PHP'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-1127894614624124297</id><published>2011-01-12T21:43:00.005+01:00</published><updated>2011-10-01T18:32:06.802+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='primes'/><title type='text'>Calculate a PRIME NUMBER list using JAVA</title><content type='html'>This article shows how to write, compile, build and execute a program that &lt;b&gt;calculates&lt;/b&gt; a list containing the &lt;b&gt;first prime numbers&lt;/b&gt; using &lt;b&gt;Java&lt;/b&gt; language.&lt;br&gt;&lt;br&gt;We are going to &lt;b&gt;create a source code file&lt;/b&gt; named &lt;b&gt;CalculatePrimeNumbers.java&lt;/b&gt;&lt;br&gt;Then we copy/paste next programm in that file.&lt;br&gt;&lt;br&gt;&lt;b&gt;NOTE:&lt;/b&gt; Name is important, because in Java language file name has to match the class it contains.&lt;br&gt;&lt;br&gt;&lt;pre&gt;import java.util.ArrayList;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * Description of CalculatePrimeNumbers class.&lt;br /&gt; */&lt;br /&gt;public class CalculatePrimeNumbers {&lt;br /&gt;&lt;br /&gt;    // By default it shows 50 first prime numbers.&lt;br /&gt;    private static final int MAX_PRIMES = 50;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * @param args the command line arguments&lt;br /&gt;     * This function accepts zero or one arguments.&lt;br /&gt;     * When called with no arguments it shows 50 first prime numbers.&lt;br /&gt;     * If we specify a number, it shows that a prime number array with that specified length.&lt;br /&gt;     */&lt;br /&gt;    public static void main(String[] args) {&lt;br /&gt;        int top;&lt;br /&gt;&lt;br /&gt; // Parse command line arguments.&lt;br /&gt;        switch(args.length){&lt;br /&gt;            case 0:&lt;br /&gt;                top = MAX_PRIMES;&lt;br /&gt;                break;&lt;br /&gt;            case 1:&lt;br /&gt;                top = Integer.parseInt(args[0]);&lt;br /&gt;                break;&lt;br /&gt;            default:&lt;br /&gt;                System.err.println(&amp;quot;ERROR: TOO MANY ARGUMENTS.&amp;quot;);&lt;br /&gt;                return;&lt;br /&gt;        }&lt;br /&gt;        System.out.println(&amp;quot;We are going to calculate &amp;quot; + top + &amp;quot; first prime numbers.&amp;quot;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; ArrayList&amp;lt;long&amp;gt; primes = new ArrayList&amp;lt;long&amp;gt;();&lt;br /&gt;        primes.add(2L); // 2 is the first prime number we get.&lt;br /&gt; long index = 3; // Calculations start for number 3.&lt;br /&gt;&lt;br /&gt;        System.out.println(&amp;quot;Prime number list:&amp;quot;);&lt;br /&gt;        System.out.print(2 + &amp;quot; &amp;quot;);&lt;br /&gt;        while (primes.size() &amp;lt; top) {&lt;br /&gt;            boolean isPrime = true;&lt;br /&gt;&lt;br /&gt;     for(long n:primes) {&lt;br /&gt;                if ((index % n) == 0) {&lt;br /&gt;                    isPrime = false;&lt;br /&gt;                    break;&lt;br /&gt;                }&lt;br /&gt;            } // End for.&lt;br /&gt;&lt;br /&gt;            if (isPrime) {&lt;br /&gt;                // index stores a prime number.&lt;br /&gt;                primes.add(index);&lt;br /&gt;                System.out.print(index + &amp;quot; &amp;quot;);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            index++;&lt;br /&gt;        } // End while.&lt;br /&gt;       &lt;br /&gt;    } // End main.&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;b&gt;Java is a programming language&lt;/b&gt; that is compiled into &lt;b&gt;bytecodes&lt;/b&gt;.&lt;br&gt;&lt;a href="http://linuxclues.blogspot.com/2011/01/calculate-prime-numbers-java.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-1127894614624124297?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/1127894614624124297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=1127894614624124297' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1127894614624124297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1127894614624124297'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2011/01/calculate-prime-numbers-java.html' title='Calculate a PRIME NUMBER list using JAVA'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-1069165351972220043</id><published>2010-08-25T19:17:00.003+02:00</published><updated>2011-10-01T18:34:21.581+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hello world'/><category scheme='http://www.blogger.com/atom/ns#' term='Qt library'/><title type='text'>Beginning with Qt: Introduction, Installing Qt Framework, Qt Hello world</title><content type='html'>&lt;b&gt;INTRODUCTION TO Qt&lt;/b&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;Qt&lt;/b&gt; is a complete &lt;b&gt;development environment&lt;/b&gt; widely used to &lt;b&gt;create GUI applications&lt;/b&gt;. &lt;br&gt;&lt;br&gt;This cross-platform tool is also able to create non gui apps.&lt;br&gt;&lt;br&gt;Qt is used in the KDE desktop environment, and in other projects like virtualbox.&lt;br&gt;&lt;br&gt;&lt;br&gt;Qt development environment provides: (version numbers when this article was written)&lt;br&gt;&lt;ul&gt;&lt;li&gt;Qt libraries (version 4.6.3)&lt;/li&gt;&lt;li&gt;Qt Creator IDE (version 2.0.0)&lt;/li&gt;&lt;li&gt;Qt development tools&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;&lt;br&gt;Qt is available under &lt;b&gt;LGPL and GPL&lt;/b&gt; free software &lt;b&gt;licenses&lt;/b&gt;. Nokia also provides the Qt commercial license to develop proprietary software.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;Qt DEVELOPMENT TOOLS&lt;/b&gt;&lt;br&gt;&lt;br&gt;Qt environment provides us with some development tools. e.g:&lt;br&gt;&lt;br&gt;&lt;b&gt;qmake&lt;/b&gt;&lt;br&gt;qmake tool helps us creating and managing .pro project files, and from them it creates Makefile files needed to build our projects.&lt;br&gt;&lt;a href="http://doc.trolltech.com/4.6/qmake-manual.html"&gt;qmake Manual&lt;/a&gt;&lt;br&gt;&lt;a href="http://doc.trolltech.com/4.6/qmake-tutorial.html"&gt;qmake Tutorial&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;Qt assistant&lt;/b&gt;&lt;br&gt;Qt assistant tool shows all available Qt help. It is a help browsing system.&lt;br&gt;&lt;a href="http://doc.trolltech.com/4.6/assistant-manual.html#qt-assistant"&gt;Qt Assistant Manual&lt;/a&gt;&lt;br&gt;&lt;a href="http://linuxclues.blogspot.com/2010/08/qt-library-introduction-hello-world.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-1069165351972220043?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/1069165351972220043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=1069165351972220043' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1069165351972220043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1069165351972220043'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2010/08/qt-library-introduction-hello-world.html' title='Beginning with Qt: Introduction, Installing Qt Framework, Qt Hello world'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-2379410814258866321</id><published>2010-06-26T20:20:00.008+02:00</published><updated>2010-06-26T20:38:36.083+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='repository'/><title type='text'>Creating a TRIVIAL DEBIAN REPOSITORY</title><content type='html'>This howto shows the way to create a trivial debian repository. Just a simple collection of deb package files.&lt;br /&gt;&lt;br /&gt;There are two debian repository types: &lt;b&gt;automatic&lt;/b&gt; and &lt;b&gt;trivial&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Automatic repos are more complex. We are going to deal with trivial ones.&lt;br /&gt;&lt;br /&gt;A &lt;b&gt;trivial&lt;/b&gt; repository is composed of a &lt;b&gt;root directory and one or more subdirectories&lt;/b&gt;. &lt;br /&gt;&lt;b&gt;No database server&lt;/b&gt; is needed.&lt;br /&gt; &lt;br /&gt;This trivial repository is good enough to host a few packages, e.g creating a repo with your /var/cache/apt/archives deb packages and burn a cd or store them in a removible drive.&lt;br /&gt;&lt;br /&gt;Trivial repos do not follow the standard debian repo directory structure, so we will have to &lt;b&gt;specify the exact path in sources.list file&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CREATING MY TRIVIAL REPO STRUCTURE:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Our repo will consist of &lt;b&gt;MyRepo root directory&lt;/b&gt; with &lt;b&gt;binary subdirectory&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$mkdir -p /path/to/MyRepo&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$cd /path/to/MyRepo&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$mkdir binary&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We place there the deb packages our repo will provide.&lt;br /&gt;I.e: we copy packages from the apt cache:&lt;br /&gt;&lt;code&gt;$rsync -vP /var/cache/apt/archives/*.deb /path/to/MyRepo/binary&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$cd ..&lt;/code&gt; # we move to repo root directory.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CREATE PACKAGES CONFIGURATION FILE&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now we create Packages configuration file and place it in binary directory:&lt;br /&gt;&lt;code&gt;dpkg-scanpackages -m binary /dev/null &gt; binary/Packages&lt;/code&gt; # &lt;b&gt;-m&lt;/b&gt; option indicates it should include all found packages not only the latest version one.&lt;br /&gt;&lt;br /&gt;Packages file shows a package name list with dependency data, checksums, etc...&lt;br /&gt;&lt;br /&gt;We can compress it with gzip if it occupies a lot of size.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;cd binary; gzip Packages&lt;/code&gt; # Packages.gz file will be created.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;UPDATE YOUR sources.list FILE:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Add this line in /etc/apt/sources.list file &lt;b&gt;(trailing slash is necessary for trivial repos)&lt;/b&gt;&lt;br /&gt;&lt;b&gt;deb file:///path/to/MyRepo binary/&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If there would be the root directory only and no subdir: &lt;b&gt;deb file:///path/to/MyRepo ./&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;UPDATE THE APT DATA BASE&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#aptitude update&lt;/code&gt;  or  &lt;code&gt;#apt-get update&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now we can install whatever package from our repo.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CAVEATS&lt;/b&gt;&lt;br /&gt;Trivial repositories do not deal with architectures&lt;br /&gt;&lt;br /&gt;They do not use a pool directory.&lt;br /&gt;&lt;br /&gt;If we want to add new packages we have to repeat the whole process and generate a new Packages file.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;REFERENCE:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://wiki.debian.org/HowToSetupADebianRepository"&gt;http://wiki.debian.org/HowToSetupADebianRepository&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.debian.org/doc/manuals/repository-howto/repository-howto.en.html"&gt;http://www.debian.org/doc/manuals/repository-howto/repository-howto.en.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$man dpkg-scanpackages&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-2379410814258866321?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/2379410814258866321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=2379410814258866321' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/2379410814258866321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/2379410814258866321'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2010/06/create-trivial-debian-repository.html' title='Creating a TRIVIAL DEBIAN REPOSITORY'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-1027926879481953665</id><published>2010-05-02T01:06:00.005+02:00</published><updated>2010-05-03T15:31:56.051+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclair'/><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Howto BUILD the LINUX KERNEL for the ANDROID EMULATOR (Eclair version)</title><content type='html'>&lt;b&gt;DOWNLOAD THE KERNEL SOURCE CODE&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;First we download the kernel source code from &lt;a href="http://android.git.kernel.org"&gt;&lt;b&gt;http://android.git.kernel.org&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Within that page there are kernels for other platforms too. We choose to download &lt;b&gt;kernel/common project&lt;/b&gt; from there.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$git clone git://android.git.kernel.org/kernel/common&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We check which branch we have downloaded:&lt;br /&gt;&lt;code&gt;$git branch&lt;/code&gt;  &lt;br /&gt;it shows * android-2.6.27, not the one we are searching for:&lt;br /&gt;&lt;br /&gt;To &lt;b&gt;list&lt;/b&gt; all &lt;b&gt;remote&lt;/b&gt; available &lt;b&gt;branches&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;$git branch -r&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;  origin/HEAD -&gt; origin/android-2.6.27&lt;br /&gt;  origin/android-2.6.25&lt;br /&gt;  origin/android-2.6.27&lt;br /&gt;  origin/android-2.6.29&lt;br /&gt;  origin/android-2.6.32&lt;br /&gt;  origin/android-goldfish-2.6.27&lt;br /&gt;  origin/android-goldfish-2.6.29&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://groups.google.com/group/android-kernel/browse_thread/thread/3384a35ee954794a"&gt;What does &lt;b&gt;goldfish&lt;/b&gt; mean? (from android-kernel mail list)&lt;/a&gt;&lt;br /&gt;Goldfish is the kernel hacked branch that supports the qemu based arm emulator for android, so it is the one we need.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Download GOLDFISH kernel version&lt;/b&gt;&lt;br /&gt;&lt;code&gt;$git checkout --track -b android-goldfish-2.6.29 origin/android-goldfish-2.6.29&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$git branch&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;    android-2.6.27&lt;br /&gt;  * android-goldfish-2.6.29&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;RUNNING THE EMULATOR&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Within this link we will find how to get the android emulator, and launch it.&lt;br /&gt;&lt;a href="http://linuxclues.blogspot.com/2010/04/building-android-debian-sid.html"&gt;Building Android in Debian Sid&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Showing the kernel version running in the emulator&lt;/b&gt;&lt;br /&gt;&lt;code&gt;$adb shell&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#cat /proc/version&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;Linux version 2.6.29-00261-g0097074 (digit@digit.mtv.corp.google.com) (gcc version 4.4.0 (GCC) ) #14 Tue Feb 2 15:49:02 PST 2010&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;OBTAINING KERNEL CONFIGURATION&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We are going to &lt;b&gt;obtain&lt;/b&gt; the kernel configuration &lt;b&gt;.config&lt;/b&gt; file &lt;b&gt;from&lt;/b&gt; within &lt;b&gt;our running emulator&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$cd common&lt;/code&gt; # we enter in the kernel source directory.&lt;br /&gt;&lt;code&gt;$adb pull /proc/config.gz .&lt;/code&gt; # get compressed .config file from the emulator.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$gunzip config.gz&lt;/code&gt; # uncompress it.&lt;br /&gt;&lt;code&gt;$cp config .config&lt;/code&gt; # rename it into .config&lt;br /&gt;&lt;br /&gt;Now you can edit .config file the way it suits you the most.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;BUILDING AND COMPILING THE KERNEL&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CROSS_COMPILE&lt;/b&gt; environment variable stores the path to the &lt;b&gt;arm cross compiling toolchain&lt;/b&gt;. I use the one which comes with android source code.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$ARCH=arm CROSS_COMPILE=/path/to/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Executing &lt;b&gt;make&lt;/b&gt; will build the kernel.&lt;br /&gt;&lt;br /&gt;Last lines will show:&lt;br /&gt;&lt;pre&gt;  Kernel: arch/arm/boot/Image is ready&lt;br /&gt;  Kernel: arch/arm/boot/zImage is ready&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So we have obtained &lt;b&gt;Image&lt;/b&gt; and &lt;b&gt;zImage&lt;/b&gt; kernel binary files.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;RUN THE EMULATOR USING THE NEW COMPILED KERNEL IMAGE&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We need &lt;b&gt;-kernel&lt;/b&gt; option:&lt;br /&gt;&lt;code&gt;$emulator &lt;b&gt;-kernel /path/to/common/arch/arm/boot/zImage&lt;/b&gt;  -show-kernel -verbose&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We can check now the kernel version:&lt;br /&gt;&lt;code&gt;$adb shell&lt;/code&gt;&lt;br /&gt;&lt;code&gt;# cat /proc/version&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;Linux version 2.6.29-00262-gb0d93fb (user@myPC) (gcc version 4.4.0 (GCC) ) #1 Sun May 2 14:27:31 CEST 2010&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If we do not specify kernel option it usually uses the prebuilt one:&lt;br /&gt;&lt;code&gt;$emulator -show-kernel -verbose&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;emulator: argv[01] = "-kernel"&lt;br /&gt;emulator: argv[02] = "/path/to/mydroid/prebuilt/android-arm/kernel/kernel-qemu"&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ACTIVATING MODULE LOADING SUPPORT IN THE KERNEL&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Module loading support is previously disabled in the kernel, if we want to load modules in the kernel we have to enable it:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;edit .config &lt;/b&gt;file and set: &lt;br /&gt;&lt;b&gt;CONFIG_MODULES=y&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$ ARCH=arm CROSS_COMPILE=/path/to/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I am asked about some options when executing make. I ask yes for module related options.&lt;br /&gt;&lt;br /&gt;After compiling I see several modules have been built.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;MODPOST 6 modules&lt;br /&gt;  CC      drivers/video/fb_sys_fops.mod.o&lt;br /&gt;  LD [M]  drivers/video/fb_sys_fops.ko&lt;br /&gt;  CC      drivers/video/syscopyarea.mod.o&lt;br /&gt;  LD [M]  drivers/video/syscopyarea.ko&lt;br /&gt;  CC      drivers/video/sysfillrect.mod.o&lt;br /&gt;  LD [M]  drivers/video/sysfillrect.ko&lt;br /&gt;  CC      drivers/video/sysimgblt.mod.o&lt;br /&gt;  LD [M]  drivers/video/sysimgblt.ko&lt;br /&gt;  CC      drivers/video/vfb.mod.o&lt;br /&gt;  LD [M]  drivers/video/vfb.ko&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;We can &lt;b&gt;upload&lt;/b&gt; the &lt;b&gt;modules&lt;/b&gt; in the emulator &lt;b&gt;and install them&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;$adb push drivers/video/fb_sys_fops.ko /data&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$adb shell&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#insmod /data/fb_sys_fops.ko&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;REFERENCE&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.cianer.com/androidg1/28-building-android-kernel-images"&gt;http://www.cianer.com/androidg1/28-building-android-kernel-images&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-1027926879481953665?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/1027926879481953665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=1027926879481953665' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1027926879481953665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1027926879481953665'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2010/05/build-compile-linux-kernel-android.html' title='Howto BUILD the LINUX KERNEL for the ANDROID EMULATOR (Eclair version)'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1810057280041377847.post-5773004735774050643</id><published>2010-04-25T23:05:00.008+02:00</published><updated>2010-06-17T15:36:08.752+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Building Android in Debian Sid</title><content type='html'>We are going to &lt;b&gt;build and test Android in Debian Sid on x86 32 bits architecture&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;As a &lt;b&gt;requirement&lt;/b&gt; we need &lt;b&gt;JDK 5.0&lt;/b&gt;, update 12 or higher.  &lt;b&gt;Java 6 is not supported&lt;/b&gt;, because of incompatibilities with @Override.&lt;br /&gt;&lt;br /&gt;Debian Sid provides all packages we need except this one. We could install from source but instead we are going to install JDK 5.0 from Debian Stable (Lenny) repositories:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ADD DEBIAN STABLE (LENNY) REPOSITORIES&lt;/b&gt;&lt;br /&gt;&lt;code&gt;#echo "deb http://ftp.debian.org/debian/ stable main contrib non-free" &gt;&gt; /etc/apt/sources.list&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#aptitude update&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;sun-java5-jdk&lt;/b&gt; package will now become available.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;INSTALL ALL PACKAGES WE NEED:&lt;/b&gt;&lt;br /&gt;&lt;code&gt;#aptitude install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SELECT THE RIGHT JAVA VERSION:&lt;/b&gt;&lt;br /&gt;&lt;code&gt;$file /etc/alternatives/java* &lt;/code&gt; # To know which alternative files we have to update.&lt;br /&gt;&lt;code&gt;#update-alternatives --config java&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#update-alternatives --config java_vm&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#update-alternatives --config javaws&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We also install valgrind, a tool that will help you find memory leaks, stack corruption, array bounds overflows, etc. &lt;br /&gt;&lt;code&gt;#aptitude install valgrind&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Android projects are stored in Git repositories. Also they have developed a tool called REPO to facilitate working with git repositories.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;INSTALLING REPO&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can install repo tool any place in your path. We choose a bin directory in our home folder:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$cd ~&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$mkdir bin&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$export PATH=$PATH:~/bin&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$curl https://android.git.kernel.org/repo &gt;~/bin/repo&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$chmod a+x ~/bin/repo&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;DOWNLOADING ANDROID SOURCE CODE:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Create an empty directory to hold your working files:&lt;br /&gt;&lt;code&gt;$mkdir mydroid&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$cd mydroid&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;# Run repo init to bring down the latest version of Android with all its most recent bug fixes. You must specify a URL for the manifest:&lt;br /&gt;&lt;code&gt;$repo init -u git://android.git.kernel.org/platform/manifest.git&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: using &lt;b&gt;-b&lt;/b&gt; option we can choose which android version to install:&lt;br /&gt;&lt;code&gt;$repo init -u git://android.git.kernel.org/platform/manifest.git &lt;b&gt;-b eclair&lt;/b&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To pull down files to your working directory from the repositories as specified in the default manifest, run&lt;br /&gt;&lt;code&gt;$repo sync&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;NOTE: mydroid directory size grows up to 3.6G.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;BUILDING ANDROID&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Simply on top of your android directory execute make command:&lt;br /&gt;&lt;code&gt;$cd mydroid&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$make&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;After some time it will finish.&lt;br /&gt;&lt;br /&gt;We get the installed file list in this file:&lt;br /&gt;&lt;code&gt;out/target/product/generic/installed-files.txt&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Also &lt;b&gt;some images are created&lt;/b&gt; in the same directory: (&lt;b&gt;system.img userdata.img ramdisk.img&lt;/b&gt;)&lt;br /&gt;&lt;pre&gt;mydroid$ ls out/target/product/generic/&lt;br /&gt;android-info.txt  data                 obj                       ramdisk.img  symbols  system.img&lt;br /&gt;clean_steps.mk    installed-files.txt  previous_build_config.mk  root         system   userdata.img&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We have built android source code but now we want to test it:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ANDROID EMULATOR&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We will run the &lt;b&gt;Android Emulator&lt;/b&gt;, which &lt;b&gt;comes within&lt;/b&gt; the &lt;b&gt;Android SDK&lt;/b&gt;&lt;br /&gt;&lt;a href="http://developer.android.com/guide/developing/tools/emulator.html"&gt;http://developer.android.com/guide/developing/tools/emulator.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Download Android SDK&lt;/b&gt;&lt;br /&gt;&lt;a href="http://developer.android.com/sdk/index.html"&gt;http://developer.android.com/sdk/index.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Install Android SDK&lt;/b&gt;&lt;br /&gt;&lt;a href="http://developer.android.com/sdk/installing.html"&gt;http://developer.android.com/sdk/installing.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We &lt;b&gt;untar the sdk and add tools directory into the PATH variable&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;$tar xvzf android-sdk_r05-linux_86.tgz&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$export PATH=$PATH:~/android-sdk-linux_86/tools&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We are not going to create an android virtual device, but instead we will use an &lt;b&gt;environment variable&lt;/b&gt; to &lt;b&gt;indicate where our images are&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;RUNNING ANDROID EMULATOR&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$emulator -help&lt;/code&gt;  # Shows some help.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$export &lt;b&gt;ANDROID_PRODUCT_OUT&lt;/b&gt;=/path/to/mydroid/out/target/product/generic/&lt;/code&gt; # Env variable showing where our images are.&lt;br /&gt;&lt;br /&gt;We create a SD image to simulate a SD card:&lt;br /&gt;&lt;code&gt;$cd mydroid/out/target/product/generic/&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$mksdcard -l SD 100M sdcard.img&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Run the emulator program:&lt;br /&gt;&lt;code&gt;$emulator -verbose&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;if we want more debug information:&lt;br /&gt;&lt;code&gt;$emulator -show-kernel -verbose&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CONNECTING TO THE EMULATOR USING ADB (ANDROID DEBUG BRIDGE) TOOL&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;adb&lt;/b&gt; tool comes within Android SDK.&lt;br /&gt;&lt;br /&gt;In a console we execute:&lt;br /&gt;&lt;code&gt;$adb devices&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;It will show available devices in your system:&lt;br /&gt;&lt;pre&gt;List of devices attached&lt;br /&gt;emulator-5554   device&lt;/pre&gt;&lt;br /&gt;We can now connect to the device:&lt;br /&gt;&lt;code&gt;$adb shell&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;REFERENCE:&lt;/b&gt;&lt;br /&gt;&lt;a href="http://source.android.com/download"&gt;http://source.android.com/download&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-5773004735774050643?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/5773004735774050643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=5773004735774050643' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/5773004735774050643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/5773004735774050643'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2010/04/building-android-debian-sid.html' title='Building Android in Debian Sid'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-4588938366512426444</id><published>2010-03-28T14:07:00.003+02:00</published><updated>2010-03-28T14:13:42.670+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bluetooth'/><category scheme='http://www.blogger.com/atom/ns#' term='sony-ericsson-k530i'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><title type='text'>Connect to Internet using a K530i phone in Debian GNU/Linux via Bluetooth</title><content type='html'>Within this post we are going to explain how to &lt;b&gt;connect to internet&lt;/b&gt; using a Sony Ericsson &lt;b&gt;K530i&lt;/b&gt; mobile phone via &lt;b&gt;bluetooth&lt;/b&gt;, in a &lt;b&gt;Debian Sid&lt;/b&gt; system.&lt;br /&gt;&lt;br /&gt;This previous post explains same process via usb cable: &lt;br /&gt;&lt;a href="http://linuxclues.blogspot.com/2008/08/connect-internet-sony-ericsson-k530i.html"&gt;Connecting to Internet using a Sony Ericsson K530i mobile phone in Ubuntu (Linux) via USB cable.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First step consists on configuring bluetooth settings in our phone.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CONFIGURING OUR K530i PHONE&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Activate bluetooth&lt;/b&gt; in the phone:&lt;br /&gt;Settings -&gt; Connectivity -&gt; Bluetooth -&gt; Turn on&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Set a name&lt;/b&gt; for your phone:&lt;br /&gt;Settings -&gt; Connectivity -&gt; Bluetooth -&gt; Phone name&lt;br /&gt;We select a name for our phone, e.g: my_K530i&lt;br /&gt;&lt;br /&gt;Make your &lt;b&gt;phone visible&lt;/b&gt; to other bluetooth devices:&lt;br /&gt;Settings -&gt; Connectivity -&gt; Bluetooth -&gt; Visibility -&gt; Show phone&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;INSTALLING BLUETOOTH SOFTWARE&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We are going to install the bluetooth sofware we need:&lt;br /&gt;&lt;code&gt;#aptitude install bluez&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Bluez package&lt;/b&gt; provides the &lt;b&gt;tools and system deaemons&lt;/b&gt; we need to deal with &lt;b&gt;bluetooth&lt;/b&gt; devices.&lt;br /&gt;&lt;br /&gt;Right now I am using bluez version 4.60-1&lt;br /&gt; &lt;br /&gt;&lt;a href="http://www.bluez.org"&gt;BlueZ&lt;/a&gt; is the official Linux Bluetooth protocol stack.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CONFIGURING A BLUETOOTH CONNECTION&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now we will set a connection between our computer and the k530i phone.&lt;br /&gt;&lt;br /&gt;List all &lt;b&gt;bluetooth devices in our system&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;$ hciconfig&lt;/code&gt; &lt;br /&gt;hci0:   Type: USB&lt;br /&gt;        BD Address: 00:1F:3A:79:CB:E0 ACL MTU: 1017:8 SCO MTU: 64:8&lt;br /&gt;        UP RUNNING PSCAN &lt;br /&gt;        RX bytes:1059 acl:0 sco:0 events:34 errors:0&lt;br /&gt;        TX bytes:369 acl:0 sco:0 commands:28 errors:0&lt;br /&gt;&lt;br /&gt;So we have a hci0 device up and running in our system.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We &lt;b&gt;scan&lt;/b&gt; for &lt;b&gt;external bluetooth devices&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;$ hcitool scan&lt;/code&gt;&lt;br /&gt;Scanning ...&lt;br /&gt; 00:1E:45:5A:FE:2E my_K530i&lt;br /&gt;&lt;br /&gt;Scan command shows our phone name and mac.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We &lt;b&gt;ping the phone&lt;/b&gt; to test it is alive:&lt;br /&gt;&lt;code&gt;$l2ping 00:1E:45:5A:FE:2E&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Show all available bluetooth services offered by our phone:&lt;br /&gt;&lt;code&gt;$sdptool browse 00:1E:45:5A:FE:2E&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We are interested in &lt;b&gt;Dial-up Networking service&lt;/b&gt; (DUN):&lt;br /&gt;Shows only Dial-up Networking service:&lt;br /&gt;&lt;code&gt;$sdptool search --bdaddr 00:1E:45:5A:FE:2E DUN&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We find which channel DUN service is associated to and will use it in &lt;b&gt;rfcomm.conf&lt;/b&gt; settings. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;EDITING rfcomm.conf CONFIGURATION FILE&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We edit &lt;b&gt;/etc/bluetooth/rfcomm.conf&lt;/b&gt; file:&lt;br /&gt;&lt;pre&gt;#&lt;br /&gt;# RFCOMM configuration file.&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;rfcomm0 {&lt;br /&gt; # Automatically bind the device at startup&lt;br /&gt; bind yes;&lt;br /&gt;&lt;br /&gt; # Bluetooth address of the device&lt;br /&gt; device 00:1E:45:5A:FE:2E;&lt;br /&gt;&lt;br /&gt; # RFCOMM channel for the connection&lt;br /&gt; channel 1;   # In my phone DUN device is associated to channel 1.&lt;br /&gt;&lt;br /&gt; # Description of the connection&lt;br /&gt; comment "K530i link";&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;MAKE EFFECTIVE OUR CHANGES&lt;/b&gt;&lt;br /&gt;&lt;code&gt;#/etc/init.d/bluetooth restart&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;If everything has gone fine, a &lt;b&gt;/dev/rfcomm0 device&lt;/b&gt; will appear.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; If we would want to manually set up /dev/rfcomm0 device these are the commands you need &lt;br /&gt;(&lt;b&gt;You actually do not need them&lt;/b&gt; if you exec: &lt;/code&gt;#/etc/init.d/bluetooth restart&lt;/code&gt;)&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#mknod -m 660 /dev/rfcomm0 c 216 0&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#chown root:dialout /dev/rfcomm0&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#rfcomm bind 0&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;PAIRING OUR BLUETOOTH DEVICES&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;bluetooth-agent&lt;/b&gt; program commes within bluez package. It will help us to pair our bluetooth devices. We execute it in a console. e.g:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$bluetooth-agent 3333&lt;/code&gt;   &lt;br /&gt;# We set 3333 as the needed code to pair the devices. Select a code that suits you.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;DIALING TO OUR 3G PROVIDER&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We will use &lt;b&gt;wvdial&lt;/b&gt; and pppd programs to configure and establish a ppp connection.&lt;br /&gt;&lt;code&gt;#aptitude install wvdial&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Edit &lt;b&gt;~/.wvdialrc&lt;/b&gt; file:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Change this in your .wvdialrc file to suit your phone operator company:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;[Dialer Masmovil]&lt;br /&gt;Phone = *99***1#&lt;br /&gt;Username = "masmovil"&lt;br /&gt;Password = "masmovil"&lt;br /&gt;Modem = /dev/rfcomm0&lt;br /&gt;Baud = 460800&lt;br /&gt;Stupid Mode = 1&lt;br /&gt;Init1 = ATZ&lt;br /&gt;Init3 = ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0&lt;br /&gt;ISDN = 0&lt;br /&gt;Modem Type = Analog Modem&lt;br /&gt;Init5 =AT+CGDCONT=1,"IP","internetmas";&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Execute wvdial&lt;/b&gt; to establish the connection:&lt;br /&gt;&lt;code&gt;$wvdial Masmovil&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;First time the phone will ask us about "an unknown device trying to connect to the phone". We grant permission.&lt;br /&gt;It will then ask us about accessing the phone services: We answer yes.&lt;br /&gt;It asks for the pin: we enter 3333   (same as the bluetooth agent)&lt;br /&gt;&lt;br /&gt;And connection will establish!!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When connected we will be able to see the connection:&lt;br /&gt;&lt;code&gt;$ hcitool con&lt;/code&gt;&lt;br /&gt;Connections:&lt;br /&gt;        &lt; ACL 00:1E:45:5A:FE:2E handle 11 state 1 lm MASTER AUTH ENCRYPT &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;REFERENCE:&lt;/b&gt;&lt;br /&gt;&lt;a href="http://web.inter.nl.net/users/hanscees/bluezhowto.html"&gt;http://web.inter.nl.net/users/hanscees/bluezhowto.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://ornellas.apanela.com/dokuwiki/pub:linux_bluetooth_gprs"&gt;http://ornellas.apanela.com/dokuwiki/pub:linux_bluetooth_gprs&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-4588938366512426444?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/4588938366512426444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=4588938366512426444' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/4588938366512426444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/4588938366512426444'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2010/03/k530i-internet-linux-bluetooth-debian.html' title='Connect to Internet using a K530i phone in Debian GNU/Linux via Bluetooth'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-6044202461192529648</id><published>2010-02-28T19:14:00.022+01:00</published><updated>2010-02-28T20:25:00.728+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gentoo'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='chroot'/><title type='text'>Howto Create a GENTOO Distro CHROOT ENVIRONMENT</title><content type='html'>This article describes how to &lt;b&gt;build a chroot environment for Gentoo&lt;/b&gt; distribution. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; Debian GNU/Linux will be our host system, but these steps should also work for most other Linux based distributions (e.g: Ubuntu).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;DOWNLOAD A SMALL MINIMUM GENTOO SYSTEM&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;First we are going to download a &lt;b&gt;minimal Gentoo system&lt;/b&gt;, called &lt;b&gt;STAGE3&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;We choose our architecture, in my case x86, and i686 specifically.&lt;br /&gt;&lt;a href="http://mirrors.kernel.org/gentoo/releases/x86/autobuilds/current-stage3/"&gt;http://mirrors.kernel.org/gentoo/releases/x86/autobuilds/current-stage3/&lt;/a&gt;&lt;br /&gt;&lt;code&gt;$wget http://mirrors.kernel.org/gentoo/releases/x86/autobuilds/current-stage3/stage3-i686-*.tar.bz2&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;There is a list of &lt;b&gt;mirrors&lt;/b&gt; here: &lt;a href="http://www.gentoo.org/main/en/mirrors.xml"&gt;http://www.gentoo.org/main/en/mirrors.xml&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We could download directly from gentoo page too:&lt;br /&gt;&lt;code&gt;$wget ftp://distfiles.gentoo.org/pub/gentoo/releases/x86/current-stage3/stage3-i686-*.tar.bz2&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;BUILDING OUR GENTOO DIRECTORY&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We create a directory where we will place Gentoo files:&lt;br /&gt;&lt;code&gt;$mkdir gentoo_chroot&lt;/code&gt;&lt;br /&gt;and uncompress there the stage3 archive.&lt;br /&gt;&lt;code&gt;#tar xvjf stage3-i686-20100216.tar.bz2 -C gentoo_chroot/&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Copy &lt;b&gt;resolv.conf&lt;/b&gt; file to resolve names:&lt;br /&gt;&lt;code&gt;#cp -L /etc/resolv.conf gentoo_chroot/etc/resolv.conf&lt;/code&gt;&lt;br /&gt;We will be able to resolve addresses.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Copy &lt;b&gt;/etc/host&lt;/b&gt; file:&lt;br /&gt;&lt;code&gt;#cp /etc/hosts gentoo_chroot/etc/&lt;/code&gt;&lt;br /&gt;or we could create a new one:&lt;br /&gt;e.g: &lt;code&gt;#echo "127.0.0.1 mybox.at.myplace mybox localhost" &gt; gentoo_chroot/etc/hosts&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I like using same hostname as the host one because if we change it in chroot, it also changes in the host.&lt;br /&gt;&lt;br /&gt;When we will enter in the chroot jail we will be able to exec:&lt;br /&gt;&lt;code&gt;#hostname -f&lt;/code&gt;  # shows  mybox.at.myplace. &lt;br /&gt;&lt;code&gt;#ping mybox.at.myplace&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;MOUNTING NEEDED DIRECTORIES&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We use &lt;b&gt;bind option&lt;/b&gt; to duplicate some host directories in the chroot filesystem:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#mount --bind /dev gentoo_chroot/dev&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#mount --bind /proc gentoo_chroot/proc&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#mount --bind /sys gentoo_chroot/sys&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#mount --bind /dev/pts gentoo_chroot/dev/pts&lt;/code&gt;   # &lt;b&gt;Needed for&lt;/b&gt; agetty &lt;b&gt;login&lt;/b&gt; and screen command.&lt;br /&gt;&lt;code&gt;#mount --bind /tmp gentoo_chroot/tmp&lt;/code&gt;   # If we want &lt;b&gt;share X windows&lt;/b&gt; between host and guest.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ENTERING THE CHROOT ENVIRONMENT&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#chroot gentoo_chroot /bin/bash&lt;/code&gt;&lt;br /&gt;We are in the gentoo chroot envirionment!!&lt;br /&gt;Unless told, every command from now on is executed within the chroot env.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To update and &lt;b&gt;configure&lt;/b&gt; some &lt;b&gt;environment variables&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;#env-update&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#source /etc/profile&lt;/code&gt;  # To configure our current shell environment.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CUSTOMIZING YOUR PROMPT&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We can also customize our prompt to show we are in the chroot jail.&lt;br /&gt;&lt;code&gt;#export PS1="(chroot) $PS1"&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;If we want to customize every login prompt we have to change &lt;b&gt;/etc/profile&lt;/b&gt;.&lt;br /&gt;&lt;code&gt;#echo "export PS1=\"(chroot) \$PS1\"" &gt;&gt; /etc/profile&lt;/code&gt;&lt;br /&gt;For non login shells you have to edit &lt;b&gt;.bashrc&lt;/b&gt; file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CREATE /etc/mtab FILE&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#cp /proc/mounts gentoo_chroot/etc/mtab&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Some mtab file lines are useless so we edit them:&lt;br /&gt;&lt;code&gt;#nano -w /etc/mtab&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We leave something like that:&lt;br /&gt;&lt;pre&gt;udev /dev tmpfs rw,relatime,size=10240k,mode=755 0 0&lt;br /&gt;none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0&lt;br /&gt;none /proc proc rw,nosuid,nodev,noexec,relatime 0 0&lt;br /&gt;devpts /dev/pts devpts rw,relatime,mode=600,ptmxmode=000 0 0&lt;/pre&gt;&lt;br /&gt;Now we are able to exec &lt;b&gt;mount&lt;/b&gt; and &lt;b&gt;df&lt;/b&gt; commands.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SETTING THE TIMEZONE&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#ls /usr/share/zoneinfo&lt;/code&gt;   # Shows all available timezones.&lt;br /&gt;&lt;code&gt;#cp /usr/share/zoneinfo/Europe/Madrid /etc/localtime&lt;/code&gt;     # I use Madrid timezone.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CONFIGURE LOCALES&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$cd /etc&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#nano -w locale.gen&lt;/code&gt;&lt;br /&gt;I add: es_ES.UTF-8 UTF-8   # Spanish specific locales, choose the ones which suit you.&lt;br /&gt;&lt;code&gt;#locale-gen&lt;/code&gt;    # we generate locales.&lt;br /&gt;We change locale:&lt;br /&gt;&lt;code&gt;#export LANG=es_ES.UTF-8&lt;/code&gt;&lt;br /&gt;&lt;code&gt;# locale&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CHANGE ROOT PASSWORD&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#passwd root&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;edit &lt;b&gt;/etc/securetty&lt;/b&gt; file&lt;br /&gt;&lt;code&gt;#nano -w /etc/securetty&lt;/code&gt;&lt;br /&gt;Add there all tty where you want to login as root from. e.g: add  pts/5 if you want to login from /dev/pts/5 tty.&lt;br /&gt;Exec &lt;code&gt;$echo $(tty)&lt;/code&gt; in your host to show which tty you are in.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ADDING A NEW USER&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We are going to create an user called new_user:&lt;br /&gt;&lt;code&gt;#useradd -m new_user&lt;/code&gt; # -m option to create home directory.&lt;br /&gt;&lt;code&gt;#passwd new_user&lt;/code&gt;   # change the user password.&lt;br /&gt;&lt;code&gt;#su new_user&lt;/code&gt;     # become that user.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;LOGIN IN ANOTHER WAY&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Entering the chroot environment using the already told way mixes host and guest env variables. &lt;br /&gt;&lt;br /&gt;A better way is &lt;b&gt;using agetty command&lt;/b&gt;, execute in the host system:&lt;br /&gt;&lt;code&gt;#chroot gentoo_chroot/ /sbin/agetty $(tty) 38400&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We can login as root or as the new user we have just created.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; The &lt;b&gt;standard user&lt;/b&gt; wont be able to gain root privileges using &lt;b&gt;su command&lt;/b&gt; unless he pertains to &lt;b&gt;wheel group&lt;/b&gt;, so:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#usermod -a -G wheel new_user&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#su new_user&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$su root&lt;/code&gt;&lt;br /&gt;If not we will get "su: permission denied error".&lt;br /&gt;&lt;br /&gt;Now user new_user can exec su command and become root.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;DOWNLOAD PORTAGE SNAPSHOT&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Portage&lt;/b&gt; is the &lt;b&gt;Gentoo package management system&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;We are going to install portage subsystem because we want to install more gentoo available packages.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#cd /usr&lt;/code&gt; # &lt;b&gt;Portage&lt;/b&gt; is &lt;b&gt;placed in /usr&lt;/b&gt; directory.&lt;br /&gt;&lt;code&gt;#wget http://distfiles.gentoo.org/snapshots/portage-latest.tar.bz2&lt;/code&gt;  # (35 MBytes)&lt;br /&gt;or we could choose download it from a mirror: &lt;a href="http://www.gentoo.org/main/en/mirrors.xml"&gt;http://www.gentoo.org/main/en/mirrors.xml&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Uncompress it:&lt;br /&gt;&lt;code&gt;#tar xvjf portage-latest.tar.bz2&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;EMERGE TOOL&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Emerge&lt;/b&gt; is the command line tool which allow us &lt;b&gt;to search, install, update, remove&lt;/b&gt;, etc &lt;b&gt;gentoo packages&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Install &lt;b&gt;less pager&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;$emerge --search less&lt;/code&gt;&lt;br /&gt;We see: sys-apps/less&lt;br /&gt;&lt;code&gt;#emerge less&lt;/code&gt;   # we install less pager.&lt;br /&gt;less tool is compiled and installed.&lt;br /&gt;&lt;br /&gt;Install &lt;b&gt;screen terminal manager:&lt;/b&gt;&lt;br /&gt;&lt;code&gt;$emerge --color y --search screen | less&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#emerge -v screen&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now we are going to &lt;b&gt;install a text web client:&lt;/b&gt;&lt;br /&gt;Searching into categories. e.g: www-client&lt;br /&gt;&lt;code&gt;$emerge --search @www-client --color y | less&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#emerge -v links&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$links http://linuxclues.blogspot.com&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;My favourite &lt;b&gt;text editor&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;$emerge --color y --search emacs | less&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$emerge --pretend emacs&lt;/code&gt;  # To see what is going to happen without installing anything.&lt;br /&gt;&lt;code&gt;#emerge -v emacs&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#tail -f /var/log/emerge-fetch.log&lt;/code&gt;  # to see package downloading status.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SHARING X BETWEEN HOST AND CHROOT GUEST&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#emerge -v xclock&lt;/code&gt;  # we will use xclock tool to test the X system.&lt;br /&gt;&lt;br /&gt;We need to &lt;b&gt;obtain permissions&lt;/b&gt; and store it in &lt;b&gt;.Xauthority&lt;/b&gt; file.&lt;br /&gt;In the host machine exec:&lt;br /&gt;&lt;code&gt;$xauth list&lt;/code&gt;&lt;br /&gt;we obtain something like:&lt;br /&gt;&lt;pre&gt;mybox/unix:0  MIT-MAGIC-COOKIE-1  5e20455a59909d2f911d73b8d7d8cba5&lt;/pre&gt;&lt;br /&gt;As I am using unix socket X display :0, I copy that line.&lt;br /&gt;&lt;br /&gt;In the chroot env. &lt;br /&gt;&lt;code&gt;#emerge xauth&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#xauth add mybox/unix:0  MIT-MAGIC-COOKIE-1  5e20455a59909d2f911d73b8d7d8cba5&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#DISPLAY=:0.0 xclock&lt;/code&gt;   # we can exec X apps as root.&lt;br /&gt;&lt;code&gt;$xauth add mybox/unix:0  MIT-MAGIC-COOKIE-1  5e20455a59909d2f911d73b8d7d8cba5&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$DISPLAY=:0.0 xclock&lt;/code&gt;   # we can exec X apps as a standard user.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;INSTALLING MPLAYER TO TEST VIDEO AND SOUND&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#emerge -v mplayer&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;After installation it &lt;b&gt;runs&lt;/b&gt; correctly as root, but not as a &lt;b&gt;standard user&lt;/b&gt;. We need to give him &lt;b&gt;audio privileges&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;As I use &lt;b&gt;alsa sound&lt;/b&gt; drivers:&lt;br /&gt;&lt;code&gt;$ls -l /dev/snd&lt;/code&gt;&lt;br /&gt;I see in files owned by group 29 (legacy from host machine)&lt;br /&gt;We &lt;b&gt;edit /etc/group&lt;/b&gt; file and change audio group gid into 29.&lt;br /&gt;&lt;code&gt;#nano -w /etc/group&lt;/code&gt;&lt;br /&gt;audio::29:&lt;br /&gt;&lt;br /&gt;Add the standard user to audio group:&lt;br /&gt;&lt;code&gt;#usermod -a -G audio new_user&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#su new_user&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$mplayer -vo xv -framedrop foo.avi&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;EXITING THE CHROOT JAIL&lt;/b&gt;&lt;br /&gt;Simply type:&lt;br /&gt;&lt;code&gt;$exit&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;UMOUNT&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;After exit we &lt;b&gt;unmount binded directories&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;#umount gentoo_chroot/dev/pts&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#umount gentoo_chroot/dev&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#umount gentoo_chroot/proc&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#umount gentoo_chroot/sys&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#umount gentoo_chroot/tmp&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; when unmounting if it complains about a bind mount busy. You can use mount -M to move it to another place instead. &lt;br /&gt;It is an ugly workaround, I now. :-D&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;REFERENCE:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.gentoo.org/doc/en/gentoo-x86-quickinstall.xml"&gt;Gentoo Quick Install Guide&lt;/a&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Portage_%28software%29"&gt;Portage (Wikipedia)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$man emerge&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.gentoo.org/doc/en/"&gt;Gentoo Documentation&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-6044202461192529648?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/6044202461192529648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=6044202461192529648' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6044202461192529648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6044202461192529648'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2010/02/create-gentoo-chroot-environment.html' title='Howto Create a GENTOO Distro CHROOT ENVIRONMENT'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-1232894247460290219</id><published>2010-01-07T16:40:00.004+01:00</published><updated>2010-01-07T20:44:25.700+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lisp'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>HowTo Show Network Speed in Emacs Mode Line</title><content type='html'>Copy this file as &lt;b&gt;network-speed.el&lt;/b&gt;. Place it where emacs can find it (see load-path variable).&lt;br /&gt;&lt;br /&gt;Configure your .emacs file:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;;; network-speed configuration:&lt;br /&gt;(add-to-list 'load-path "/path/to/network-speed.el")&lt;br /&gt;(require 'network-speed)&lt;br /&gt;(network-speed-start) &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Reload your .emacs file:  &lt;code&gt;M-x load-file RET /path/to/.emacs&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To stop showing network speed in mode line execute:&lt;br /&gt;&lt;code&gt;M-x network-speed-stop&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;;;; network-speed.el --- display network speed information  -*- coding: mule-utf-8 -*-&lt;br /&gt;&lt;br /&gt;;; Copyright (C) 2009 Vicente Hernando Ara&lt;br /&gt;&lt;br /&gt;;; Author: Vicente Hernando Ara &lt;bizenton@gmail.com&gt;&lt;br /&gt;&lt;br /&gt;;; Created: 1 Jan 2010&lt;br /&gt;&lt;br /&gt;;; Keywords: hardware&lt;br /&gt;&lt;br /&gt;;; This file is free software: you can redistribute it and/or modify&lt;br /&gt;;; it under the terms of the GNU General Public License as published by&lt;br /&gt;;; the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;;; (at your option) any later version.&lt;br /&gt;&lt;br /&gt;;; This file is distributed in the hope that it will be useful,&lt;br /&gt;;; but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;;; GNU General Public License for more details.&lt;br /&gt;&lt;br /&gt;;; You should have received a copy of the GNU General Public License&lt;br /&gt;;; along with GNU Emacs.  If not, see &amp;lt;http://www.gnu.org/licenses/&amp;gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;;;; Commentary:&lt;br /&gt;&lt;br /&gt;;; network-speed.el package displays network speed in emacs mode line for the interfaces the user selects.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;;; There are several configurable options:&lt;br /&gt;&lt;br /&gt;;;   network-speed-update_interval: time interval after which speed is calculated.&lt;br /&gt;&lt;br /&gt;;;   network-speed-interface-list: list containing all network interfaces we want to show data about.&lt;br /&gt;&lt;br /&gt;;;   network-speed-precision: every floating point number will show this number of figures after decimal point.&lt;br /&gt;&lt;br /&gt;;;   network-speed-format-string: customizable string to be shown in the mode line.&lt;br /&gt;;;   There are several scape strings which will be sustituted by data.&lt;br /&gt;;;     %NI == network interface&lt;br /&gt;;;     %RX == received bytes speed &lt;br /&gt;;;     %TX == transmitted bytes speed&lt;br /&gt;;;     %AX == received + transmitted bytes speed&lt;br /&gt;;;     %RB == total received bytes&lt;br /&gt;;;     %TB == total transmitted bytes&lt;br /&gt;;;     %AB == total received plus transmitted bytes&lt;br /&gt;;;     %%% == % character"&lt;br /&gt;&lt;br /&gt;;; After this file is loaded, it is necessary to call `network-speed-start' function.&lt;br /&gt;;; To stop network-speed working  you need to call `network-speed-stop' function.&lt;br /&gt;&lt;br /&gt;;;      &lt;br /&gt;;; A lot of ideas were taken from `battery.el.gz' file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;;;; NETWORK-SPEED CONFIGURATION&lt;br /&gt;;;&lt;br /&gt;;; Add something like this in your .emacs file:&lt;br /&gt;;;&lt;br /&gt;;; ;; Custom variables:&lt;br /&gt;;;  '(network-speed-update-interval 2)   ; Shows network speed every 2 seconds.&lt;br /&gt;;;  '(network-speed-interface-list (list "ppp0" "eth0"))  ; Network interfaces to be shown in mode line.&lt;br /&gt;;;  '(network-speed-precision 1)  ; Number of figures after decimal point.&lt;br /&gt;;;  '(network-speed-format-string " [%NI total: %AX] ") ; String format.&lt;br /&gt;;;&lt;br /&gt;;; ;; network-speed configuration:&lt;br /&gt;;; (add-to-list 'load-path "/path/to/network-speed.el")&lt;br /&gt;;; (require 'network-speed)&lt;br /&gt;;; (network-speed-start) ; &lt;br /&gt;;;&lt;br /&gt;;; ;; to stop network-speed, call "network-speed-stop" interactive function.&lt;br /&gt;;; ;; (network-speed-stop)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;;;; Code:&lt;br /&gt;&lt;br /&gt;;;; CUSTOM VARIABLES:&lt;br /&gt;&lt;br /&gt;;; Network interface list to be shown in mode line.  &lt;br /&gt;;;   E.g: `(list "ppp0" "eth0" "ppp1")'&lt;br /&gt;(defcustom network-speed-interface-list (list "eth0") "Network interface list to be shown in mode line."&lt;br /&gt;  :type '(repeat string) )&lt;br /&gt;&lt;br /&gt;(defcustom network-speed-update-interval 1 "Network speed is calculated every network-speed-update-interval seconds."&lt;br /&gt;  :type 'number )&lt;br /&gt;&lt;br /&gt;(defcustom network-speed-precision 2 "Number of digits after point in numbers shown in mode line."&lt;br /&gt;  :type 'integer )&lt;br /&gt;&lt;br /&gt;;; String used to build the output string shown in emacs mode line.&lt;br /&gt;(defcustom network-speed-format-string " [%NI rx:%RX tx:%TX] " "Format string. &lt;br /&gt;%NI == network interface&lt;br /&gt;%RX == received bytes speed &lt;br /&gt;%TX == transmitted bytes speed&lt;br /&gt;%AX == received + transmitted bytes speed&lt;br /&gt;%RB == total received bytes&lt;br /&gt;%TB == total transmitted bytes&lt;br /&gt;%AB == total received plus transmitted bytes&lt;br /&gt;%%% == % character"&lt;br /&gt;  :type 'string&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(defvar network-speed-update-timer nil)&lt;br /&gt;&lt;br /&gt;;; List that contains vectors like this: [ network-interface-string received-bytes transmitted-bytes rx-speed tx-speed ]&lt;br /&gt;;; This variable is only for internal use.&lt;br /&gt;(defvar network-speed-data-list nil) &lt;br /&gt;&lt;br /&gt;;; We will parse /proc/net/dev file using the returned regexp.&lt;br /&gt;(defun network-speed-get-regex (network-interface)&lt;br /&gt;  "Returns the right regular expression needed to find received and transmitted bytes for NETWORK-INTERFACE."&lt;br /&gt;  (concat "^\\( *" network-interface ":[ ]*\\)"&lt;br /&gt;   "\\([0-9]+\\)" ; received bytes.&lt;br /&gt;   "\\( +[0-9]+\\)\\{7\\} +"&lt;br /&gt;   "\\([0-9]+\\)"))  ; transmitted bytes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(defun network-speed-get-rx-tx-bytes ()&lt;br /&gt;  "Gets received and transmitted bytes for every required network interface and calculates received and transmitted speeds.&lt;br /&gt;Received and transmitted bytes are read from `/proc/net/dev' file"&lt;br /&gt;  (mapc&lt;br /&gt;   (lambda (network-speed-data)&lt;br /&gt;     (with-temp-buffer&lt;br /&gt;       (ignore-errors (insert-file-contents "/proc/net/dev")) &lt;br /&gt;       (cond ((re-search-forward (network-speed-get-regex (aref network-speed-data 0)) (point-max) t)&lt;br /&gt;       (let ((old-received-bytes (aref network-speed-data 1)) ; get old received bytes.&lt;br /&gt;      (old-transmitted-bytes (aref network-speed-data 2)) ; get old transmitted bytes.&lt;br /&gt;      (received-bytes (string-to-number (match-string 2))) ; get updated received bytes.&lt;br /&gt;      (transmitted-bytes (string-to-number (match-string 4)))) ; get updated transmitted bytes.&lt;br /&gt;  &lt;br /&gt;  ;; Save received and transmitted bytes.&lt;br /&gt;  (aset network-speed-data 1 received-bytes) &lt;br /&gt;  (aset network-speed-data 2 transmitted-bytes)&lt;br /&gt;  &lt;br /&gt;  ;; Save received and transmitted speed.&lt;br /&gt;  (aset network-speed-data 3 (/ (float (- received-bytes old-received-bytes)) network-speed-update-interval))&lt;br /&gt;  (aset network-speed-data 4 (/ (float (- transmitted-bytes old-transmitted-bytes)) network-speed-update-interval))))&lt;br /&gt;      (t &lt;br /&gt;       (aset network-speed-data 3 -1 ) ; There is no network interface available.&lt;br /&gt;       (aset network-speed-data 4 -1 ))))) ; There is no network interface available.&lt;br /&gt;   &lt;br /&gt;   network-speed-data-list))&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(defun network-speed-add-units (speed)&lt;br /&gt;  "Returns speed in adequate units e.g: B/s, KB/s or MB/s."&lt;br /&gt;  (cond &lt;br /&gt;   ((&lt; speed 0) (format "*")) ; Network interface not available right now.&lt;br /&gt;   ((&lt; speed 1000) (format "%d B/s" speed))  &lt;br /&gt;   ((&lt; speed 1000000) (format (concat "%." (number-to-string network-speed-precision) "f KB/s") (/ speed 1000)))&lt;br /&gt;   (t (format (concat "%." (number-to-string network-speed-precision) "f MB/s") (/ speed 1000000)))))&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(defun network-speed-parse-format (vector-data)&lt;br /&gt;  "Substitute %XX sequences in network-speed-format-string."&lt;br /&gt;  (replace-regexp-in-string &lt;br /&gt;;;;   "%NI\\|%RX\\|%TX\\|%AX\\|%RB\\|%TB\\|%%%"&lt;br /&gt;   "%\\(NI\\|RX\\|TX\\|AX\\|RB\\|TB\\|AB\\|%%\\)"&lt;br /&gt;   (lambda (str)&lt;br /&gt;     (cond &lt;br /&gt;      ((equal str "%NI") (aref vector-data 0))  ; network interface.&lt;br /&gt;      ((equal str "%RX") (network-speed-add-units (aref vector-data 3)))  ; received bytes speed.&lt;br /&gt;      ((equal str "%TX") (network-speed-add-units (aref vector-data 4)))  ; transmitted bytes speed.&lt;br /&gt;      ((equal str "%AX") (network-speed-add-units (+ (aref vector-data 3) (aref vector-data 4)))) ; received + transmitted speed.&lt;br /&gt;      ((equal str "%RB") (format "%d" (aref vector-data 1))) ; received bytes.&lt;br /&gt;      ((equal str "%TB") (format "%d" (aref vector-data 2))) ; transmitted bytes.&lt;br /&gt;      ((equal str "%AB") (format "%d" (+ (aref vector-data 1) (aref vector-data 2)))) ; received + transmitted bytes.&lt;br /&gt;      ((equal str "%%%") "%") ; % character.&lt;br /&gt;      )&lt;br /&gt;     )&lt;br /&gt;   network-speed-format-string t t)&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(defun network-speed-update-handler()&lt;br /&gt;  "This function is called every `network-speed-update-interval' seconds to calculate data and show network speed in modeline."&lt;br /&gt;  (network-speed-get-rx-tx-bytes)&lt;br /&gt;  &lt;br /&gt;  (setq network-speed-mode-line-string "")&lt;br /&gt;  (mapc &lt;br /&gt;   (lambda (network-speed-data)&lt;br /&gt;     (setq network-speed-mode-line-string &lt;br /&gt;    (concat network-speed-mode-line-string &lt;br /&gt;     (network-speed-parse-format network-speed-data))))  ; Obtains the string we will show.&lt;br /&gt;   network-speed-data-list)&lt;br /&gt;&lt;br /&gt;  (force-mode-line-update)&lt;br /&gt;  (sit-for 0))&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(defun network-speed-start ()&lt;br /&gt;  "Shows network speed in mode line. &lt;br /&gt;This function initializes all needed data. &lt;br /&gt;Speed is not shown inmediately but after `network-speed-update-interval' seconds when first correct value is calculated."&lt;br /&gt;  (interactive)&lt;br /&gt;&lt;br /&gt;  ;; Adding network-speed-mode-line-string to global mode line.&lt;br /&gt;  (setq network-speed-mode-line-string "")&lt;br /&gt;  (add-to-list 'global-mode-string 'network-speed-mode-line-string t)&lt;br /&gt;&lt;br /&gt;  ;; Initialize all needed vectors in `network-speed-data-list'.&lt;br /&gt;  (setq network-speed-data-list ())&lt;br /&gt;  (mapc &lt;br /&gt;   (lambda (x)&lt;br /&gt;     (add-to-list 'network-speed-data-list (vector x 0 0 0 0) t))  ; Initialices and element of network-speed-data list.&lt;br /&gt;   network-speed-interface-list)&lt;br /&gt;&lt;br /&gt;  ;; Calculate speeds.&lt;br /&gt;  (network-speed-get-rx-tx-bytes)&lt;br /&gt;&lt;br /&gt;  ;; Create network-speed-update-timer. &lt;br /&gt;  (and network-speed-update-timer (cancel-timer network-speed-update-timer))&lt;br /&gt;  ;; This does not inmediately show speeds but it waits `network-speed-update-interval' seconds to start showing it.&lt;br /&gt;  (setq network-speed-update-timer (run-at-time network-speed-update-interval network-speed-update-interval 'network-speed-update-handler)))&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(defun network-speed-stop ()&lt;br /&gt;  "Stops displaying network speed in mode line."&lt;br /&gt;  (interactive)&lt;br /&gt;  ;; Delete the text from global mode line.&lt;br /&gt;  (setq global-mode-string (delq 'network-speed-mode-line-string global-mode-string))&lt;br /&gt;&lt;br /&gt;  ;; Cancel timer.&lt;br /&gt;  (and network-speed-update-timer (cancel-timer network-speed-update-timer)))&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(provide 'network-speed)&lt;br /&gt;&lt;br /&gt;;;; filename ends here&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/1810057280041377847-1232894247460290219?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/1232894247460290219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=1232894247460290219' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1232894247460290219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1232894247460290219'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2010/01/show-network-speed-emacs-mode-line.html' title='HowTo Show Network Speed in Emacs Mode Line'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-5219865081714602828</id><published>2009-12-07T09:33:00.002+01:00</published><updated>2009-12-07T09:44:53.889+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='manifesto'/><category scheme='http://www.blogger.com/atom/ns#' term='rights'/><title type='text'>MANIFESTO on the RIGHTS of INTERNET USERS</title><content type='html'>1 . &lt;b&gt;Copyright should not be placed above citizens' fundamental rights&lt;/b&gt; to privacy, security, presumption of innocence, effective judicial protection and freedom of expression.&lt;br /&gt;&lt;br /&gt;2 . &lt;b&gt;Suspension of fundamental rights is and must remain an exclusive competence of judges&lt;/b&gt;. This blueprint, contrary to the provisions of Article 20.5 of the Spanish Constitution, places in the hands of the executive the power to keep Spanish citizens from accessing certain websites.&lt;br /&gt;&lt;br /&gt;3 . The &lt;b&gt;proposed laws would create legal uncertainty across Spanish IT companies&lt;/b&gt;, damaging one of the few areas of development and future of our economy, hindering the creation of startups, introducing barriers to competition and slowing down its international projection.&lt;br /&gt;&lt;br /&gt;4 . The &lt;b&gt;proposed laws threaten creativity and hinder cultural development&lt;/b&gt;. The Internet and new technologies have democratized the creation and publication of all types of content, which no longer depends on an old small industry but on multiple and different sources.&lt;br /&gt;&lt;br /&gt;5 . Authors, like all workers, are entitled to live out of their creative ideas, business models and activities linked to their creations. &lt;b&gt;Trying to hold an obsolete industry with legislative changes is neither fair nor realistic&lt;/b&gt;. If their business model was based on controlling copies of any creation and this is not possible any more on the Internet, they should look for a new business model.&lt;br /&gt;&lt;br /&gt;6 . We believe that &lt;b&gt;cultural industries need modern, effective, credible and affordable alternatives to survive&lt;/b&gt;. They also need to adapt to new social practices.&lt;br /&gt;&lt;br /&gt;7 . The &lt;b&gt;Internet should be free and not have any interference from groups that seek to perpetuate obsolete business models and stop the free flow of human knowledge.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;8 . We ask the &lt;b&gt;Government to guarantee net neutrality in Spain&lt;/b&gt;, as it will act as a framework in which a sustainable economy may develop.&lt;br /&gt;&lt;br /&gt;9 . We propose a &lt;b&gt;real reform of intellectual property rights in order to ensure a society of knowledge, promote the public domain and limit abuses from copyright organizations&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;10 . In a democracy, &lt;b&gt;laws and their amendments should only be adopted after a timely public debate and consultation with all involved parties. Legislative changes affecting fundamental rights can only be made in a Constitutional law.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;REFERENCE&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.facebook.com/group.php?gid=186879394498&amp;ref=mf"&gt;Facebook group supporting the &lt;b&gt;manifesto&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.petitiononline.com/ed021209/petition.html"&gt;Manifesto Signing Petition&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.laquadrature.net/en/dangerous-anti-sharing-law-in-spain"&gt;Dangerous Anti-Sharing Law in Spain | La Quadrature du net&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-5219865081714602828?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/5219865081714602828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=5219865081714602828' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/5219865081714602828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/5219865081714602828'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2009/12/manifesto-rights-internet-users.html' title='MANIFESTO on the RIGHTS of INTERNET USERS'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-1834614335761276592</id><published>2009-11-21T19:32:00.003+01:00</published><updated>2009-11-21T19:46:53.467+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='dhcpd'/><title type='text'>Install and Configure quickly a DHCP Server</title><content type='html'>&lt;b&gt;NOTE:&lt;/b&gt; These commands have been tested in Debian version unstable.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;DHCP&lt;/b&gt; stands for Dynamick Host Configuration Protocol. This protocol allows to &lt;b&gt;automatically obtain&lt;/b&gt; an &lt;b&gt;IP address&lt;/b&gt; and set the network configuration.&lt;br /&gt;&lt;br /&gt;We &lt;b&gt;install a DHCP server&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;#aptitude install dhcp3-server&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Next step is &lt;b&gt;configuring the DHCP server&lt;/b&gt;:&lt;br /&gt;We have to set correcty the &lt;code&gt;/etc/dhcp3/dhcpd.conf&lt;/code&gt; file.&lt;br /&gt;&lt;br /&gt;There is a configuration file &lt;b&gt;example at&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;/usr/share/doc/dhcp3-server/examples/dhcpd.conf&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;e.g: I added these lines to my /etc/dhcp3/dhcpd.conf&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;subnet 192.168.1.0 netmask 255.255.255.252 {&lt;br /&gt;       range 192.168.1.2 192.168.1.3;&lt;br /&gt;       option routers 192.168.1.1;&lt;br /&gt;       option domain-name-servers 212.73.32.3, 212.73.32.67;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;subnet and netmask&lt;/u&gt; indicate the network addresses of our network:&lt;br /&gt;e.g: subnet 192.168.1.0 netmask 255.255.255.252     match 192.168.1.0, 192.168.1.1, 192.168.1.2 and 192.168.1.3 IP addresses.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;range&lt;/u&gt; means which addresses can be returned by our dhcp server, here, it can return 192.168.1.2 and 192.168.1.3&lt;br /&gt;&lt;br /&gt;&lt;u&gt;routers&lt;/u&gt; indicates the gateway&lt;br /&gt;&lt;br /&gt;&lt;u&gt;domain-name-servers&lt;/u&gt; shows all dns addresses separated by commas.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Once we have correctly set dhcpd.conf file we &lt;b&gt;restart the dhcp daemon&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;#/etc/init.d/dhcp3-server restart&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If everything has gone fine, we will execute in a client computer:&lt;br /&gt;&lt;code&gt;$sudo dhclient eth0&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;and the dhcp server will associate an IP adress to eth0 interface.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: dhcp3-client package provides dhclient command.&lt;br /&gt;&lt;code&gt;#aptitude install dhcp3-client&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-1834614335761276592?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/1834614335761276592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=1834614335761276592' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1834614335761276592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1834614335761276592'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2009/11/install-configure-dhcp-server-quickly.html' title='Install and Configure quickly a DHCP Server'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-1627816669465819980</id><published>2009-11-01T22:29:00.005+01:00</published><updated>2009-11-02T12:10:26.293+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell-scripting'/><title type='text'>Shell Script that shows Network Speed</title><content type='html'>The following shell script &lt;b&gt;shows current download and upload speeds&lt;/b&gt; for the network interface you choose.&lt;br /&gt;&lt;br /&gt;Copy the shell script in a file named, i.e: &lt;b&gt;net_speed.sh&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Then after setting execution permissions:&lt;br /&gt;&lt;code&gt;$chmod a+x net_speed.sh&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You can run the shell script passing as the &lt;b&gt;first argument the network interface&lt;/b&gt; you want &lt;b&gt;to monitor&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;./net_speed.sh eth0&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You will get a line like that:&lt;br /&gt;&lt;i&gt;ppp0 DOWN:15 KB/s UP:880 B/s&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;This script works parsing &lt;b&gt;/proc/net/dev&lt;/b&gt; file and calculating the difference between current transmitted or received bytes and their values one second ago.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#!/bin/bash&lt;br /&gt;&lt;br /&gt;# This shell script shows the network speed, both received and transmitted.&lt;br /&gt;&lt;br /&gt;# Usage: net_speed.sh interface&lt;br /&gt;#   e.g: net_speed.sh eth0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Global variables&lt;br /&gt;interface=$1&lt;br /&gt;received_bytes=""&lt;br /&gt;old_received_bytes=""&lt;br /&gt;transmitted_bytes=""&lt;br /&gt;old_transmitted_bytes=""&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# This function parses /proc/net/dev file searching for a line containing $interface data.&lt;br /&gt;# Within that line, the first and ninth numbers after ':' are respectively the received and transmited bytes.&lt;br /&gt;function get_bytes&lt;br /&gt;{&lt;br /&gt;    line=$(cat /proc/net/dev | grep $interface | cut -d ':' -f 2 | awk '{print "received_bytes="$1, "transmitted_bytes="$9}')&lt;br /&gt;    eval $line&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Function which calculates the speed using actual and old byte number.&lt;br /&gt;# Speed is shown in KByte per second when greater or equal than 1 KByte per second.&lt;br /&gt;# This function should be called each second.&lt;br /&gt;function get_velocity&lt;br /&gt;{&lt;br /&gt;    value=$1    &lt;br /&gt;    old_value=$2&lt;br /&gt;&lt;br /&gt;    let vel=$value-$old_value&lt;br /&gt;    let velKB=$vel/1000&lt;br /&gt;    if [ $velKB != 0 ];&lt;br /&gt;    then&lt;br /&gt; echo -n "$velKB KB/s";&lt;br /&gt;    else&lt;br /&gt; echo -n "$vel B/s";&lt;br /&gt;    fi&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;# Gets initial values.&lt;br /&gt;get_bytes&lt;br /&gt;old_received_bytes=$received_bytes&lt;br /&gt;old_transmitted_bytes=$transmitted_bytes&lt;br /&gt;&lt;br /&gt;# Shows a message and waits for one second.&lt;br /&gt;echo "Starting...";&lt;br /&gt;sleep 1;&lt;br /&gt;echo "";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Main loop. It will repeat forever.&lt;br /&gt;while true; &lt;br /&gt;do&lt;br /&gt;&lt;br /&gt;    # Get new transmitted and received byte number values.&lt;br /&gt;    get_bytes&lt;br /&gt;&lt;br /&gt;    # Calculates speeds.&lt;br /&gt;    vel_recv=$(get_velocity $received_bytes $old_received_bytes)&lt;br /&gt;    vel_trans=$(get_velocity $transmitted_bytes $old_transmitted_bytes)&lt;br /&gt;&lt;br /&gt;    # Shows results in the console.&lt;br /&gt;    echo -en "$interface DOWN:$vel_recv\tUP:$vel_trans\r"&lt;br /&gt;&lt;br /&gt;    # Update old values to perform new calculations.&lt;br /&gt;    old_received_bytes=$received_bytes&lt;br /&gt;    old_transmitted_bytes=$transmitted_bytes&lt;br /&gt;&lt;br /&gt;    # Waits one second.&lt;br /&gt;    sleep 1;&lt;br /&gt;&lt;br /&gt;done&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/1810057280041377847-1627816669465819980?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/1627816669465819980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=1627816669465819980' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1627816669465819980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1627816669465819980'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2009/11/shell-script-show-network-speed.html' title='Shell Script that shows Network Speed'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-1721454953970919150</id><published>2009-10-11T12:01:00.014+02:00</published><updated>2009-10-11T12:32:35.175+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Howto Compile the Linux Kernel in GNU/Debian and Ubuntu</title><content type='html'>&lt;b&gt;NOTE&lt;/b&gt;: Tested in GNU/Debian Sid. Ubuntu versions should also work.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;OBTAIN KERNEL SOURCE CODE:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Obviously the first step is obtaining the source code.&lt;br /&gt;&lt;br /&gt;It is &lt;b&gt;recommended to place&lt;/b&gt; and build &lt;b&gt;linux kernel source code&lt;/b&gt; in &lt;b&gt;/usr/src&lt;/b&gt; directory, although it is not required.&lt;br /&gt;&lt;br /&gt;We create our "Linux_Kernel_Source" directory for this task.&lt;br /&gt;&lt;code&gt;$mkdir Linux_Kernel_Source&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$cd Linux_Kernel_Source&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Linux kernel source code is freely available in Internet:&lt;br /&gt;&lt;a href="http://www.kernel.org"&gt;http://www.kernel.org&lt;/a&gt;&lt;br /&gt;specifically, version 2.6:&lt;br /&gt;&lt;a href="http://www.kernel.org/pub/linux/kernel/v2.6"&gt;http://www.kernel.org/pub/linux/kernel/v2.6&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We &lt;b&gt;download&lt;/b&gt; and uncompress &lt;b&gt;latest source code&lt;/b&gt; (2.6.31 when this article was written):&lt;br /&gt;&lt;code&gt;#aptitude install wget bzip2&lt;/code&gt;  # packages needed to get the kernel source code and uncompress it.&lt;br /&gt;&lt;code&gt;$wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.tar.bz2&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Uncompress the source:&lt;br /&gt;&lt;code&gt;$tar xvjf linux-2.6.31.tar.bz2&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;/usr/src/linux&lt;/b&gt; is a &lt;b&gt;symlink to linux sources&lt;/b&gt; or at least linux kernel headers. It is required.&lt;br /&gt;&lt;code&gt;#ln -s linux-2.6.31 /usr/src/linux&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$cd linux-2.6.31&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;KERNEL CONFIGURATION:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;There are several ways to configure the linux kernel build process. We are gonna use the &lt;b&gt;console way (using make menuconfig)&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#aptitude install ncurses-dev&lt;/code&gt; # This package is needed to execute make menuconfig.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: If we would want to execute &lt;b&gt;make gconfig&lt;/b&gt; (gtk configuring way) we would need to install:&lt;br /&gt;gtk+-2.0, glib-2.0 and libglade-2.0   &lt;br /&gt;&lt;br /&gt;We exec:&lt;br /&gt;&lt;code&gt;make menuconfig&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;A console menu will appear. There always are three options:&lt;br /&gt;&lt;b&gt;select&lt;/b&gt;: selects which kernel part to configure. Pressing SPACE key you can select if it is going to be built as a kernel module or built in within the kernel itself.&lt;br /&gt;&lt;b&gt;exit&lt;/b&gt;: To exit from the kernel part we are configuring or to exit the configuration process.&lt;br /&gt;&lt;b&gt;help&lt;/b&gt;: Provides good info about what choices do you have.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you do not want to configure everything in the kernel again (It is huge!), you could &lt;b&gt;search&lt;/b&gt; in the &lt;b&gt;/boot&lt;/b&gt; directory &lt;b&gt;for configuration files&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;Every configuration file begins with config followed by its kernel version.&lt;br /&gt;&lt;br /&gt;We copy one of them to our linux kernel source directory:&lt;br /&gt;&lt;code&gt;$cp /boot/config-2.6.26-1-686 /usr/src/linux&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To select that configuration file you have to select &lt;b&gt;"load alternate file"&lt;/b&gt; in the make menuconfig configuration process.&lt;br /&gt;To make permament the changes you have done, and include them in the compilation, select &lt;b&gt;"save alternate file"&lt;/b&gt; and save it as &lt;b&gt;".config"&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;BUILDING AND COMPILING THE KERNEL:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Once we are finished configuring the kernel compilation process, we are going to compile it.&lt;br /&gt;&lt;br /&gt;To get &lt;b&gt;some help&lt;/b&gt; about options we have:&lt;br /&gt;&lt;code&gt;$make help&lt;/code&gt;  # shows all different options we could choose.&lt;br /&gt;&lt;br /&gt;We now &lt;b&gt;build the kernel and its modules&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;$make&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then we &lt;b&gt;install the kernel&lt;/b&gt; in /boot directory, as &lt;b&gt;vmlinuz-"your kernel version"&lt;/b&gt;&lt;br /&gt;&lt;code&gt;#make install&lt;/code&gt;  &lt;br /&gt;&lt;br /&gt;To &lt;b&gt;install kernel modules&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;#make modules_install&lt;/code&gt;  # installs kernel modules in /lib/modules/2.6.31&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;CREATING A INITRD IMAGE FILE&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We need also to &lt;b&gt;create a initrd image file&lt;/b&gt; to be able to boot in two steps:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#aptitude install initramfs-tools&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#mkinitramfs -o /boot/initrd.img-2.6.31 2.6.31&lt;/code&gt;  &lt;br /&gt;We set the output image file using -o option. &lt;br /&gt;We have also to indicate which kernel version are we using. e.g: 2.6.31&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;UPDATING GRUB:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Last step is &lt;b&gt;setting&lt;/b&gt; correctly &lt;b&gt;the bootloader&lt;/b&gt; so it will boot the recently compiled kernel.&lt;br /&gt;&lt;br /&gt;We assume the GRUB bootloader.&lt;br /&gt;&lt;br /&gt;Next lines show an example &lt;b&gt;grub entry in /boot/grub/menu.lst&lt;/b&gt; file.&lt;br /&gt;&lt;br /&gt;(hd0,6) and /dev/sda7 should be changed to match your system configuration.&lt;br /&gt;&lt;pre&gt;title  Debian GNU/Linux, kernel 2.6.31&lt;br /&gt;root  (hd0,6)&lt;br /&gt;kernel  /boot/vmlinuz-2.6.31 root=/dev/sda7 ro&lt;br /&gt;initrd  /boot/initrd.img-2.6.31&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;INSTALL GRUB IN YOUR DRIVE&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE: Be careful&lt;/b&gt; or you will not be able to boot your system.&lt;br /&gt;&lt;br /&gt;/dev/sda is the hard disk where boot sector is installed, change it to match your system.&lt;br /&gt;&lt;code&gt;#grub-install /dev/sda&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;REFERENCE:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.howtoforge.com/howto_linux_kernel_2.6_compile_debian"&gt;http://www.howtoforge.com/howto_linux_kernel_2.6_compile_debian&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-1721454953970919150?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/1721454953970919150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=1721454953970919150' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1721454953970919150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1721454953970919150'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2009/10/howto-compile-linux-kernel-debian.html' title='Howto Compile the Linux Kernel in GNU/Debian and Ubuntu'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-5980959389938791410</id><published>2009-10-04T13:15:00.024+02:00</published><updated>2009-10-04T13:54:55.968+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mediawiki'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='backup'/><category scheme='http://www.blogger.com/atom/ns#' term='sqlite'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Installing Mediawiki using SQLite Database in GNU/Debian</title><content type='html'>&lt;b&gt;NOTE&lt;/b&gt;: These article commands have been &lt;b&gt;tested in GNU/Debian Sid&lt;/b&gt;. They should also work in &lt;b&gt;Ubuntu flavours&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;THIS ARTICLE IS BASED ON:&lt;/b&gt;&lt;br /&gt;&lt;a href="http://linuxclues.blogspot.com/2008/04/installing-configuring-mediawiki-ubuntu.html"&gt;http://linuxclues.blogspot.com/2008/04/&lt;b&gt;installing-configuring-mediawiki-ubuntu.html&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://linuxclues.blogspot.com/2008/04/backup-restore-mediawiki-ubuntu.html"&gt;http://linuxclues.blogspot.com/2008/04/&lt;b&gt;backup-restore-mediawiki-ubuntu.html&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First we need to &lt;b&gt;install php, apache and SQLite&lt;/b&gt; if they are not installed. This command will do the trick:&lt;br /&gt;&lt;code&gt;#apt-get install php5-sqlite&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Following mediawiki recommendation we add some extensions to php for SQLite to work:&lt;br /&gt;&lt;b&gt;Edit /etc/php5/apache2/php.ini&lt;/b&gt;&lt;br /&gt;Add these two lines in that file:&lt;br /&gt;&lt;pre&gt;  extension=php_pdo_sqlite.so&lt;br /&gt;  extension=php_pdo.so&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;To &lt;b&gt;solve servername warning&lt;/b&gt; when launching apache daemon:&lt;br /&gt;&lt;code&gt;#echo "ServerName localhost" &gt;&gt; /etc/apache2/httpd.conf&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We &lt;b&gt;start apache&lt;/b&gt; web server:&lt;br /&gt;&lt;code&gt;#apache2ctl start&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;DOWNLOAD MEDIAWIKI SOURCE CODE&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#cd /var/www&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We &lt;b&gt;get latest mediawiki source code tarball&lt;/b&gt; (current one when writting this article is 1.15.1):&lt;br /&gt;&lt;code&gt;#wget http://download.wikimedia.org/mediawiki/1.15/mediawiki-1.15.1.tar.gz&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Uncompress it:&lt;/b&gt;&lt;br /&gt;&lt;code&gt;#tar xvfz mediawiki-1.15.1.tar.gz&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#cd mediawiki-1.15.1&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#ln -s mediawiki-1.15.1 mediawiki&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We &lt;b&gt;set writting permissions to config directory&lt;/b&gt; so we will be able to configure our wiki:&lt;br /&gt;&lt;code&gt;#chmod a+w config&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;CONFIGURING THE WIKI&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We open a web browser: &lt;b&gt;http://localhost/mediawiki/&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We observe that: &lt;b&gt;It detects correctly SQLite drivers!!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Some clues about configuring first time the wiki are pointed in this article:&lt;br /&gt;&lt;a href="http://linuxclues.blogspot.com/2008/04/installing-configuring-mediawiki-ubuntu.html"&gt;http://linuxclues.blogspot.com/2008/04/&lt;b&gt;installing-configuring-mediawiki-ubuntu.html&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE: SQLite is userless&lt;/b&gt;, and therefore requesting to fill usernames and passwords for it is pointless in configure page.&lt;br /&gt;&lt;b&gt;However it is needed to write something in those fields&lt;/b&gt; to continue the configuring process.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: &lt;b&gt;SQLite Data directory&lt;/b&gt; field &lt;b&gt;is needed&lt;/b&gt; to store SQlite database. Remember to &lt;b&gt;give to it writting permissions&lt;/b&gt;!!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If everything goes fine you will get: &lt;b&gt;Success!!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;CONFIGURING LocalSettings.php FILE&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Edit LocalSettings.php&lt;/b&gt; following &lt;a href="http://linuxclues.blogspot.com/2008/04/installing-configuring-mediawiki-ubuntu.html"&gt;http://linuxclues.blogspot.com/2008/04/&lt;b&gt;installing-configuring-mediawiki-ubuntu.html&lt;/b&gt;&lt;/a&gt; instructions.&lt;br /&gt;&lt;br /&gt;Now we &lt;b&gt;set adequate permissions&lt;/b&gt; to this file:&lt;br /&gt;&lt;code&gt;#cd var/www/mediawiki&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#mv config/LocalSettings.php .&lt;/code&gt;  # mv LocalSettings.php to parent directory.&lt;br /&gt;&lt;code&gt;#chown root:www-data LocalSettings.php&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#chmod 0640 LocalSettings.php&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: When finished your configuration you should delete config directory to prevent the wiki being configured again.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;CREATING A NORMAL USER&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the web browser: http://localhost/mediawiki&lt;br /&gt;&lt;br /&gt;You will need to &lt;b&gt;login as WikiSysop&lt;/b&gt; user.  &lt;br /&gt;&lt;br /&gt;Navigate to: &lt;b&gt;SpecialPages --&gt; Login in / create account&lt;/b&gt; --&gt; Then create a new normal user account.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;BACKING AND RESTORING THE SQLITE BASED MEDIAWIKI&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;SQLite has no users so we will not need a administrator user. Nevertheless we will set root permissions to prevent other users to access AdminSettings.php file:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Creating AdminSettings.php file&lt;/b&gt;&lt;br /&gt;&lt;code&gt;#cd /var/www/mediawiki&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#cp AdminSettings.sample AdminSettings.php&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#chown root:root AdminSettings.php&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#chmod 600 AdminSettings.php&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We will need &lt;b&gt;php&lt;/b&gt; console &lt;b&gt;cli command&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;#aptitude install php5-cli  # php command.&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;BACKING UP THE WIKI&lt;/b&gt;&lt;br /&gt;Create the xml backup file:&lt;br /&gt;&lt;code&gt;#cd /var/www/mediawiki/maintenance&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#php dumpBackup.php --current &gt; ~/backup.xml&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;RESTORING THE WIKI&lt;/b&gt;&lt;br /&gt;&lt;code&gt;#cd /var/www/mediawiki/maintenance&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#php importDump.php ~/backup.xml&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;REFERENCE:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.mediawiki.org/wiki/Manual:SQLite"&gt;href="http://www.mediawiki.org/wiki/Manual:SQLite&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-5980959389938791410?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/5980959389938791410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=5980959389938791410' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/5980959389938791410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/5980959389938791410'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2009/10/installing-mediawiki-using-sqlite.html' title='Installing Mediawiki using SQLite Database in GNU/Debian'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-8655987872338763301</id><published>2009-03-15T01:40:00.006+01:00</published><updated>2009-03-15T02:27:08.903+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='fedora'/><category scheme='http://www.blogger.com/atom/ns#' term='distro'/><category scheme='http://www.blogger.com/atom/ns#' term='chroot'/><title type='text'>Creating a FEDORA 10 CHROOT Environment in DEBIAN SID</title><content type='html'>&lt;b&gt;Fedora&lt;/b&gt; is a &lt;b&gt;linux distribution&lt;/b&gt; supported by a community: &lt;a href="http://fedoraproject.org"&gt;fedoraproject.org&lt;/a&gt; and by Red Hat enterprise.&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Fedora_(Linux_distribution)"&gt;Fedora (Wikipedia)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Current release&lt;/b&gt; name is &lt;b&gt;Fedora 10&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Fedora &lt;b&gt;packages&lt;/b&gt; are provided &lt;b&gt;in rpm format&lt;/b&gt;. We can manage these packages &lt;b&gt;using rpm tool, and&lt;/b&gt; use &lt;b&gt;yum&lt;/b&gt; to deal with repositories.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Debian sid provides the rpm tool&lt;/b&gt; so our first task will be installing it in our Debian system:&lt;br /&gt;&lt;code&gt;#aptitude install rpm&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This tool &lt;b&gt;will allow us to install fedora packages in our debian system using a separate database and a different directory than / .&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We create the directory to place our Fedora chroot environment:&lt;br /&gt;&lt;code&gt;$mkdir Fedora&lt;br /&gt;$cd Fedora&lt;br /&gt;$mkdir Distro&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We are going to &lt;b&gt;download the minimal amount of rpm packages required&lt;/b&gt; for our Fedora distro. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Navigating&lt;/b&gt; through fedora project web page &lt;b&gt;we can find some mirrors&lt;/b&gt;, e.g:&lt;br /&gt; &lt;a href="http://glup.uv.es/mirror/fedora/linux/"&gt;http://glup.uv.es/mirror/fedora/linux/&lt;/a&gt;&lt;br /&gt; &lt;a href="http://ftp.uni-kl.de/pub/linux/fedora/linux/"&gt;http://ftp.uni-kl.de/pub/linux/fedora/linux/&lt;/a&gt;&lt;br /&gt;Choose one near you.&lt;br /&gt; &lt;br /&gt;Within those mirrors we find &lt;b&gt;where packages are:&lt;/b&gt;&lt;br /&gt;&lt;a href="http://glup.uv.es/mirror/fedora/linux/releases/10/Fedora/i386/os/Packages/"&gt;http://glup.uv.es/mirror/fedora/linux/releases/10/Fedora/i386/os/Packages/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://ftp.uni-kl.de/pub/linux/fedora/linux/releases/10/Fedora/i386/os/Packages/"&gt;http://ftp.uni-kl.de/pub/linux/fedora/linux/releases/10/Fedora/i386/os/Packages/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We can &lt;b&gt;download&lt;/b&gt; every &lt;b&gt;package&lt;/b&gt; we need &lt;b&gt;using wget&lt;/b&gt; tool.&lt;br /&gt;Although we only show the installing rpm command, you will have to download every rpm package prior to install it.&lt;br /&gt;&lt;b&gt;NOTE: Package version may not coincide, but the &lt;u&gt;same package name&lt;/u&gt; and &lt;u&gt;same installing order&lt;/u&gt; &lt;u&gt;are mandatory&lt;/u&gt;.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If we need some file &lt;b&gt;to satisfy a dependency&lt;/b&gt;, but don't know &lt;b&gt;which package&lt;/b&gt; contains it, this web page can help us:&lt;br /&gt;&lt;a href="http://rpmfind.net"&gt;http://rpmfind.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Our goal is to install a minimal working Fedora distro&lt;/b&gt;. Some important packages are needed to acomplish that: &lt;b&gt;bash, rpm and yum.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Bash will provide us a shell, rpm is needed to manage rpm packages, and yum will allow us to continue installing packages in our chroot enviroment using some rpm repositories and solving dependency problems.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;We begin installing the packages:&lt;/b&gt;&lt;br /&gt;/home/foo/Fedora/Distro is the directory where our chroot environment will be placed.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#export FEDORA_DISTRO_DIR="/home/foo/Fedora/Distro"&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i setup-2.7.4-1.fc10.noarch.rpm &lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i filesystem-2.4.19-1.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i basesystem-10.0-1.noarch.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i libgcc-4.3.2-7.i386.rpm&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;"--nodeps" option is needed because&lt;/b&gt; glibc package has &lt;b&gt;cross dependencies.&lt;/b&gt;&lt;br /&gt;&lt;code&gt;rpm --root $FEDORA_DISTRO_DIR/ -i glibc-2.9-2.i686.rpm --nodeps&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;rpm --root $FEDORA_DISTRO_DIR/ -i ncurses-base-5.6-20.20080927.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i ncurses-libs-5.6-20.20080927.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i bash-3.2-29.fc10.i386.rpm&lt;/code&gt;&lt;br /&gt;&lt;b&gt;Bash is now installed&lt;/b&gt; so we could execute chroot if we would want.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;rpm --root $FEDORA_DISTRO_DIR/ -i tzdata-2008h-1.fc10.noarch.rpm &lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i glibc-common-2.9-2.i386.rpm&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;rpm --root $FEDORA_DISTRO_DIR/ -i ncurses-5.6-20.20080927.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i libsepol-2.0.33-1.fc10.i386.rpm &lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i libselinux-2.0.73-1.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i libstdc++-4.3.2-7.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i pcre-7.8-1.fc10.i386.rpm &lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i zlib-1.2.3-18.fc9.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i info-4.12-4.fc10.i386.rpm &lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i grep-2.5.1a-61.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i libattr-2.4.43-1.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i libacl-2.2.47-3.fc10.i386.rpm &lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i libcap-2.10-2.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i audit-libs-1.7.8-6.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i cracklib-2.8.12-2.i386.rpm &lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i cracklib-dicts-2.8.12-2.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i db4-4.7.25-5.fc10.i386.rpm &lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i coreutils-6.12-17.fc10.i386.rpm -nodeps&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i pam-1.0.2-2.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i popt-1.13-4.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i logrotate-3.7.7-1.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i bzip2-libs-1.0.5-3.fc10.i386.rpm &lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i compat-db45-4.5.20-5.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i elfutils-libelf-0.137-3.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i readline-5.2-13.fc9.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i lua-5.1.4-1.fc10.i386.rpm &lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i file-libs-4.26-3.fc10.i386.rpm &lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i nspr-4.7.2-2.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i sqlite-3.5.9-2.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i nss-3.12.2.0-3.fc10.i386.rpm &lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i crontabs-1.10-23.fc10.noarch.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i e2fsprogs-libs-1.41.3-2.fc10.i386.rpm &lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i keyutils-libs-1.2-3.fc9.i386.rpm &lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i krb5-libs-1.6.3-16.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i libidn-0.6.14-8.i386.rpm &lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i ca-certificates-2008-7.noarch.rpm &lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i openssl-0.9.8g-11.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i cyrus-sasl-lib-2.1.22-19.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i openldap-2.4.12-1.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i libssh2-0.18-7.fc9.i386.rpm &lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i libcurl-7.18.2-7.fc10.i386.rpm &lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i curl-7.18.2-7.fc10.i386.rpm&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i rpm-libs-4.6.0-0.rc1.7.i386.rpm --nodeps&lt;br /&gt;rpm --root $FEDORA_DISTRO_DIR/ -i rpm-4.6.0-0.rc1.7.i386.rpm&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;RPM ACOMPLISHED!!&lt;/b&gt;     We would be able to enter the chroot environment an install packages with rpm.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Packages needed to create new users and change their passwords:&lt;/b&gt;&lt;br /&gt;&lt;code&gt;rpm -i shadow-utils-4.1.2-8.fc10.i386.rpm&lt;br /&gt;rpm -i gamin-0.1.9-6.fc10.i386.rpm --nodeps&lt;br /&gt;rpm -i glib2-2.18.2-3.fc10.i386.rpm&lt;br /&gt;rpm -i libuser-0.56.9-1.i386.rpm&lt;br /&gt;rpm -i passwd-0.75-2.fc9.i386.rpm&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Terminal to login in the system: (actually we will use agetty instead)&lt;/b&gt;&lt;br /&gt;&lt;code&gt;rpm -i mingetty-1.08-2.fc9.i386.rpm&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Packages needed to install YUM tool.&lt;/b&gt;&lt;br /&gt;&lt;code&gt;rpm -i expat-2.0.1-5.i386.rpm &lt;br /&gt;rpm -i gdbm-1.8.0-29.fc10.i386.rpm&lt;br /&gt;rpm -i python-libs-2.5.2-1.fc10.i386.rpm --nodeps&lt;br /&gt;rpm -i python-2.5.2-1.fc10.i386.rpm&lt;br /&gt;rpm -i libgpg-error-1.6-2.i386.rpm&lt;br /&gt;rpm -i libgcrypt-1.4.3-2.fc10.i386.rpm&lt;br /&gt;rpm -i libksba-1.0.4-1.fc10.i386.rpm&lt;br /&gt;rpm -i pth-2.0.7-7.i386.rpm&lt;br /&gt;rpm -i dirmngr-1.0.2-1.fc10.i386.rpm&lt;br /&gt;rpm -i libusb-0.1.12-20.fc10.i386.rpm&lt;br /&gt;rpm -i chkconfig-1.3.38-1.i386.rpm&lt;br /&gt;rpm -i pinentry-0.7.4-5.fc9.i386.rpm&lt;br /&gt;rpm -i gnupg2-2.0.9-3.fc10.i386.rpm&lt;br /&gt;rpm -i gpgme-1.1.7-1.fc10.i386.rpm&lt;br /&gt;rpm -i pygpgme-0.1-8.fc9.i386.rpm&lt;br /&gt;rpm -i python-iniparse-0.2.3-3.fc9.noarch.rpm&lt;br /&gt;rpm -i rpm-python-4.6.0-0.rc1.7.i386.rpm&lt;br /&gt;rpm -i python-urlgrabber-3.0.0-10.fc10.noarch.rpm&lt;br /&gt;rpm -i libxml2-2.7.2-1.fc10.i386.rpm&lt;br /&gt;rpm -i yum-metadata-parser-1.1.2-10.fc10.i386.rpm&lt;br /&gt;rpm -i yum-3.2.20-3.fc10.noarch.rpm&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Yum is now installed in our system. So &lt;b&gt;we add a repository&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;We &lt;b&gt;edit&lt;/b&gt; and add this into &lt;b&gt;$FEDORA_DISTRO_DIR/etc/yum.conf&lt;/b&gt; file:&lt;br /&gt;Change &lt;i&gt;baseurl&lt;/i&gt; to the mirror url you choose.&lt;br /&gt;&lt;pre&gt;[Fedora10]&lt;br /&gt;name=Fedora 10&lt;br /&gt;baseurl=http://ftp.uni-kl.de/pub/linux/fedora/linux/releases/10/Fedora/i386/os&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; We will need to run: &lt;code&gt;#yum update&lt;/code&gt;  to take into account this new repository, when our chroot environment will be working. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;MOUNTING DIRECTORIES&lt;/b&gt;&lt;br /&gt;Lets mount the directories needed for our chroot environment:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;# cd $FEDORA_DISTRO_DIR&lt;br /&gt;# mount --bind /proc proc&lt;br /&gt;# mount --bind /sys sys&lt;br /&gt;# mount --bind /proc/bus/usb proc/bus/usb&lt;br /&gt;# mount --bind /dev dev&lt;br /&gt;# mount --bind /dev/shm dev/shm&lt;br /&gt;# mount --bind /dev/pts dev/pts&lt;br /&gt;# mount --bind /tmp tmp     # to use X-Windows&lt;br /&gt;# mkdir -p lib/init/rw&lt;br /&gt;# mount --bind /lib/init/rw lib/init/rw&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We copy these files to be able to &lt;b&gt;resolve localhost and dns&lt;/b&gt;&lt;br /&gt;&lt;code&gt;# cp /etc/hosts $FEDORA_DISTRO_DIR/etc/&lt;br /&gt;# cp /etc/resolv.conf $FEDORA_DISTRO_DIR/etc/&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Create&lt;/b&gt; a working &lt;b&gt;/etc/mtab&lt;/b&gt; file:&lt;br /&gt;# cp /etc/mtab $FEDORA_DISTRO_DIR/etc   #edit this file to correct values. e.g:&lt;br /&gt;&lt;pre&gt;proc /proc proc rw,noexec,nosuid,nodev 0 0&lt;br /&gt;sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0&lt;br /&gt;udev /dev tmpfs rw,mode=0755 0 0&lt;br /&gt;tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0&lt;br /&gt;devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; You can left proc and sysfs only, if you want.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ENTER INTO THE CHROOT JAIL:&lt;/b&gt;&lt;br /&gt;&lt;code&gt;Sid:# chroot $FEDORA_DISTRO_DIR&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We are now in the Fedora 10 environment!!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now we &lt;b&gt;import the repository key&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;Fedora:# wget http://ftp.uni-kl.de/pub/linux/fedora/linux/releases/10/Fedora/i386/os/RPM-GPG-KEY-fedora-i386&lt;br /&gt;Fedora:# rpm --import RPM-GPG-KEY-fedora-i386&lt;br /&gt;Fedora:# yum update&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We can &lt;b&gt;install new packages&lt;/b&gt;. e.g:&lt;br /&gt;&lt;code&gt;Fedora:# yum install man-pages&lt;br /&gt;Fedora:# yum install man&lt;/code&gt;&lt;br /&gt; &lt;br /&gt;&lt;code&gt;Fedora:# yum install iputils    #ping utility.&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;Before login in the standar way &lt;b&gt;we need to CREATE A NEW USER AND CHANGE PASSWORDS:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To solve password changing problem:  &lt;i&gt;"passwd: User not known to the underlying authentication module"&lt;/i&gt;&lt;br /&gt;&lt;code&gt;Fedora:# yum install shadow-utils&lt;br /&gt;Fedora:# pwconv    #to create /etc/shadow file.&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;We create fedoraUser:&lt;/b&gt;&lt;br /&gt;&lt;code&gt;Fedora:# adduser fedoraUser&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Fedora:# passwd    # change root password.&lt;br /&gt;Fedora:# passwd fedoraUser   # change fedoraUser password.&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;To ENTER INTO THE CHROOT JAIL IN THE STANDARD WAY&lt;/b&gt;, without CONTROLLING TTY error, we will &lt;b&gt;use agetty command&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Fedora:# yum install util-linux-ng   #to obtain agetty command.&lt;/code&gt;&lt;br /&gt;&lt;code&gt;Sid:$ su -c "chroot ChDistro /sbin/agetty 38400 $(tty)"&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We can login as fedoraUser.&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;USING SID X-Windows:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Sid:$xhost +local:`hostname`  # Allow connections from local machine.&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Fedora:$ export DISPLAY=:0.0    if you are using 0.0 display in Sid distro.&lt;br /&gt;Fedora:$ xclock&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;INSTALLING EMACS&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Fedora:# yum install emacs&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We get this error, to solve it we will &lt;b&gt;install some fonts&lt;/b&gt; e.g dejavu ones:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;# Emacs fonts problems it is solved installing some fonts:&lt;br /&gt;"Pango-CRITICAL **: No fonts found:&lt;br /&gt;This probably means that the fontconfig&lt;br /&gt;library is not correctly configured. You may need to&lt;br /&gt;edit the fonts.conf configuration file. More information&lt;br /&gt;about fontconfig can be found in the fontconfig(3) manual&lt;br /&gt;page and on http://fontconfig.org"&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Fedora:# yum install dejavu-fonts&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;INSTALLING FIREFOX&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Fedora:# yum install firefox&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Some errors occur:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;solved with:&lt;br /&gt;&lt;code&gt;#dbus-uuidgen --ensure&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://www.gnome.org/projects/gconf/ for information. (Details -  1: Failed to get connection to session: Failed to execute dbus-launch to autolaunch D-Bus session)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;solved installing: &lt;br /&gt;&lt;code&gt;#yum install dbus-x11&lt;/code&gt;      so /usr/bin/dbus-launch  will be available.&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SOUND SUPPORT IN OUR CHROOT&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Fedora:# ls -l /dev/snd/*&lt;/code&gt;&lt;br /&gt;We see a group number, 29 in my system. This is &lt;b&gt;audio group&lt;/b&gt; in my Sid distro.&lt;br /&gt;&lt;code&gt;Fedora:# groupadd -g 29 audio&lt;br /&gt;Fedora:# ls -l /dev/snd*&lt;br /&gt;Fedora:# usermod -a -G audio fedoraUser&lt;/code&gt;&lt;br /&gt;we can check if audio group was added:&lt;br /&gt;&lt;code&gt;Fedora:# groups fedoraUser&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I use &lt;b&gt;alsa&lt;/b&gt; in my system so:&lt;br /&gt;&lt;code&gt;Fedora:# yum install alsa-lib&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now we can use sound applications in our Fedora chroot environment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-8655987872338763301?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/8655987872338763301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=8655987872338763301' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/8655987872338763301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/8655987872338763301'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2009/03/fedora-10-chroot-environment-debian-sid.html' title='Creating a FEDORA 10 CHROOT Environment in DEBIAN SID'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-1013864140560342172</id><published>2009-01-31T18:11:00.007+01:00</published><updated>2010-06-20T18:19:42.922+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='primes'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Calculating Prime Numbers using python</title><content type='html'>This blog article shows a python exercise which consists on calculating some prime numbers using &lt;a href="http://en.wikipedia.org/wiki/Trial_division"&gt;trial division algorithm&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;You can copy this code in a script file and then execute it!&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;!/usr/bin/env python&lt;br /&gt;&lt;br /&gt;#Prime numbers&lt;br /&gt;import sys&lt;br /&gt;import math&lt;br /&gt;&lt;br /&gt;print "Prime numbers"&lt;br /&gt;&lt;br /&gt;#Asks user how many numbers he wants to calculate.&lt;br /&gt;top = int(raw_input("How many prime numbers do you want to calculate?: "))&lt;br /&gt;&lt;br /&gt;if (top &lt;1 ) :&lt;br /&gt;    print "Error: Invalid number. It must be greater than one"&lt;br /&gt;    sys.exit&lt;br /&gt;&lt;br /&gt;#Initializing some variables&lt;br /&gt;a = 3    # first number to test if it is prime.&lt;br /&gt;result = [2]  # result list begins with prime number 2.&lt;br /&gt;num = 1   # number of already calculated primes.&lt;br /&gt;print 2,&lt;br /&gt;&lt;br /&gt;while num &lt; top : # main loop&lt;br /&gt;    cont = 0&lt;br /&gt;&lt;br /&gt;    # Performs the division test&lt;br /&gt;    while 1 :&lt;br /&gt;        divisor = result[cont]   # we only test with already calculated prime numbers.&lt;br /&gt;        &lt;br /&gt;        (quotient, remainder) = divmod(a,divisor)  # calculates quotient and remainder at the same time.&lt;br /&gt;&lt;br /&gt;        if (remainder) :&lt;br /&gt;            if divisor &lt;= quotient :&lt;br /&gt;                cont += 1 &lt;br /&gt;            else:&lt;br /&gt;                result.append(a)&lt;br /&gt;                print a,  # number a is a prime.&lt;br /&gt;                num += 1&lt;br /&gt;                break&lt;br /&gt;        else:&lt;br /&gt;            break   # number a is not a prime&lt;br /&gt;&lt;br /&gt;    a += 1   # calculate next number to test.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This other script avoids testing numbers that are multiple of 2,3,5 or 7. Also calculates the integer square root to obtain the higher divisor limit to test for each number.  &lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#!/usr/bin/env python&lt;br /&gt;&lt;br /&gt;#Prime numbers&lt;br /&gt;import sys&lt;br /&gt;import math&lt;br /&gt;&lt;br /&gt;print "Prime numbers"&lt;br /&gt;&lt;br /&gt;#Asks user how many numbers he wants to calculate.&lt;br /&gt;top = int(raw_input("How many prime numbers do you want to calculate?: "))&lt;br /&gt;&lt;br /&gt;if (top &lt;1 ) :&lt;br /&gt;    print "Error: Invalid number. It must be greater than one"&lt;br /&gt;    sys.exit&lt;br /&gt;&lt;br /&gt;#Initializing some variables&lt;br /&gt;a = 11   # first number to test if it is prime&lt;br /&gt;statea = 0&lt;br /&gt;stateb = 0&lt;br /&gt;result = [7]  # result list begins with prime number 7&lt;br /&gt;num = 4   # number of already calculated primes.&lt;br /&gt;print 2, 3, 5, 7,&lt;br /&gt;&lt;br /&gt;while num &lt; top : # main loop&lt;br /&gt;    cont = 0&lt;br /&gt;&lt;br /&gt;    #Calculates the integer square root of a&lt;br /&gt;    low = 1&lt;br /&gt;    upper = a&lt;br /&gt;    while (upper - low) &gt; 1 :&lt;br /&gt;        med = (low + upper)/2&lt;br /&gt;        temp = med * med&lt;br /&gt;        if temp &gt; a :&lt;br /&gt;            upper = med&lt;br /&gt;        else:&lt;br /&gt;            low = med&lt;br /&gt;            if temp == a :&lt;br /&gt;                break&lt;br /&gt;&lt;br /&gt;    # Performs the division test&lt;br /&gt;    while 1 :&lt;br /&gt;        divisor = result[cont]&lt;br /&gt;        if (a % divisor) :&lt;br /&gt;            if divisor &lt;= low :&lt;br /&gt;                cont += 1&lt;br /&gt;            else:&lt;br /&gt;                result.append(a)&lt;br /&gt;                print a,  # number a is a prime&lt;br /&gt;                num += 1&lt;br /&gt;                break&lt;br /&gt;        else:&lt;br /&gt;            break   # number a is not a prime&lt;br /&gt;&lt;br /&gt;    # Calculates next number to test if it is a prime.&lt;br /&gt;    if (stateb == 4) or (stateb == 6) :&lt;br /&gt;        a += 6&lt;br /&gt;        stateb += 1&lt;br /&gt;    elif statea :&lt;br /&gt;        a += 4&lt;br /&gt;        statea = 0&lt;br /&gt;        if stateb == 7 :&lt;br /&gt;            stateb = 0&lt;br /&gt;        else :&lt;br /&gt;            stateb += 1&lt;br /&gt;    else :&lt;br /&gt;        a += 2&lt;br /&gt;        statea = 1&lt;br /&gt;        stateb +=1&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/1810057280041377847-1013864140560342172?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/1013864140560342172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=1013864140560342172' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1013864140560342172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1013864140560342172'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2009/01/python-calculate-prime-numbers.html' title='Calculating Prime Numbers using python'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-5605106944783803147</id><published>2008-12-26T15:55:00.005+01:00</published><updated>2008-12-26T16:12:19.448+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>Installing Adobe Flash Player Plugin in GNU/Debian Sid</title><content type='html'>There are several available installation versions: &lt;b&gt;tar.gz&lt;/b&gt;, &lt;b&gt;deb&lt;/b&gt; and &lt;b&gt;rpm&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;I try &lt;b&gt;deb package&lt;/b&gt; version because it &lt;b&gt;solved&lt;/b&gt; me all &lt;b&gt;unsatisfied dependencies&lt;/b&gt; that made iceweasel(firefox) crash.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;First we download .deb package.&lt;/b&gt;&lt;br /&gt;&lt;code&gt;$wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.deb&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Now we install the package.&lt;/b&gt;&lt;br /&gt;&lt;code&gt;#dpkg -i install_flash_player_10_linux.deb&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Solving dependencies problems&lt;/b&gt;&lt;br /&gt;&lt;code&gt;#apt-get -f install&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You can now run iceweasel with adobe flash plugin support.&lt;br /&gt;&lt;br /&gt;&lt;hr/&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt;Another way of installing this plugin is the Debian installation way:&lt;br /&gt;&lt;br /&gt;supposing you have non-free repositories added in your sources.list file.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#aptitude install flashplugin-nonfree&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;It automatically installs tar.gz version from adobe page&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;However dependencies are not the same as .deb package and my iceweasel crashed.&lt;br /&gt;&lt;br /&gt;&lt;hr/&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;REFERENCE URLs&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://get.adobe.com/es/flashplayer/"&gt;http://get.adobe.com/es/flashplayer/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.adobe.com/es/products/flashplayer/productinfo/instructions/"&gt;http://www.adobe.com/es/products/flashplayer/productinfo/instructions/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-5605106944783803147?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/5605106944783803147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=5605106944783803147' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/5605106944783803147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/5605106944783803147'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2008/12/installing-adobe-flash-plugin-debian.html' title='Installing Adobe Flash Player Plugin in GNU/Debian Sid'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-6803321210950064695</id><published>2008-09-21T21:20:00.012+02:00</published><updated>2008-09-22T11:45:40.437+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='hardy'/><category scheme='http://www.blogger.com/atom/ns#' term='chroot'/><title type='text'>Installing GNU/Debian Sid in Ubuntu Hardy using debootstrap and chroot</title><content type='html'>This article explains &lt;b&gt;how to install &lt;a href="http://linuxclues.blogspot.com/2007/06/debian-linux-distribution.html"&gt;GNU/Debian&lt;/a&gt; Sid in a previously installed Ubuntu Hardy System&lt;/b&gt;. We will use &lt;b&gt;debootstrap and chroot&lt;/b&gt; tools to accomplish that. This how-to is not focused on security, it does not tell how to create a restricted chroot environment to improve security.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Ubuntu is a GNU/Debian based distro&lt;/b&gt;. Every six months they take GNU/Debian Unstable packages and make a new Ubuntu distribution.&lt;br /&gt;&lt;b&gt;Debian Sid provides more and newer packages&lt;/b&gt;. Ubuntu is configured for easiness. Debian has less preconfiguration instead.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;chroot runs a command with a special root directory&lt;/b&gt;.&lt;br /&gt;&lt;b&gt;chroot&lt;/b&gt; comes as &lt;b&gt;part of coreutils&lt;/b&gt; package.  &lt;br /&gt;&lt;code&gt;$sudo aptitude install coreutils&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;debootstrap&lt;/b&gt; command &lt;b&gt;bootstraps a basic Debian system&lt;/b&gt; (it can also bootstrap other systems).&lt;br /&gt;&lt;code&gt;$sudo aptitude install debootstrap&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$ls /usr/share/debootstrap/scripts/&lt;/code&gt;    #&lt;b&gt;shows&lt;/b&gt; which &lt;b&gt;distros&lt;/b&gt; and versions &lt;b&gt;you can install&lt;/b&gt; with debootstrap:&lt;br /&gt;&lt;pre&gt;breezy  edgy  etch-m68k  gutsy  hoary  lenny  sarge  sarge.fakechroot  warty  woody &lt;br /&gt; dapper  etch  feisty  hardy  hoary.buildd  potato  sarge.buildd  sid warty.buildd  woody.buildd&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;INSTALLATION BEGINNING&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;First of all we &lt;b&gt;create the directory&lt;/b&gt; where Debian Sid will be installed.&lt;br /&gt;&lt;code&gt;$mkdir DebianSid&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;CREATING A LOOPBACK IMAGE TO STORE DEBIAN SID&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This step is only necessary &lt;b&gt;if you plan to boot your system from your Debian Sid chroot environment&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo dd if=/dev/zero of=DebianSidFile bs=1048576 count=10000&lt;/code&gt;     #We create DebianSidFile with 10 gigabyte capacity.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo mkfs.ext3 -b 4096 -L DSid DebianSidFile&lt;/code&gt;  #Ext3 filesystem creation.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo mount DebianSidFile DebianSid -t ext3 -o loop&lt;/code&gt;  #mounting it on DebianSid directory.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;INSTALLING A MINIMAL SYSTEM&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo debootstrap --variant=minbase --verbose sid DebianSid http://ftp.debian.org&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;it downloads, unpacks and installs a minimal Debian base system.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;MOUNTING IMPORTANT FILESYSTEMS&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo mount --bind /proc DebianSid/proc&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo mount --bind /sys DebianSid/sys&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo mount --bind /tmp DebianSid/tmp&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo mount --bind /dev DebianSid/dev&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo mount --bind /dev/pts DebianSid/dev/pts&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; if you wanna share your user application configurations between Ubuntu and Debian you can mount home directory.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo mount --bind /home DebianSid/home&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Copying the &lt;b&gt;static lookup table for host names&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo cp /etc/hosts DebianSid/etc/&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To &lt;b&gt;resolve dns&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo cp /etc/resolv.conf DebianSid/etc/&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;ENTERING INTO THE CHROOT ENVIRONMENT&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo chroot DebianSid&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;If we execute: &lt;code&gt;#cat /etc/issue&lt;/code&gt; it will show:&lt;br /&gt;&lt;br /&gt; &lt;i&gt;Debian GNU/Linux lenny/sid \n \l&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;so we are in Debian Sid!!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; &lt;b&gt;Setting the hostname also changes the original system hostname, &lt;u&gt;better not to change it&lt;/u&gt;&lt;/b&gt;: e.g: #hostname DebianChrootSid&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;ADDING SEVERAL TOOLS TO OUR SYSTEM&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Updating the package system database&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;#apt-get update&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Dialog interface to show messages&lt;/b&gt;: &lt;br /&gt;&lt;code&gt;#apt-get install dialog&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To obtaing &lt;b&gt;ping utility&lt;/b&gt;: &lt;code&gt;#apt-get install inetutils-ping&lt;/code&gt;&lt;br /&gt;We can &lt;b&gt;test the network&lt;/b&gt;: &lt;code&gt;#ping www.google.com&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Installing &lt;b&gt;less&lt;/b&gt;: &lt;br /&gt;&lt;code&gt;#apt-get install less&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Small &lt;b&gt;vi editor&lt;/b&gt;: &lt;br /&gt;&lt;code&gt;#apt-get install vim-tiny&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;apt-file:&lt;/b&gt; &lt;code&gt;#apt-get install apt-file&lt;/code&gt;       #to search for files and packages.&lt;br /&gt;apt-file configuration: &lt;code&gt;#apt-file update&lt;/code&gt;        #This will take some time.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Installing&lt;/b&gt; man to read &lt;b&gt;man pages&lt;/b&gt;: &lt;code&gt;#apt-get install man-db&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;ADDING NEW USERS&lt;/u&gt;&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;&lt;code&gt;#apt-get install adduser&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;adding user foo: &lt;code&gt;#adduser foo&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;becoming that user: &lt;code&gt;#su foo&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;INSTALLING AND CONFIGURING LOCALE SUPPORT&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;installing locales&lt;/b&gt;: &lt;code&gt;#apt-get install locales&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The &lt;b&gt;easier way to configure locales&lt;/b&gt; is, using dialog interface, executing: &lt;br /&gt;&lt;code&gt;#dpkg-reconfigure locales&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The &lt;b&gt;hard way to configure locales&lt;/b&gt; is editing some configuration files:&lt;br /&gt;&lt;br /&gt;we &lt;b&gt;edit locale.gen file&lt;/b&gt;: &lt;code&gt;#vi /etc/locale.gen&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;and &lt;b&gt;uncomment the locale we want to generate&lt;/b&gt;:&lt;br /&gt;e.g: &lt;code&gt;#es_ES.UTF-8 UTF-8&lt;/code&gt;    for Spain&lt;br /&gt;&lt;br /&gt;&lt;b&gt;generate locales&lt;/b&gt; with: &lt;code&gt;#locale-gen&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;After locales have been configured&lt;/u&gt;&lt;/b&gt; we can execute:&lt;br /&gt;&lt;br /&gt;show available locales: &lt;code&gt;#locale -a&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;selecting a locale: e.g: spanish locale: &lt;code&gt;#export LANG="es_ES.UTF-8"&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;showing current locale: &lt;code&gt;#locale&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;WAYS OF LAUNCHING OUR CHROOT ENVIRONMENT&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;STANDARD WAY&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo chroot DebianSid /bin/bash&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This method maintains a lot of variables from the original environment, I dont like it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;LOGGING IN WAY&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; To use this method you need to previously create a new user (with &lt;b&gt;adduser&lt;/b&gt;) and assign a password to root (with &lt;b&gt;passwd&lt;/b&gt;) because is not possible to log in as root user. &lt;b&gt;You will have to login as a standard user&lt;/b&gt; and then execute su command to become root.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;tty&lt;/b&gt; command tells &lt;b&gt;which terminal is standard output attached to&lt;/b&gt;: eg: /dev/pts/3&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo chroot DebianSid /sbin/getty 38400 `tty`&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;after you type sudo password you are offered a &lt;b&gt;login prompt&lt;/b&gt; to enter in the chroot environment.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;INSTALLING X-WINDOWS&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Installing x-windows: &lt;code&gt;#apt-get install xorg&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Copying xorg configuration file&lt;/b&gt; from Ubuntu:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo mv /etc/X11/xorg.conf DebianSid/etc/X11/&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;window manager: &lt;code&gt;#apt-get install ion2&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;starting X: &lt;code&gt;#startx /usr/bin/ion2 -- :1&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; if you cannot start the X server as a normal user change in &lt;b&gt;/etc/X11/Xwrapper.config&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;allowed_users=console&lt;/code&gt;      to    &lt;code&gt;allowed_users=anybody&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;SHOWING X APPLICATIONS IN THE UBUNTU DISPLAY&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;On ubuntu to allow connections&lt;/b&gt; from anyone:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$xhost +&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Better &lt;b&gt;open only local connections&lt;/b&gt;: (in Ubuntu)&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$hostname&lt;/code&gt;     #shows the hostname&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$xhost +local:`hostname`&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;now &lt;b&gt;in the chroot environtment&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$export DISPLAY=:0.0&lt;/code&gt;      # X display in Ubuntu.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$xclock&lt;/code&gt;  # an x window clock will show on the Ubuntu desktop screen.&lt;br /&gt;&lt;br /&gt;this will work because we have shared X11 socket through /tmp dir with Ubuntu.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;INSTALLING MPLAYER TO TEST VIDEO AND SOUND&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;After installing mplayer, video and sound should work fine:&lt;br /&gt;&lt;br /&gt;Installing mplayer: &lt;code&gt;#apt-get install mplayer&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;INSTALLING GNOME&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Installing gnome: &lt;code&gt;#apt-get install gnome&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Starting gdm: &lt;code&gt;#/etc/init.d/gdm start&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; There is a problem with some gnome-applets because their configuration are shared with Ubuntu.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;BOOTING FROM YOUR CHROOT ENVIRONMENT USING GRUB&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;At booting time you will be able to choose between booting from Ubuntu or from your chrooted Debian Sid.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You will have to &lt;b&gt;add some lines to /boot/grub/menu.lst&lt;/b&gt; file to boot from your chroot environment.&lt;br /&gt;Best idea is copying the lines at /boot/grub/menu.lst which ubuntu uses to boot Ubuntu and adapt them.&lt;br /&gt;&lt;br /&gt;These are from my system. You will have to &lt;b&gt;change 2.6.24-21 to your linux kernel version&lt;/b&gt;, &lt;b&gt;loop=/usr/local/DebianSidFile to your DebianSidFile location&lt;/b&gt;, and your &lt;b&gt;root device identifier&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;title           kernel 2.6.24-21-generic DebianSid Loop&lt;br /&gt;root            (hd0,0)&lt;br /&gt;kernel          /boot/vmlinuz-2.6.24-21-generic root=UUID=a31628c8-5402-4319-b9cd-6a6183d43bc5 loop=/usr/local/DebianSidFile ro &lt;br /&gt;initrd          /boot/initrd.img-2.6.24-21-generic&lt;br /&gt;quiet&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; You have to use an ubuntu initrd.img file in order to understand the loop option.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Copy&lt;/b&gt; the necessary &lt;b&gt;kernel modules into our chroot environment&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;$sudo cp -a /lib/modules/2.6.24-21-generic DebianSid/lib/modules&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And &lt;b&gt;reinstall grub&lt;/b&gt;: &lt;code&gt;$sudo grub-install /dev/sda&lt;/code&gt;     #supposing master boot record is in /dev/sda device.&lt;br /&gt;&lt;br /&gt;Now you can reboot your system into your chroot environment.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;REFERENCE:&lt;/b&gt; &lt;a href="http://ubuntuforums.org/showthread.php?t=24575"&gt;http://ubuntuforums.org/showthread.php?t=24575&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-6803321210950064695?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/6803321210950064695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=6803321210950064695' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6803321210950064695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6803321210950064695'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2008/09/debian-sid-ubuntu-debootstrap-chroot.html' title='Installing GNU/Debian Sid in Ubuntu Hardy using debootstrap and chroot'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1810057280041377847.post-5483287389977109718</id><published>2008-08-20T18:39:00.005+02:00</published><updated>2011-05-07T04:44:58.994+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mplayer'/><title type='text'>Joining two AVI files with MENCODER</title><content type='html'>It is usual having an &lt;b&gt;avi film split into two&lt;/b&gt; cdrom sized &lt;b&gt;files&lt;/b&gt; of 700 megabytes each. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;mencoder&lt;/b&gt; utility allows us to &lt;b&gt;concatenate these two parts&lt;/b&gt; into a new reintegrate file.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;mencoder&lt;/b&gt; (MPlayer's Movie Encoder) is a tool MPlayer provides to &lt;b&gt;encode multimedia contents&lt;/b&gt; into files. &lt;br /&gt;It &lt;b&gt;supports&lt;/b&gt; among others, &lt;b&gt;MPEG-4 video&lt;/b&gt;, libavcodec codecs, and &lt;b&gt;PCM/MP3/VBRMP3 audio&lt;/b&gt; formats. &lt;br /&gt;mencoder also possesses stream copying abilities and a powerful filter system (crop, expand, flip, ....).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So we have a &lt;b&gt;film split into two files&lt;/b&gt; e.g: foo1.avi and foo2.avi, both &lt;b&gt;with the same encoding&lt;/b&gt; characteristics (window size, codecs, bitrate...), &lt;br /&gt;&lt;br /&gt;We &lt;b&gt;execute this command&lt;/b&gt; that produces an output file called foo.avi which is the result of concatenating foo1.avi and foo2.avi files.&lt;br /&gt;&lt;b&gt;&lt;code&gt;$mencoder -oac copy -ovc copy -forceidx foo1.avi foo2.avi -o foo.avi&lt;/code&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The &lt;b&gt;command options&lt;/b&gt; mean:&lt;br /&gt;* &lt;b&gt;-oac&lt;/b&gt;  output audio codec&lt;br /&gt;* &lt;b&gt;-ovc&lt;/b&gt;  output video codec&lt;br /&gt;* &lt;b&gt;-o&lt;/b&gt;  output file name&lt;br /&gt;* &lt;b&gt;-forceidx&lt;/b&gt; forces creation of a new index.&lt;br /&gt;&lt;b&gt;copy&lt;/b&gt; means copying the original stream and do not change the codec it is encoded into (because of that it is very fast).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;more info&lt;/b&gt; executing: &lt;b&gt;&lt;code&gt;$man mencoder&lt;/code&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;INSTALLING MENCODER&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Ubuntu&lt;/b&gt; and &lt;b&gt;Debian&lt;/b&gt;: &lt;b&gt;&lt;code&gt;$sudo aptitude install mencoder&lt;/code&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://linuxclues.blogspot.com/2008/08/compile-configure-install-mplayer.html"&gt;Compiling, Configuring and Installing MPlayer on a Ubuntu (Linux based) System&lt;/a&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/1810057280041377847-5483287389977109718?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/5483287389977109718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=5483287389977109718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/5483287389977109718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/5483287389977109718'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2008/08/mencoder-joining-two-avi-files.html' title='Joining two AVI files with MENCODER'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-6792382604642466555</id><published>2008-08-15T14:02:00.012+02:00</published><updated>2009-10-04T11:17:25.279+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='mplayer'/><title type='text'>Downloading, Compiling and Installing MPlayer on a Ubuntu System</title><content type='html'>We are going to &lt;b&gt;download MPlayer sources and binary codecs, configure, compile and install them&lt;/b&gt; on our Ubuntu system.&lt;br /&gt; &lt;br /&gt;I do not want a graphical interface, so I will compile MPlayer without it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;DOWNLOADING MPLAYER SOURCES&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We first download the sources: (I pick up the latest source version, if it does not work pick up latest stable one)&lt;br /&gt;&lt;br /&gt;(I choose to download it from a German mirror:  &lt;a href="http://www.mplayerhq.hu/design7/dload.html#source"&gt;MPlayer source download page&lt;/a&gt;)&lt;br /&gt;&lt;code&gt;$wget http://www7.mplayerhq.hu/MPlayer/releases/mplayer-export-snapshot.tar.bz2&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;DOWNLOADING BINARY CODECS&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.mplayerhq.hu/design7/dload.html#binary_codecs"&gt;MPlayer binary codecs download page&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As I have a Linux x86 platform ,I choose its corresponding package:&lt;br /&gt;&lt;code&gt;$wget http://www7.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This page shows an updated list of supported codecs: &lt;a href="http://www.mplayerhq.hu/DOCS/codecs-status.html"&gt;Codec Status page&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In order to &lt;b&gt;&lt;u&gt;install the binary codecs&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We &lt;b&gt;create the directory where&lt;/b&gt; we will &lt;b&gt;place the codecs&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;$sudo mkdir /usr/local/lib/codecs&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We &lt;b&gt;untar the codecs and&lt;/b&gt; then &lt;b&gt;move them&lt;/b&gt; into their place:&lt;br /&gt;&lt;code&gt;$tar xvfj essential-20071007.tar.bz2&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$cd essential-20071007/&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$sudo cp * /usr/local/lib/codecs&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;CONFIGURING OSD FONTS&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To be able to &lt;b&gt;support truetype fonts&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;$sudo aptitude install libfreetype6-dev&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Look after this directory to &lt;b&gt;find some fonts on your system&lt;/b&gt;: &lt;i&gt;/usr/share/fonts/...&lt;/i&gt;&lt;br /&gt;To install some fonts: &lt;code&gt;$sudo aptitude install ttf-freefont&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now we &lt;b&gt;create a symlink to the font file&lt;/b&gt; we choose:&lt;br /&gt;&lt;code&gt;$cd&lt;/code&gt;  #We go to our home directory:&lt;br /&gt;&lt;code&gt;$mkdir .mplayer&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$cd .mplayer&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$ln -s /usr/share/fonts/truetype/freefont/FreeSans.ttf subfont.ttf&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Our subtitle font will be automatically selected&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; Another way to select a font file is using &lt;b&gt;-font&lt;/b&gt; switch when executing mplayer command.&lt;br /&gt;e.g:  &lt;code&gt;$mplayer &lt;b&gt;-font /usr/share/fonts/truetype/freefont/FreeSans.ttf&lt;/b&gt; -vo x11 -framedrop ....&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Some more &lt;a href="http://www.mplayerhq.hu/DOCS/HTML/en/fonts-osd.html"&gt;font configuration info&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;COMPILING MPLAYER SOURCES&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;First we &lt;b&gt;untar the sources&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;$tar xvfj mplayer-export-snapshot.tar.bz2&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$cd mplayer-export-2008-08-13/&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We choose and &lt;b&gt;add some video drivers&lt;/b&gt;:&lt;br /&gt;&lt;b&gt;x11 support&lt;/b&gt; ----&gt; &lt;code&gt;$sudo aptitude install libx11-dev libxext-dev&lt;/code&gt;&lt;br /&gt;&lt;b&gt;Xv support&lt;/b&gt; -----&gt; &lt;code&gt;$sudo aptitude install libxv-dev&lt;/code&gt;&lt;br /&gt;&lt;b&gt;AA library support&lt;/b&gt; ----&gt; &lt;code&gt;$sudo aptitude install libaa1-dev&lt;/code&gt;&lt;br /&gt;&lt;b&gt;Alsa sound support&lt;/b&gt; ----&gt; &lt;code&gt;$sudo aptitude install libasound2-dev&lt;/code&gt;&lt;br /&gt;&lt;b&gt;Add ogg theora support&lt;/b&gt; ----&gt; &lt;code&gt;$sudo aptitude install libogg-dev libtheora-dev&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Avoid X screensaver activation.&lt;br /&gt;&lt;code&gt;$sudo aptitude install libxss-dev&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And finally &lt;b&gt;configure, compile and install mplayer&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;$./configure&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$make&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$sudo make install&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now we can &lt;b&gt;enjoy our multimedia files&lt;/b&gt;:&lt;br /&gt;e.g &lt;code&gt;$mplayer -vo xv -framedrop -sub foo.srt foo.avi&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: If you want to &lt;b&gt;switch off MPlayer console messages&lt;/b&gt; pass this argument &lt;b&gt;-msglevel all=0&lt;/b&gt; when calling mplayer command.&lt;br /&gt;e.g &lt;code&gt;$mplayer -vo xv -framedrop &lt;b&gt;-msglevel all=0&lt;/b&gt; -sub foo.srt foo.avi&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You can obtain &lt;b&gt;more info&lt;/b&gt; executing &lt;code&gt;&lt;b&gt;$man mplayer&lt;/b&gt;&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: Mplayer also provides &lt;b&gt;mencoder&lt;/b&gt; utility, which you can use to &lt;b&gt;encode multimedia files&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;REFERENCE URLS:&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.mplayerhq.hu"&gt;MPlayer official site&lt;/a&gt;.&lt;br /&gt;&lt;a href="http://www.mplayerhq.hu/DOCS/README"&gt;Installation instructions&lt;/a&gt; from MPlayer site. This text is also available within MPlayer sources.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-6792382604642466555?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/6792382604642466555/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=6792382604642466555' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6792382604642466555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6792382604642466555'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2008/08/compile-configure-install-mplayer.html' title='Downloading, Compiling and Installing MPlayer on a Ubuntu System'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1810057280041377847.post-252615062346377187</id><published>2008-08-12T21:30:00.014+02:00</published><updated>2010-12-01T23:25:19.435+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sony-ericsson-k530i'/><category scheme='http://www.blogger.com/atom/ns#' term='internet'/><category scheme='http://www.blogger.com/atom/ns#' term='usb'/><title type='text'>Connecting to Internet using a Sony Ericsson K530i mobile phone in Ubuntu (Linux) via USB cable</title><content type='html'>We are going to &lt;b&gt;connect our Ubuntu system to Internet&lt;/b&gt; using a &lt;b&gt;Sony Ericsson K530i&lt;/b&gt; phone &lt;b&gt;via a usb cable&lt;/b&gt;. &lt;br /&gt;&lt;br /&gt;First of all we switch on our phone, we insert the pin number and then &lt;b&gt;connect the usb cable&lt;/b&gt; that came with the phone &lt;b&gt;to our K530i and to our computer&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;A menu presenting three choices will appear on the phone screen: &lt;br /&gt;&lt;ul&gt;&lt;li&gt;File transfer&lt;/li&gt;&lt;li&gt;Phone mode&lt;/li&gt;&lt;li&gt;Print&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;We select &lt;b&gt;Phone mode&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Now our phone is ready to use the usb cable.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There are &lt;b&gt;two ways to connect to Internet via USB&lt;/b&gt;:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Emulating a ethernet device&lt;/b&gt; through a usb cable.&lt;/li&gt;&lt;li&gt;Using the K530i mobile phone &lt;b&gt;as a usb serial modem&lt;/b&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;EMULATING A ETHERNET DEVICE THROUGH USB CABLE&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;Our system Linux kernel has to already be compiled with &lt;b&gt;cdc_ether module&lt;/b&gt; support. This module performs the emulation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let's &lt;b&gt;configure our phone&lt;/b&gt;, we go to: &lt;br /&gt;&lt;code&gt;Menu-&gt;Settings-&gt;Connectivity-&gt;USB-&gt;USB Internet-&gt;USB data accounts&lt;/code&gt;&lt;br /&gt;and select our Internet ISP provider account.&lt;br /&gt;&lt;br /&gt;If there is not an already configured account we shall create a new account:&lt;br /&gt;&lt;code&gt;Menu-&gt;Settings-&gt;Connectivity-&gt;Data comm.-&gt;Data accounts-&gt;New account&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Some &lt;b&gt;APN&lt;/b&gt;s from Spanish Internet providers are:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Movistar&lt;/b&gt;: movistar.es&lt;br /&gt;&lt;b&gt;Vodafone&lt;/b&gt;: ac.vodafone.es&lt;br /&gt;&lt;b&gt;Yoigo&lt;/b&gt;: internet&lt;br /&gt;&lt;b&gt;Orange&lt;/b&gt;: internet&lt;br /&gt;&lt;br /&gt;Usually user and password are not needed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;At the end, we establish the connection:&lt;br /&gt;&lt;b&gt;Menu-&gt;Settings-&gt;Connectivity-&gt;USB-&gt;USB Internet-&gt;Turn on&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To check what has happened, we open a console and execute:&lt;br /&gt;&lt;code&gt;$ifconfig&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;An interface like &lt;b&gt;usb0&lt;/b&gt; with its &lt;b&gt;IP address&lt;/b&gt; correctly configured will appear.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When we finish navigating, we switch off the connection:&lt;br /&gt;&lt;code&gt;Menu-&gt;Settings-&gt;Connectivity-&gt;USB-&gt;USB Internet-&gt;Turn off&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;USING THE K530i MOBILE PHONE AS A USB SERIAL MODEM&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;Our K530i phone will receive AT commands an will act as a USB serial modem.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First we install &lt;b&gt;wvdial&lt;/b&gt; package:&lt;br /&gt;&lt;code&gt;$sudo aptitude install wvdial&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If our modem is correctly connected through the usb cable some serial devices will show:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$ls -l /dev/ttyACM*&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;crw-rw---- 1 root dialout 166, 0 2008-08-12 19:50 /dev/ttyACM0&lt;br /&gt;crw-rw---- 1 root dialout 166, 1 2008-08-12 19:50 /dev/ttyACM1&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now we need to configure &lt;b&gt;wvdial&lt;/b&gt; so &lt;b&gt;we create in our home directory&lt;/b&gt; a file called &lt;b&gt;.wvdialrc&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;e.g:&lt;pre&gt;[Dialer Defaults]&lt;br /&gt;Phone = *99***1#&lt;br /&gt;username = ''&lt;br /&gt;password = ''&lt;br /&gt;Modem = /dev/ttyACM0&lt;br /&gt;Baud = 460800&lt;br /&gt;Stupid Mode = 1&lt;br /&gt;Init1 = ATZ&lt;br /&gt;Init3 = ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0&lt;br /&gt;ISDN = 0&lt;br /&gt;Modem Type = Analog Modem&lt;br /&gt;&lt;br /&gt;[Dialer Vodafone]&lt;br /&gt;Init4 = AT+CGDCONT=1,"IP","ac.vodafone.es";&lt;br /&gt;&lt;br /&gt;[Dialer Movistar]&lt;br /&gt;Init4 = AT+CGDCONT=1,"IP","movistar.es";&lt;br /&gt;&lt;br /&gt;[Dialer Yoigo]&lt;br /&gt;Init4 =AT+CGDCONT=1,"IP","internet";&lt;br /&gt;&lt;br /&gt;[Dialer Masmovil]&lt;br /&gt;Init4 =AT+CGDCONT=1,"IP","internetmas";&lt;br /&gt;&lt;br /&gt;[Dialer Simyo]&lt;br /&gt;Init4 =AT+CGDCONT=1,"IP","gprs-service.com";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[Dialer Pin]&lt;br /&gt;Init2 = AT+CPIN="8888"      #write your pin here.&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This configuration file will work for most Spanish ISPs.&lt;br /&gt;&lt;br /&gt;e.g: &lt;br /&gt;&lt;br /&gt;&lt;code&gt;$wvdial Vodafone&lt;/code&gt;   will establish the connection.&lt;br /&gt;&lt;br /&gt;or &lt;br /&gt;&lt;br /&gt;&lt;code&gt;$wvdial Vodafone Pin&lt;/code&gt;  for the first time, to set the pin number too.&lt;br /&gt;&lt;br /&gt;To stop it, simply press &lt;b&gt;ctrl+c&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;If your have &lt;b&gt;another provider&lt;/b&gt; you will have to &lt;b&gt;add an appropriate Init4 line with your provider APN&lt;/b&gt;. Some operators also change the &lt;b&gt;Phone number&lt;/b&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-252615062346377187?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/252615062346377187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=252615062346377187' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/252615062346377187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/252615062346377187'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2008/08/connect-internet-sony-ericsson-k530i.html' title='Connecting to Internet using a Sony Ericsson K530i mobile phone in Ubuntu (Linux) via USB cable'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-461330641216476465</id><published>2008-07-06T20:36:00.012+02:00</published><updated>2010-08-25T20:17:34.896+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lisp'/><category scheme='http://www.blogger.com/atom/ns#' term='hello world'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Hello World program examples</title><content type='html'>&lt;b&gt;Hello World&lt;/b&gt; is the first program every user usually codes when he learns a new programming language. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Its goal is learning&lt;/b&gt; the basics &lt;b&gt;to edit, compile and execute a program&lt;/b&gt; which sends a "hello world" string to standard output. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We have used an Ubuntu Hardy distro based system. Most commands will serve to other distros as well, like Debian.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;BASH Shell Scripting Hello World&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;bash&lt;/b&gt; command line interpreter is usually already installed in your system.&lt;br /&gt;&lt;br /&gt;if it is not installed we type: &lt;code&gt;$sudo aptitude install bash&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now we create &lt;b&gt;hello.sh&lt;/b&gt; script using whatever text editor we prefer.&lt;br /&gt;e.g: &lt;code&gt;$gedit hello.sh&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Copy this lines into your hello.sh script&lt;br /&gt;&lt;pre&gt;#!/bin/bash&lt;br /&gt;echo "hello world"&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Bash shell scripting is an interpreted language so we have not to compile anything. We directly execute the shell script file:&lt;br /&gt;&lt;br /&gt;We give the shell script execution permissions:&lt;br /&gt;&lt;code&gt;$chmod a+x hello.sh&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;and launch the program&lt;br /&gt;&lt;code&gt;$./hello.sh&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;PYTHON Scripting Hello World&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you do not have python installed in your system, exec:&lt;br /&gt;&lt;br/&gt;&lt;code&gt;$sudo aptitude install python&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Create a text file called &lt;b&gt;hello.py&lt;/b&gt; with your favorite editor and copy these lines:&lt;br /&gt;&lt;pre&gt;#!/usr/bin/python&lt;br /&gt;print "hello world"&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Because python is an interpreted language we execute directly the python script:&lt;br /&gt;&lt;br /&gt;Add execution permissions:&lt;br /&gt;&lt;code&gt;$chmod a+x hello.py&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Execute your hello world python script:&lt;br /&gt;&lt;code&gt;$./hello.py&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;C Language Hello World&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We need a compiler because C is a compiled language:&lt;br /&gt;&lt;code&gt;$sudo aptitude install gcc&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In order to be able to use standard input output system:&lt;br /&gt;&lt;code&gt;$sudo aptitude install libc6-dev&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Using our favorite text editor, we create &lt;b&gt;hello.c&lt;/b&gt; file.&lt;br /&gt;&lt;br /&gt;Copy this program within hello.c file:&lt;br /&gt;&lt;pre&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;&lt;br /&gt;main ()&lt;br /&gt;{&lt;br /&gt;  printf("hello world\n");&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;We &lt;b&gt;compile hello.c&lt;/b&gt; file to create &lt;b&gt;hello binary executable&lt;/b&gt; file:&lt;br /&gt;&lt;code&gt;$gcc -o hello hello.c&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Add execution permissions:&lt;br /&gt;&lt;code&gt;$chmod a+x hello&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Execute the binary file:&lt;br /&gt;&lt;code&gt;./hello&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;C++ Language Hello World&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;First we install the c++ compiler:&lt;br /&gt;&lt;code&gt;$sudo aptitude install g++&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This g++ virtual package installs the g++ compiler and also the c++ standard library:&lt;br /&gt;e.g: &lt;b&gt;g++-4.2, libstdc++6-4.2-dev&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Type this &lt;b&gt;hello.cc&lt;/b&gt; file copying this following code:&lt;br /&gt;&lt;pre&gt;#include &amp;lt;iostream&amp;gt;&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;   std::cout &amp;lt;&amp;lt; "Hello World\n";&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;We compile hello.cc program:&lt;br /&gt;&lt;code&gt;$g++ -o hello hello.cc&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We give execution permissions and execute hello binary file:&lt;br /&gt;&lt;code&gt;$chmod a+x hello&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$./hello&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;JAVA Hello World&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Java is a language which is compiled into intermediate code called &lt;b&gt;java bytecodes.&lt;/b&gt;&lt;br /&gt;Java bytecodes are executed in a runtime environment whose name is &lt;b&gt;Java Virtual Machine (JVM)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In order to install the &lt;b&gt;Java Virtual Machine&lt;/b&gt;&lt;br /&gt;&lt;code&gt;$sudo aptitude install openjdk-6-jre&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;and to install &lt;b&gt;javac&lt;/b&gt; java compiler.&lt;br /&gt;&lt;code&gt;$sudo aptitude install openjdk-6-jdk&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We create with a text editor a file called &lt;b&gt;HelloWorld.java&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: File name must be the same as the class, so we will call both HelloWorld&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;public class HelloWorld {&lt;br /&gt;    public static void main(String[] args) {&lt;br /&gt;        System.out.println("Hello World");&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Generating java bytecodes:&lt;br /&gt;&lt;code&gt;$javac -verbose HelloWorld.java&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;A file called &lt;b&gt;HelloWorld.class&lt;/b&gt; has been generated.&lt;br /&gt;&lt;br /&gt;We are going to execute it within the java virtual machine:&lt;br /&gt;&lt;code&gt;$java HelloWorld&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;EMACS LISP (ELISP) Hello World&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Lisp&lt;/b&gt; is an old programming language with a lot of &lt;b&gt;dialects&lt;/b&gt;.&lt;br /&gt;One of them is &lt;b&gt;ELISP&lt;/b&gt; which is the language &lt;b&gt;emacs&lt;/b&gt; editor is written with.&lt;br /&gt;&lt;br /&gt;First we open an emacs session:&lt;br /&gt;&lt;code&gt;$emacs&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now we &lt;b&gt;execute&lt;/b&gt; the command &lt;b&gt;eval-expression&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;C-:&lt;/code&gt;  or  &lt;code&gt;M-x eval-expression RET&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;in the minibuffer prompt we write:&lt;br /&gt;&lt;b&gt;(message "hello world") RET&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;and &lt;b&gt;"hello world"&lt;/b&gt; will appear in emacs mini buffer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Qt C++ Hello World&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://linuxclues.blogspot.com/2010/08/qt-library-introduction-hello-world.html"&gt;Beginning with Qt: Introduction, Installing Qt Framework, Qt Hello world&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-461330641216476465?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/461330641216476465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=461330641216476465' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/461330641216476465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/461330641216476465'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2008/07/hello-world-program-examples.html' title='Hello World program examples'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-4004247831571719909</id><published>2008-06-22T13:48:00.006+02:00</published><updated>2008-06-22T14:00:39.012+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>Emacs Quick Introduction</title><content type='html'>&lt;b&gt;Installing emacs in a Ubuntu or Debian distro&lt;/b&gt;&lt;br /&gt;&lt;code&gt;$sudo aptitude install emacs&lt;/code&gt;&lt;br /&gt; &lt;br /&gt;&lt;b&gt;Launching emacs&lt;/b&gt;&lt;br /&gt;&lt;code&gt;$emacs&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;If you want to launch emacs in a console without X support, simply exec:&lt;br /&gt;&lt;code&gt;$emacs -nw&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Notation:&lt;/b&gt;&lt;br /&gt;&lt;b&gt;C-x&lt;/b&gt;    means mantain pressed control key and then press x key.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Reseting input buffer&lt;/b&gt;&lt;br /&gt;&lt;b&gt;C-g&lt;/b&gt;    resets command input buffer. It is great if you mistyped a command.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Displacement commands:&lt;/b&gt;&lt;br /&gt;&lt;b&gt;C-n&lt;/b&gt;    goes to next line&lt;br /&gt;&lt;b&gt;C-p&lt;/b&gt;    goes to previous line&lt;br /&gt;&lt;b&gt;C-f&lt;/b&gt;    goes to next character&lt;br /&gt;&lt;b&gt;C-b&lt;/b&gt;    goes to previous character&lt;br /&gt;&lt;b&gt;C-a&lt;/b&gt;    goes to the begining of the line&lt;br /&gt;&lt;b&gt;C-e&lt;/b&gt;    goes to the end of the line&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Deleting, cutting and pasting text&lt;/b&gt;&lt;br /&gt;&lt;b&gt;C-d&lt;/b&gt;    deletes character under the cursor&lt;br /&gt;&lt;b&gt;C-k&lt;/b&gt;    cuts from the cursor position until the end of the line.&lt;br /&gt;&lt;b&gt;C-y&lt;/b&gt;    pastes previous cut text.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Undo command&lt;/b&gt;&lt;br /&gt;&lt;b&gt;C-x u&lt;/b&gt;    undoes previous command.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Dealing with files&lt;/b&gt;&lt;br /&gt;&lt;b&gt;C-x C-f&lt;/b&gt;  opens a file&lt;br /&gt;&lt;b&gt;C-x C-w&lt;/b&gt;  saves current file.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Closing emacs&lt;/b&gt;&lt;br /&gt;&lt;b&gt;C-x C-c&lt;/b&gt;  closes emacs.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Passing arguments to commands:&lt;/b&gt;&lt;br /&gt;E.g: &lt;b&gt;C-u 8 C-n&lt;/b&gt;   Advances eight lines.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Reading emacs self-documentation:&lt;/b&gt;&lt;br /&gt;&lt;b&gt;C-h t&lt;/b&gt;   opens emacs tutorial&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;These are the minimal set of commands to work with emacs like a notepad. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Emacs&lt;/b&gt; is an &lt;b&gt;extremely powerful and flexible&lt;/b&gt; text editor.  You are not even on the surface of emacs potential.  I recommend you to study and use it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-4004247831571719909?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/4004247831571719909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=4004247831571719909' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/4004247831571719909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/4004247831571719909'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2008/06/emacs-quick-introduction.html' title='Emacs Quick Introduction'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-1669575766909307170</id><published>2008-04-27T19:48:00.015+02:00</published><updated>2010-06-20T13:26:56.022+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mediawiki'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Backing and Restoring Mediawiki in Ubuntu</title><content type='html'>We are going to learn &lt;b&gt;how to back up and restore our &lt;a href="http://linuxclues.blogspot.com/2008/04/installing-configuring-mediawiki-ubuntu.html"&gt;Mediawiki installed on a Ubuntu system.&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To acomplish that we will execute some &lt;b&gt;wiki maintenance commands&lt;/b&gt;.&lt;br /&gt;These maintenance commands will be accesible after configuring &lt;b&gt;AdminSettings.php&lt;/b&gt; file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;CONFIGURING AdminSettings.php FILE&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;AdminSettings.sample&lt;/b&gt; from the Mediawiki examples documentation will serve us as a model file to start.&lt;br /&gt;&lt;br /&gt;We &lt;b&gt;copy it into mediawiki configuration directory in /etc and assign&lt;/b&gt; the correct owner and &lt;b&gt;permissions&lt;/b&gt;.&lt;br /&gt;&lt;code&gt;$sudo cp /usr/share/doc/mediawiki1.10/examples/AdminSettings.sample /etc/mediawiki1.10/AdminSettings.php&lt;br /&gt;$sudo chown root:root /etc/mediawiki1.10/AdminSettings.php&lt;br /&gt;$sudo chmod 600 /etc/mediawiki1.10/AdminSettings.php&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now we are going to &lt;b&gt;edit AdminSettings.php file&lt;/b&gt;&lt;br /&gt;&lt;code&gt;$gksudo gedit /etc/mediawiki1.10/AdminSettings.php&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Change these two variables&lt;/b&gt; using the parameters you used when creating the wiki database: e.g: wikiuser and its password.&lt;br /&gt;&lt;b&gt;$wgDBadminuser = 'DB user name'&lt;/b&gt;&lt;br /&gt;&lt;b&gt;$wgDBadminpassword = 'DB password'&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now that AdminSettings.php file is properly configured we are gonna back up and restore the wiki.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;BACKING UP THE WIKI&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;dumpBackup.php&lt;/b&gt; command will back up our wiki:&lt;br /&gt;&lt;code&gt;$cd /var/lib/mediawiki1.10/maintenance&lt;br /&gt;$sudo php dumpBackup.php --current &gt; ~/foo_backup.xml&lt;/code&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; &lt;i&gt;--full&lt;/i&gt; option backups history of pages, not only last version as &lt;i&gt;--current&lt;/i&gt; does.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;RESTORING THE WIKI&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;importDump.php&lt;/b&gt; is the command we need:&lt;br /&gt;&lt;code&gt;$cd /var/lib/mediawiki1.10/maintenance&lt;br /&gt;$sudo php importDump.php ~/foo_backup.xml&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;If after importing the xml file we still do not see anything in the wiki, we shall exec:&lt;br /&gt;&lt;code&gt;$sudo php rebuildrecentchanges.php&lt;/code&gt;&lt;br /&gt;or&lt;br /&gt;&lt;code&gt;$sudo php update.php&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: Those previous commands only back up and restore the text part of the wiki. They just create an xml with text.&lt;br /&gt;&lt;br /&gt;Following commands shows how to backup and restore images in your wiki:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;BACKING UP THE IMAGES OF YOUR WIKI&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: As now, the wiki is placed mostly in &lt;b&gt;/var/lib/mediawiki&lt;/b&gt; directory, we will assume the wiki is placed there, instead of /var/lib/mediawiki1.10 . This also suites better new wiki versions.&lt;br /&gt;&lt;br /&gt;We create the directory where we will store the wiki image files:&lt;br /&gt;&lt;code&gt;$mkdir image_backup_dir &amp;&amp; cd image_backup_dir&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;dumpUploads.php&lt;/b&gt; command shows all wiki image file locations.&lt;br /&gt;&lt;br /&gt;We use this command output to &lt;b&gt;copy&lt;/b&gt; all those &lt;b&gt;files to our storage directory&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;$sudo php /var/lib/mediawiki/maintenance/dumpUploads.php --base=$(pwd) | xargs -I foo cp 'foo' . -v&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;--base&lt;/b&gt; option tells dumpUploads.php command that all file places should be related to current directory.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;xargs -I foo cp 'foo' . -v&lt;/b&gt;  reads every file location from standard input and copies it to current directory.&lt;br /&gt;&lt;br /&gt;If there has been no error, our current directory is populated now with the wiki image and media files.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;RESTORING THE IMAGES OF YOUR WIKI&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Once you have created &lt;b&gt;image_backup_dir directory&lt;/b&gt; containing all the wiki image files we could restore them.&lt;br /&gt;&lt;br /&gt;We execute &lt;b&gt;importImages.php&lt;/b&gt; command and pass as argument the path to our image_backup_dir directory where all the images are:&lt;br /&gt;&lt;code&gt;$sudo php /var/www/mediawiki/maintenance/importImages.php image_backup_dir&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Your wiki will show now all the images.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-1669575766909307170?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/1669575766909307170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=1669575766909307170' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1669575766909307170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1669575766909307170'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2008/04/backup-restore-mediawiki-ubuntu.html' title='Backing and Restoring Mediawiki in Ubuntu'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1810057280041377847.post-6064888143787162955</id><published>2008-04-27T13:07:00.018+02:00</published><updated>2008-04-27T18:17:53.473+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mediawiki'/><title type='text'>Installing and Configuring Mediawiki on a Ubuntu Gutsy Desktop System</title><content type='html'>&lt;b&gt;Mediawiki&lt;/b&gt; is the web based tool (&lt;b&gt;wiki software&lt;/b&gt;) that Wikipedia uses to manage, store and serve its contents.&lt;br /&gt;&lt;br /&gt;Mediawiki is written in PHP, and in this installation we will use MySQL as database management system (although it can be configured to use PostgreSQL)&lt;br /&gt;&lt;br /&gt;Mediawiki is ditributed under the GNU GPL license.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;INSTALLING MEDIAWIKI&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;First step is &lt;b&gt;installing MySQL&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;$sudo aptitude install mysql-admin mysql-server&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;It will ask you for MySQL root password. Then choose a secure password and type it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now we &lt;b&gt;install Mediawiki itself&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;$sudo aptitude install mediawiki&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;It will automatically check for &lt;b&gt;apache and php dependencies&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Current mediawiki version is 1.10.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;At installation I get this &lt;b&gt;warning&lt;/b&gt;: &lt;br /&gt;&lt;code&gt;&lt;b&gt;apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName&lt;/b&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;There is some info in this &lt;a href="http://ubuntuforums.org/showthread.php?t=424573"&gt;thread at ubuntu forums&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;To get rid of the error:&lt;br /&gt;&lt;code&gt;$gksudo gedit /etc/apache2/httpd.conf&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;httpd.conf&lt;/b&gt; file is usually empty, and then we add this line:&lt;br /&gt;&lt;code&gt;ServerName localhost&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;After saving the file we check if the error is gone executing this command:&lt;br /&gt;&lt;code&gt;$sudo apache2ctl restart&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;SETTING MEDIAWIKI URL ALIAS&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Open apache.conf file:&lt;br /&gt;&lt;code&gt;$gksudo gedit /etc/mediawiki1.10/apache.conf&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Uncomment this line:&lt;br /&gt;&lt;code&gt;#Alias /mediawiki /var/lib/mediawiki1.10&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You can change &lt;b&gt;/mediawiki&lt;/b&gt; to whatever you wanna the wiki be named. e.g: /myWiki&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Restart the apache server&lt;/b&gt; with:&lt;br /&gt;&lt;code&gt;$sudo apache2ctl restart&lt;/code&gt;&lt;br /&gt;or &lt;br /&gt;&lt;code&gt;$sudo /etc/init.d/apache2 restart&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now you can navigate into your wiki:&lt;br /&gt;&lt;b&gt;http://localhost/mediawiki&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There will appear a page with a link saying: &lt;b&gt;"Please set up the wiki first."&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;It is okey. We click on the link so entering within the &lt;b&gt;wiki configuration page&lt;/b&gt;: &lt;code&gt;http://localhost/mediawiki/config/index.php&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;SETTING UP THE WIKI FOR THE FIRST TIME&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We are at the configuration page: &lt;code&gt;http://localhost/mediawiki/config/index.php&lt;/code&gt; and we assign adequated values for:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Wiki name:&lt;/i&gt;  this name will appear at the top of your wiki pages.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;e-mail, language, ...&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Admin username:&lt;/i&gt; &lt;b&gt;WikiSysop&lt;/b&gt; by default. This user will have all the privileges to mantain the wiki.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Admin password&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I want a very simple configuration so I disable all email settings. So I won't be notified when a wiki page is changed, etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;At &lt;b&gt;database configuration&lt;/b&gt; part I leave the defaults: &lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; If you have an account and database already created, you can introduce those values here.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;type: MySQL&lt;br /&gt;host: localhost&lt;br /&gt;name: wikidb &lt;br /&gt;username: wikiuser&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I choose and set a password for this database user.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As I have no previously created a user and a database and I am very lazy and want mysql root user to create them, so I check superuser account:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Superuser account: checked&lt;br /&gt;Superuser name: root&lt;br /&gt;Superuser password: MySQL root password.&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let's go and click: &lt;code&gt;Install Mediawiki!&lt;/code&gt; button&lt;br /&gt;&lt;br /&gt;We arrive to a page that says &lt;b&gt;Installation successful! &lt;/b&gt; if everything has gone fine&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Next and last step is configuring &lt;b&gt;LocalSettings.php&lt;/b&gt; file:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;CONFIGURING LocalSettings.php FILE&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;There is comprehensive info about &lt;b&gt;configuring LocalSettings.php file&lt;/b&gt; at &lt;a href="http://www.mediawiki.org/wiki/Manual:LocalSettings.php"&gt;Manual:LocalSettings.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Checking out &lt;b&gt;DefaultSettings.php&lt;/b&gt; file may also be interesting. It can be found at:&lt;br /&gt;&lt;code&gt;/var/lib/mediawiki1.10/includes/DefaultSettings.php&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We begin editing the file:&lt;br /&gt;&lt;code&gt;$gksudo gedit /var/lib/mediawiki1.10/config/LocalSettings.php&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We are gonna &lt;b&gt;allow file uploads&lt;/b&gt; to our wiki:&lt;br /&gt;&lt;br /&gt;search this variable &lt;b&gt;$wgEnableUploads&lt;/b&gt; at LocalSettings.php file and &lt;b&gt;set it to true&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;$wgEnableUploads = true&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;GROUP CONFIGURATION&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This wiki group configuration is going to be very simple. It consists on &lt;b&gt;two user types&lt;/b&gt;, &lt;b&gt;logged ones&lt;/b&gt; and &lt;b&gt;anonymous users&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Anonymous users will be able to navigate through the wiki but will be unable to change or edit anything.&lt;br /&gt;&lt;br /&gt;Logged users will be capable of reading, editing, uploading files, creating new wiki pages and creating new accounts for their friends. :)&lt;br /&gt;&lt;br /&gt;Only WikiSysop will have privileges enough to delete or rename wiki pages.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In order to obtain this configuration, we have to copy this lines at the end of LocalSettings.php file:&lt;br /&gt;&lt;pre&gt;#Global permissions (anonymous users too)&lt;br /&gt;&lt;br /&gt;$wgGroupPermissions['*' ]['createaccount'] = false;&lt;br /&gt;$wgGroupPermissions['*' ]['read'] = true;&lt;br /&gt;$wgGroupPermissions['*' ]['edit'] = false;&lt;br /&gt;$wgGroupPermissions['*' ]['delete'] = false;&lt;br /&gt;$wgGroupPermissions['*' ]['createpage'] = false;&lt;br /&gt;$wgGroupPermissions['*' ]['upload'] = false;&lt;br /&gt;$wgGroupPermissions['*' ]['move'] = false;&lt;br /&gt;&lt;br /&gt;#Logged users&lt;br /&gt;&lt;br /&gt;$wgGroupPermissions['user' ]['createaccount'] = true;&lt;br /&gt;$wgGroupPermissions['user' ]['read'] = true;&lt;br /&gt;$wgGroupPermissions['user' ]['edit'] = true;&lt;br /&gt;$wgGroupPermissions['user' ]['delete'] = false;&lt;br /&gt;$wgGroupPermissions['user' ]['createpage'] = true;&lt;br /&gt;$wgGroupPermissions['user' ]['upload'] = true;&lt;br /&gt;$wgGroupPermissions['user' ]['move'] = false;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;more info at:&lt;br /&gt;&lt;a href="http://www.mediawiki.org/wiki/Manual:$wgGroupPermissions"&gt;Manual:$wgGroupPermissions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;MOVING LocalSettings.php TO /etc&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Finally we &lt;b&gt;place LocalSettings.php&lt;/b&gt; file at &lt;b&gt;/etc&lt;/b&gt; directory with its &lt;b&gt;adequate permissions&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$cd /var/lib/mediawiki1.10&lt;br /&gt;$sudo chown root:www-data LocalSettings.php&lt;br /&gt;$sudo mv config/LocalSettings.php /etc/mediawiki1.10/&lt;br /&gt;$sudo chmod 0640 /etc/mediawiki1.10/LocalSettings.php&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CREATING A NORMAL USER ACCOUNT&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Our wiki setup is completed!&lt;br /&gt;We type &lt;code&gt;http://localhost/mediawiki&lt;/code&gt; at the navigator and access to the wiki.&lt;br /&gt;&lt;br /&gt;First time, we will have to enter using WikiSysop account and create a normal user one.&lt;br /&gt;To do that, once you have logged as WikiSysop, go to &lt;b&gt;Special pages&lt;/b&gt; and then to &lt;b&gt;Log in / create account&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Enjoy your wiki!!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Most info comes from Mediawiki site:&lt;br /&gt;&lt;a href="http://www.mediawiki.org/wiki/Installing_MediaWiki_on_Ubuntu_7.10_via_GUI_and_Synaptic"&gt;Installing_MediaWiki_on_Ubuntu_7.10_via_GUI_and_Synaptic&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-6064888143787162955?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/6064888143787162955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=6064888143787162955' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6064888143787162955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6064888143787162955'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2008/04/installing-configuring-mediawiki-ubuntu.html' title='Installing and Configuring Mediawiki on a Ubuntu Gutsy Desktop System'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-6312448377516673308</id><published>2008-03-30T01:22:00.005+01:00</published><updated>2008-03-30T01:42:15.607+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='filesystems'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>Linux System Directories and their Filesystems</title><content type='html'>Executing &lt;b&gt;&lt;code&gt;ls /&lt;/code&gt;&lt;/b&gt; lists the top level of the root filesystem tree. There appear directories like:&lt;br /&gt;&lt;b&gt;/dev, /etc, /proc, /sys, /var, /tmp&lt;/b&gt; and others. &lt;br /&gt;&lt;br /&gt;In this article we are going to deal with &lt;b&gt;directories that have special filesystems associated&lt;/b&gt; with them.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;For a &lt;b&gt;general view of the filesystem hierarchy&lt;/b&gt; we can visit the &lt;a href="http://www.pathname.com/fhs/pub/fhs-2.3.html"&gt; Filesystem Hierarchy Standard&lt;/a&gt; page.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;FHS&lt;/b&gt; standard is a set of guidelines about where to place files and directories within UNIX based operating systems.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Seeing which filesystems are mounted&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Two commands allow us to see which filesystems and where are currently mounted in our system. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;code&gt;$mount&lt;/code&gt;&lt;/b&gt;&lt;br /&gt;or &lt;br /&gt;&lt;b&gt;&lt;code&gt;$cat /etc/mtab&lt;/code&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Their response will be something like that:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; /dev/sda1 on / type ext3 (rw,errors=remount-ro)&lt;br /&gt; proc on /proc type proc (rw,noexec,nosuid,nodev)&lt;br /&gt; /sys on /sys type sysfs (rw,noexec,nosuid,nodev)&lt;br /&gt; varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)&lt;br /&gt; varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)&lt;br /&gt; udev on /dev type tmpfs (rw,mode=0755)&lt;br /&gt; devshm on /dev/shm type tmpfs (rw)&lt;br /&gt; devpts on /dev/pts type devpts (rw,gid=5,mode=620)&lt;br /&gt; lrm on /lib/modules/2.6.22-14-generic/volatile type tmpfs (rw)&lt;br /&gt; securityfs on /sys/kernel/security type securityfs (rw)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;We are interested specially in &lt;code&gt;&lt;b&gt; /proc, /sys, /var/run, /var/lock, /dev, /dev/shm, /dev/pts, /sys/kernel/security&lt;/b&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;/proc&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;procfs&lt;/b&gt; is a virtual file system, dynamically created in memory. It is usually mounted in &lt;b&gt;/proc&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;The proc file system provides an &lt;b&gt;interface to kernel internal data structures&lt;/b&gt;. It allow us obtain information about the system and change certain kernel parameters at runtime (sysctl)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;It can be accessed in a text mode way:&lt;br /&gt;&lt;br /&gt;e.g: &lt;b&gt;&lt;code&gt;$cat /proc/meminfo&lt;/code&gt;&lt;/b&gt; #shows how memory is distributed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;/proc/sys&lt;/b&gt; directory allows us change kernel parameters. &lt;br /&gt;&lt;br /&gt;e.g &lt;b&gt;&lt;code&gt;sudo echo "fooname" &gt; /proc/sys/kernel/hostname&lt;/code&gt;&lt;/b&gt;  #changes your box hostname.   &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Every process has a subdirectory at proc filesystem named by its pid.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;mounting proc filesystem&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;code&gt;$mount -t proc proc /mnt/proc&lt;/code&gt;&lt;/b&gt;   # This command mounts a proc filesystem at /mnt/proc&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;/sys&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;sysfs is a ram-based filesystem initially based on ramfs. It provides&lt;br /&gt;a means to export kernel data structures, their attributes, and the &lt;br /&gt;linkages between them to userspace. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;mounting sys filesystem&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;code&gt;$mount -t sysfs sysfs /sys &lt;/code&gt;&lt;/b&gt;   # The sys filesystem is always compiled and with this command you can access it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;tmpfs&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Basically, tmpfs is a type of filesystem which uses RAM (and swap) as its device, but it is dynamically allocated, unlike a ramdisk. Therefore, it only takes as much RAM as it needs.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;tmpfs&lt;/b&gt; is a filesystem, not a block device; you just mount it, and it's there. You don't need to use mkfs command.&lt;br /&gt;&lt;br /&gt;This filesystem is used in several files and devices like /tmp, /dev/shm, etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Mounting a tmpfs filesystem&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;code&gt;$sudo mount -t tmpfs tmpfs /mnt/tmpfs&lt;/code&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;/mnt/tmpfs will initially have a very small capacity, but as files are copied and created, the tmpfs filesystem driver will allocate more VM and will dynamically increase the filesystem capacity as needed. And, as files are removed from /mnt/tmpfs, the tmpfs filesystem driver will dynamically shrink the size of the filesystem and free VM resources, and by doing so return VM into circulation so that it can be used by other parts of the system as needed&lt;br /&gt;&lt;br /&gt;Speed is the great advantage of tmpfs. As it usually resides in ram, accesses are almost instantaneous. Swap also provides good performance.&lt;br /&gt;&lt;br /&gt;tmpfs is not preserved between reboots, because ram memory is volatile.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In order to avoid virtual memory exhaustion we can pass tmpfs size as an option:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;code&gt;$mount tmpfs /tmp -t tmpfs -o size=64m&lt;/code&gt;&lt;/b&gt; # Limits its size to 64 megabytes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;More info at:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ibm.com/developerworks/library/l-fs3.html#2"&gt;http://www.ibm.com/developerworks/library/l-fs3.html#2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;/dev&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In Unix philosophy every device is attached to a file.&lt;br /&gt;&lt;b&gt;/dev&lt;/b&gt; directory is the place where device files are located. &lt;br /&gt;&lt;br /&gt;http://en.wikipedia.org/wiki/Udev&lt;br /&gt;&lt;br /&gt;&lt;b&gt;udev&lt;/b&gt; is the device manager for the Linux 2.6 kernel series. Its primary function is managing device nodes in /dev. It is the successor of devfs and hotplug, which means that it handles the /dev directory and all user space actions when adding/removing devices, including firmware load.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;code&gt;$mount -t tmpfs udev /dev&lt;/code&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;/dev/pts&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The devpts file system provides an interface to pseudo terminal (pty) devices. It is typically mounted at /dev/pts. A new pty device file is dynamically created when the /dev/ptmx pty master multiplex device is opened.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;code&gt;$mount -t devpts devpts /dev/pts&lt;/code&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;/dev/shm&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This device implements POSIX shared memory.&lt;br /&gt;&lt;br /&gt;E.g: Shared memory can be used as a quick way to share data between programs.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;code&gt;$mount -t tmpfs shm /dev/shm&lt;/code&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;/tmp&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This place is where programs store their temporary files. It is not guaranteed that data will be preserved between program invocations.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;/tmp&lt;/b&gt; should be cleared by the system every boot.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;code&gt;$sudo mount -t tmpfs tmpfs /tmp&lt;/code&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;securityfs&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This is a filesystem used by linux kernel security modules.&lt;br /&gt;It is mounted in &lt;b&gt;/sys/kernel/security&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;code&gt;mount -t securityfs securityfs /sys/kernel/security&lt;/code&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;/var/run&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;Contains system information data and it is cleared every system boot.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;code&gt;mount -t tmpfs varrun /var/run&lt;/code&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;/var/lock&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Lock files&lt;/b&gt; should be placed in this directory.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;code&gt;mount -t tmpfs varlock /var/lock&lt;/code&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;There is some good info in the &lt;b&gt;kernel documentation&lt;/b&gt; about filesystems.&lt;br /&gt;&lt;br /&gt;To read it, run these commands:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo aptitude install linux-doc-2.6.22&lt;br /&gt;$zless /usr/share/doc/linux-doc-2.6.22/Documentation/filesystems/proc.txt.gz&lt;br /&gt;$zless /usr/share/doc/linux-doc-2.6.22/Documentation/filesystems/sysfs.txt.gz&lt;br /&gt;$zless /usr/share/doc/linux-doc-2.6.22/Documentation/filesystems/tmpfs.txt.gz&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; Substitute 2.6.22 by your linux version.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-6312448377516673308?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/6312448377516673308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=6312448377516673308' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6312448377516673308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6312448377516673308'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2008/03/linux-system-directories-and-their.html' title='Linux System Directories and their Filesystems'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-6738507527400362272</id><published>2008-03-26T10:16:00.007+01:00</published><updated>2008-04-07T19:16:32.401+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Reverse Engineering Python Code with PyNSource</title><content type='html'>PyNSource is a tool that allow us to &lt;b&gt;obtain UML diagrams from python source code&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.atug.com/andypatterns/pynsource.htm"&gt; PyNSource Web Page &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;INSTALLING PyNSource ON AN UBUNTU GUTSY SYSTEM.&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; You must have &lt;b&gt;python&lt;/b&gt; already installed in your system. I assume 2.5 version.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$mkdir PyNSource&lt;br /&gt;$cd PyNSource&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Now we download the program and install it:&lt;/b&gt;&lt;br /&gt;&lt;code&gt;$wget http://www.atug.com/downloads/pynsource1.4c.zip&lt;br /&gt;$unzip pynsource1.4c.zip&lt;br /&gt;$sudo python setup.py install&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;We want to run the GUI so we need a graphical library:&lt;/b&gt;&lt;br /&gt;&lt;code&gt;$sudo aptitude install python2.5-wxgtk2.6&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Current code does not work with version wxgtk2.6 so we need to update it:&lt;/b&gt;&lt;br /&gt;&lt;code&gt;$wget http://www.atug.com/andypatterns/code/pyNsourceGui1.4c-wx26.zip&lt;br /&gt;$unzip pyNsourceGui1.4c-wx26.zip&lt;br /&gt;$sudo cp pyNsourceGui-wx26.py /usr/lib/python2.5/site-packages/pynsource/&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Finally we exec the GUI module&lt;/b&gt;&lt;br /&gt;&lt;code&gt;$python /usr/lib/python2.5/site-packages/pynsource/pyNsourceGui-wx26.py&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This application presents &lt;b&gt;some annoying bugs:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;* There are problems when moving shapes on the screen. It does not refresh correctly.&lt;br /&gt;* It is difficult to adjust page size when you try to print it.&lt;br /&gt;* When you press right click button on the mouse to delete an object, usually it doesn't delete all the arrows that point to it, messing the schema.&lt;br /&gt;* Saving and opening diagram feature is not implemented yet, so you cannot save temporary work.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Well, you know, this bugs are annoying, but it you dont like them, it is free software, so hack the code. :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-6738507527400362272?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/6738507527400362272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=6738507527400362272' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6738507527400362272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6738507527400362272'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2008/03/reverse-engineering-python-code-with.html' title='Reverse Engineering Python Code with PyNSource'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-1554646212724645268</id><published>2008-03-14T21:35:00.016+01:00</published><updated>2008-03-14T22:09:14.944+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gnu'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>GNU Readline Library Short Description</title><content type='html'>&lt;b&gt;GNU Readline&lt;/b&gt; is a software library that provides a set of functions that &lt;b&gt;allow users to edit command lines as they are typed in.&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;Every program that uses this library provides the same user command line interface improving consistency between applications.&lt;br /&gt;&lt;br /&gt;It is part of the GNU Project and it is licensed under the GPL.&lt;br /&gt;&lt;br /&gt;Current &lt;b&gt;version is 5.2&lt;/b&gt; and it is used in projects like &lt;b&gt;bash&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;There are &lt;b&gt;two editing modes&lt;/b&gt; available: &lt;b&gt;Emacs&lt;/b&gt; (default) and &lt;b&gt;Vi&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Readline library includes additional functions to &lt;b&gt;maintain a list of previously-entered command lines.&lt;/b&gt;&lt;br /&gt;Exec this command to obtain more info about this feature: &lt;br /&gt;&lt;code&gt;&lt;b&gt;$help history&lt;/code&gt;&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;INSTALLATION&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;In Debian and Ubuntu this library is packed in &lt;b&gt;readline-common&lt;/b&gt; package.&lt;br /&gt;&lt;code&gt;&lt;b&gt;$sudo aptitude install readline-common&lt;/b&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Once installed, you can access a complete documentation using info command:&lt;br /&gt;&lt;code&gt;&lt;b&gt;$info rluserman&lt;/b&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;SHORT KEYSTROKE REMINDER&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTATION:&lt;/b&gt;&lt;br /&gt; &lt;code&gt;&lt;b&gt;C-k&lt;/b&gt;&lt;/code&gt; means while &lt;b&gt;ctrl&lt;/b&gt; key is mantained pressed, depress &lt;b&gt;'k'&lt;/b&gt; key.&lt;br /&gt; &lt;code&gt;&lt;b&gt;M-k&lt;/b&gt;&lt;/code&gt; means while &lt;b&gt;"meta"&lt;/b&gt; key is pressed, depress &lt;b&gt;'k'&lt;/b&gt; key.&lt;br /&gt;&lt;br /&gt;Usually &lt;b&gt;"meta"&lt;/b&gt; refers to &lt;b&gt;ALT&lt;/b&gt; key, but if you have no meta key you can use &lt;b&gt;ESC&lt;/b&gt; key instead. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Emacs mode commmands:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Movement&lt;/u&gt;&lt;br /&gt;&lt;br /&gt; &lt;b&gt;C-b&lt;/b&gt;     Move back the cursor one character. &lt;br /&gt; &lt;b&gt;C-f&lt;/b&gt;     Move one character forward. &lt;br /&gt; &lt;b&gt;DEL or Backspace&lt;/b&gt;     Delete the character placed left at the cursor.&lt;br /&gt; &lt;b&gt;C-d&lt;/b&gt;     Delete the character underneath the cursor. &lt;br /&gt; &lt;b&gt;C-_ or C-x C-u&lt;/b&gt;    Undo the last editing command.&lt;br /&gt;&lt;br /&gt; &lt;b&gt;C-a&lt;/b&gt;    Move to the beginning of the line. &lt;br /&gt; &lt;b&gt;C-e&lt;/b&gt;     Move to the end of the line. &lt;br /&gt; &lt;b&gt;M-f&lt;/b&gt;     Move forward a word.&lt;br /&gt; &lt;b&gt;M-b&lt;/b&gt;     Move backward a word. &lt;br /&gt; &lt;b&gt;C-l&lt;/b&gt;     Clear the screen, reprinting the current line at the top.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Killing and yanking (cutting and pasting) commands&lt;/u&gt;&lt;br /&gt;&lt;br /&gt; &lt;b&gt;C-k&lt;/b&gt;     Kill the text from the current cursor position to the end of the line.&lt;br /&gt; &lt;b&gt;M-d&lt;/b&gt;     Kill from the cursor to the end of the current word.&lt;br /&gt; &lt;b&gt;M-DEL&lt;/b&gt;   Kill from the cursor the start of the current word.&lt;br /&gt; &lt;b&gt;C-w&lt;/b&gt;     Kill from the cursor to the previous whitespace.&lt;br /&gt;&lt;br /&gt;After killing(cutting) text, we yank(paste) it back into the line.&lt;br /&gt;&lt;br /&gt; &lt;b&gt;C-y&lt;/b&gt;     Yank the most recently killed text back into the buffer at the cursor.&lt;br /&gt; &lt;b&gt;M-y&lt;/b&gt;     Rotate the kill-ring, and yank the new top. You can only do this if the prior command is C-y or M-y. &lt;br /&gt;&lt;br /&gt;&lt;u&gt;Searching commands&lt;/u&gt;&lt;br /&gt;&lt;br /&gt; &lt;b&gt;C-r&lt;/b&gt;     Searchs backwards on the previous commands you typed.&lt;br /&gt; &lt;b&gt;C-s&lt;/b&gt;     Perform a forward search from the command line history you are now.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Passing arguments to a command&lt;/u&gt;&lt;br /&gt;&lt;br /&gt; e.g: &lt;b&gt;M-2 3 C-d&lt;/b&gt; means delete next 23 characters on input line. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;CONFIGURING THE LIBRARY&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;GNU Readline keybindings and more can be changed editing &lt;b&gt;~/.initrc&lt;/b&gt; or &lt;b&gt;/etc/initrc&lt;/b&gt; files.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;URLs&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;a href="http://tiswww.case.edu/php/chet/readline/rltop.html"&gt;GNU Readline Official page&lt;/a&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Readline"&gt;GNU Readline (Wikipedia)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://tiswww.case.edu/php/chet/readline/readline.html"&gt;Official online Readline documentation&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-1554646212724645268?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/1554646212724645268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=1554646212724645268' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1554646212724645268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1554646212724645268'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2008/03/gnu-readline-library-short-description.html' title='GNU Readline Library Short Description'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-3943500351156975189</id><published>2008-02-19T13:07:00.009+01:00</published><updated>2008-02-20T20:02:46.587+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>Bash tips II</title><content type='html'>&lt;u&gt;&lt;b&gt;RETYPING A COMMAND YOU TYPED SEVERAL LINES BEFORE&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;Sometimes you have to type a command you typed before, but you don't want to write it again, or don't remember exactly what you wrote on your command prompt. &lt;br /&gt;Solution is easy, we are gonna use &lt;b&gt;reverse search&lt;/b&gt;!&lt;br /&gt;&lt;br /&gt;Press the keys: &lt;code&gt;&lt;b&gt;ctrl+r&lt;/b&gt;&lt;/code&gt; and then type part of the command you want to retype.&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt;It is not necessary to write the beginning of the command, you can write whatever part you want for reverse search.&lt;br /&gt;&lt;br /&gt;If &lt;b&gt;reverse search&lt;/b&gt; has found a command but it is not the one you were searching for, type &lt;b&gt;ctrl+r&lt;/b&gt; again till you find it, or write a better part of the command at search time.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now we have found the command, we have two options:&lt;br /&gt;- pressing enter, the command will be executed  &lt;br /&gt;- pressing &lt;b&gt;tab&lt;/b&gt; key we will be able to edit this command at the bash prompt prior to its execution.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;CHANGING INTO ANOTHER DIRECTORY but memorizing where we are now in order to return later easily&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;This is useful if you have long weird named paths.&lt;br /&gt;&lt;br /&gt;We are now located at foo directory:   &lt;br /&gt;&lt;code&gt;:/foo$pwd&lt;br /&gt;/foo&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We want to change into &lt;i&gt;bar&lt;/i&gt; directory, instead of using &lt;b&gt;cd&lt;/b&gt; command we use &lt;b&gt;pushd&lt;/b&gt;&lt;br /&gt;&lt;code&gt;:/foo$pushd /bar&lt;/code&gt;&lt;br /&gt;   &lt;br /&gt;Now we are in /bar directory:&lt;br /&gt;&lt;code&gt;:/bar$pwd&lt;br /&gt;/bar&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;In order to return to prior foo directory we only have to run &lt;b&gt;popd&lt;/b&gt; command.&lt;br /&gt;&lt;code&gt;:/bar$popd&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;:foo$pwd&lt;br /&gt;   /foo&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;CHECKING FOR BAD BLOCKS IN A PARTITION&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;Sometimes we want to check the blocks of a hard disk we have just bought, or whatever...&lt;br /&gt;&lt;br /&gt;We have two options:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;First time, when creating the filesystem with &lt;b&gt;'-c'&lt;/b&gt; option&lt;br /&gt;&lt;br /&gt;e.g: &lt;code&gt;mkefs.ext3 &lt;b&gt;-c&lt;/b&gt; -b 4096 -L foo /dev/sdb2&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;If the filesystem at this partition has been already created we can use &lt;b&gt;badblocks&lt;/b&gt; command.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; Read carefully &lt;b&gt;badblocks&lt;/b&gt; man page, &lt;code&gt;$man badblocks&lt;/code&gt; before doing anything potentially harmfull.&lt;br /&gt;&lt;br /&gt;e.g: &lt;code&gt;sudo &lt;b&gt;badblocks&lt;/b&gt; -v /dev/sdb2&lt;/code&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/1810057280041377847-3943500351156975189?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/3943500351156975189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=3943500351156975189' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/3943500351156975189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/3943500351156975189'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2008/02/bash-tips-ii.html' title='Bash tips II'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-7588206517291270175</id><published>2007-09-02T11:29:00.006+02:00</published><updated>2010-03-07T10:23:06.759+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tvants'/><category scheme='http://www.blogger.com/atom/ns#' term='video_streaming'/><category scheme='http://www.blogger.com/atom/ns#' term='wine'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>TVAnts on Ubuntu</title><content type='html'>&lt;b&gt;TVAnts&lt;/b&gt; is a &lt;b&gt;peer to peer program&lt;/b&gt; that allows you to &lt;b&gt;share live streams&lt;/b&gt; instead of files.&lt;br /&gt;Although these streams can contain any sort of media they are mostly used for watching live football matches and other events on PCs.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;TVAnts pages:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.tvants-ppstream.com/"&gt;www.tvants-ppstream.com&lt;/a&gt;&lt;br /&gt;Official TVAnts page is written in chinese: &lt;a href="http://tvants.com/"&gt;tvants.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Installing TVAnts:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Download TVAnts setup program: ( I have obtained this address from official TVAnts page.)&lt;br /&gt;&lt;code&gt;$wget http://88.191.73.231/~cali/tvants/TvantsSetup.exe&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We need &lt;b&gt;wine&lt;/b&gt; to run TVAnts setup program because it is a microsoft windows executable:&lt;br /&gt;&lt;code&gt;$sudo aptitude install wine&lt;/code&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; # if you have not already installed wine program.&lt;br /&gt;&lt;code&gt;$wine "TvantsSetup.exe"&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;It will install itself, and then we will be able to exec the program:&lt;br /&gt;&lt;code&gt;$wine ~/.wine/drive_c/Program\ Files/TVAnts/Tvants.exe &lt;/code&gt;&lt;br /&gt;or&lt;br /&gt;&lt;code&gt;$wine 'C:\Program Files\TVAnts\Tvants.exe' &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Watching TV:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You will need at least one server at server tab. &lt;br /&gt;e.g: &lt;em&gt;list.tvants.com&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;At search tab you will be able to search for hundreds of channels. &lt;br /&gt;Select some and add them to channel tab.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; Do not worry about error messages related to windows media player, we will use &lt;b&gt;mplayer&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;You can watch the channel you have selected runing in the console:&lt;br /&gt;&lt;code&gt;$mplayer -framedrop mms://localhost:16900/1&lt;/code&gt;&lt;br /&gt;Last &lt;b&gt;"1"&lt;/b&gt;  means first channel from your selected channels list.&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; Whenever you add a new channel this number increases in one, even if you delete previous unused channels.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; TVAnts is a peer to peer system so you should &lt;b&gt;open 16800 port&lt;/b&gt; on your box to share streams you are watching with other users.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; You can also watch the tv streams using vlc instead of mplayer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-7588206517291270175?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/7588206517291270175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=7588206517291270175' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/7588206517291270175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/7588206517291270175'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/09/tvants-on-ubuntu.html' title='TVAnts on Ubuntu'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1810057280041377847.post-7772423118260093191</id><published>2007-08-21T13:47:00.000+02:00</published><updated>2007-08-21T13:51:28.609+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='grid computing'/><title type='text'>GRID Computing</title><content type='html'>It looks &lt;b&gt;fascinating!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ibm.com/developerworks/grid/newto/"&gt;Introduction to &lt;b&gt;grid computing&lt;/b&gt;&lt;/a&gt; (IBM papers)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-7772423118260093191?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/7772423118260093191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=7772423118260093191' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/7772423118260093191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/7772423118260093191'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/08/grid-computing.html' title='GRID Computing'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-7323401344413331992</id><published>2007-08-19T14:38:00.000+02:00</published><updated>2007-08-20T15:55:18.539+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='boinc'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>BOINC Distributed Computing Projects</title><content type='html'>&lt;h2&gt;Donating spare CPU cycles to distributed computing projects.&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Most of time your cpu load is well below under 100%. &lt;br /&gt;&lt;br /&gt;You can check how many resources are you using right now, going to menu:&lt;br /&gt;  &lt;em&gt;System --&gt; Administration --&gt; System Monitor&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;What about if this spare resources all over the world would be used by projects like &lt;b&gt;curing diseases&lt;/b&gt;,&lt;br /&gt;&lt;b&gt;discover extraterrestrial inteligence&lt;/b&gt;, &lt;b&gt;predice climate changes&lt;/b&gt;... ?&lt;br /&gt;&lt;br /&gt;That is actually possible, here you have a list of projects you can participate:&lt;br /&gt;&lt;a href="http://boinc.berkeley.edu/projects.php"&gt;http://boinc.berkeley.edu/projects.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;These are all distributed computing projects, based on &lt;a href="http://en.wikipedia.org/wiki/BOINC"&gt;BOINC platform&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let's try this thing for real. First step will be &lt;b&gt;installing BOINC&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://wiki.debian.org/BOINC"&gt;&lt;b&gt;&lt;u&gt;BOINC - Debian and Ubuntu installation&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo aptitude update&lt;br /&gt;&lt;br /&gt;$sudo aptitude install boinc-client boinc-manager&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;execute graphic boinc manager:&lt;br /&gt;&lt;code&gt;$boincmgr&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;you only have to follow wizard instructions.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: To join a project:&lt;br /&gt;menu bar  &lt;em&gt;Tools -&gt; Attach to project&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: You will need konqueror browser to navigate the web from boincmgr.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Some info about interesting BOINC projects:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Roseta@home project:&lt;/b&gt; &lt;a href="http://boinc.bakerlab.org/rosetta/"&gt;http://boinc.bakerlab.org/rosetta/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Rosetta@home needs your help to determine the 3-dimensional shapes of proteins in research that may ultimately lead to finding cures for some major human diseases. By running the Rosetta program on your computer while you don't need it you will help us speed up and extend our research in ways we couldn't possibly attempt without your help. You will also be helping our efforts at designing new proteins to fight diseases such as HIV, Malaria, Cancer, and Alzheimer's (See our &lt;a href="http://boinc.bakerlab.org/rosetta/rah_medical_relevance.php"&gt;Disease Related Research&lt;/a&gt; for more information). Please &lt;a href="http://boinc.bakerlab.org/rosetta/rah_intro.php"&gt;join us&lt;/a&gt; in our efforts! Rosetta@home is not for profit.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Climateprediction.net&lt;/b&gt;: &lt;a href="http://climateprediction.net"&gt;http://climateprediction.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; Climateprediction.net is the largest experiment to try and produce a forecast of the climate in the 21st century. To do this, we need people around the world to give us time on their computers - time when they have their computers switched on, but are not using them to their full capacity.&lt;br /&gt;&lt;a href="http://www.climateprediction.net/project.php"&gt;[read more about the experiment]&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-7323401344413331992?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/7323401344413331992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=7323401344413331992' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/7323401344413331992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/7323401344413331992'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/08/boinc-distributed-computing-projects.html' title='BOINC Distributed Computing Projects'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-5883791948019481188</id><published>2007-08-12T14:22:00.000+02:00</published><updated>2007-09-02T11:47:33.753+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='video_streaming'/><category scheme='http://www.blogger.com/atom/ns#' term='zattoo'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Zattoo on Ubuntu Feisty</title><content type='html'>Zattoo is a program that allows us to see &lt;b&gt;streaming TV channels over Internet.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;It is unfortunately closed source, but free as in free beer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let's go to official Zattoo web page: &lt;a href="http://zattoo.com/"&gt;zattoo.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Check on your language flag to see what channels are available to see at your zone.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Register to obtain zattoo program: &lt;a href="http://zattoo.com/register"&gt;http://zattoo.com/register&lt;/a&gt;  &lt;br /&gt;&lt;br /&gt;After registering, select linux and download zattoo deb file: &lt;br /&gt;e.g: &lt;b&gt;zattoo-2.2.10.6523-i386.deb&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now install the deb file:&lt;br /&gt;&lt;code&gt;$sudo dpkg -i zattoo-2.2.10.6523-i386.deb&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I get &lt;b&gt;dependency problems:&lt;/b&gt;&lt;br /&gt;  zattoo needs &lt;b&gt;libgtkglext1&lt;/b&gt; and &lt;b&gt;libxul0d&lt;/b&gt; but those are not installed.&lt;br /&gt;&lt;br /&gt;We install those required packages:&lt;br /&gt;&lt;code&gt;$sudo aptitude install libgtkglext1 libxul0d&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Once dependencies are solved zattoo package configures automatically.&lt;br /&gt;If that does not happen, then exec: &lt;br /&gt;&lt;code&gt;$sudo dpkg --configure zattoo&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Download and install the Adobe Flash plugin from http://www.adobe.com if you have not it on your system yet.&lt;br /&gt;&lt;br /&gt;run: &lt;br /&gt;&lt;code&gt;$zattoo_player&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;introduce your zattoo login (used when registering) and enjoy!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; To obtain new zattoo versions when they will be available, go to zattoo page, click on &lt;b&gt;login&lt;/b&gt; word near country flags, and introduce your email and password. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; If you wanna know on which ports zattoo is listening, exec this command:&lt;br /&gt;&lt;code&gt;$sudo netstat -l -p -e | grep -i zattoo&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-5883791948019481188?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/5883791948019481188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=5883791948019481188' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/5883791948019481188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/5883791948019481188'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/08/zattoo-on-ubuntu-feisty.html' title='Zattoo on Ubuntu Feisty'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-7639039603479988201</id><published>2007-07-30T19:02:00.007+02:00</published><updated>2010-08-30T19:16:13.037+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='backup'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Backup your system using TAR</title><content type='html'>My system is a Debian Sid one (This article was first tested in an &lt;a href="http://linuxclues.blogspot.com/2007/06/ubuntu.html"&gt;Ubuntu Feisty&lt;/a&gt; system)&lt;br /&gt;Anyway this article is also useful in most other linux distros.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Tar&lt;/b&gt; tool allows us to make backups or even restore them, while our system is running.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;It is a good idea becoming root to be able to access every file on the system, or at least you should use &lt;b&gt;sudo&lt;/b&gt; command:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo tar cvzpf /home/Backup.tgz --same-owner --exclude=/home/Backup.tgz --exclude=/home/error.log --exclude=/proc/* --exclude=/media/* --exclude=/dev/* --exclude=/mnt/* --exclude=/sys/* --exclude=/tmp/* &lt;b&gt;/&lt;/b&gt; 2&gt;/home/error.log&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Tar options and arguments&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;c&lt;/b&gt;  creates a tar backup&lt;br /&gt;&lt;b&gt;v&lt;/b&gt;  activates verbose mode&lt;br /&gt;&lt;b&gt;z&lt;/b&gt;  will compress data using gzip format&lt;br /&gt;&lt;b&gt;p&lt;/b&gt;  preserves file permissions&lt;br /&gt;&lt;b&gt;f&lt;/b&gt;  sends output to a file instead of standard output.&lt;br /&gt;&lt;br /&gt;After f option it is necessary to write the file name where backup will be stored.&lt;br /&gt;i.e: &lt;code&gt;tar cvzpf /home/Backup.tgz&lt;/code&gt;     is correct, but&lt;br /&gt;     &lt;code&gt;tar cvzfp /home/Backup.tgz&lt;/code&gt;     is wrong.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/home/Backup.tgz&lt;/code&gt; is our backup file name.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;--same-owner&lt;/b&gt;   preserve file ownership, it is not necessary because, being root, is a default option.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Excluding files from Backup&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;--exclude&lt;/b&gt; option gives us the possibility of excluding files and directories from backup.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;--exclude=/home/Backup.tgz --exclude=/home/error.log&lt;/code&gt;  Prevent Backup file and error log file to be stored.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;--exclude=/proc/* --exclude=/dev/* --exclude=/sys/* &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;These are virtual directories so will not be stored.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: Difference between &lt;b&gt;--exclude=/proc/*&lt;/b&gt; and &lt;b&gt;--exclude=/proc&lt;/b&gt; is that first option would store a void proc directory, and second one would store nothing.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;--exclude=/tmp/*&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;/tmp&lt;/b&gt; is a temporary directory, and is deleted on every boot, so will not be backed up either.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;--exclude=/mnt/* --exclude=/media/*&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;If you want to save your main system only, and not what you have mounted on it, you should exclude these directories.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;WHICH DIRECTORIES TO EXCLUDE?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To get some points about which directories do you need you could:&lt;br /&gt;&lt;br /&gt;* Run &lt;b&gt;mount&lt;/b&gt; or &lt;b&gt;df&lt;/b&gt; commands, to know which filesystems and partitions are mounted in your system. e.g: &lt;br /&gt;&lt;code&gt;$ mount&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$ df -h&lt;/code&gt;&lt;br /&gt;* Read the &lt;a href="http://www.pathname.com/fhs/pub/fhs-2.3.html"&gt;Filesystem Hierarchy Standard (&lt;b&gt;FHS&lt;/b&gt;)&lt;/a&gt; which tells you the meaning about most system and user directories.&lt;br /&gt;* Read &lt;a href="http://linuxclues.blogspot.com/2008/03/linux-system-directories-and-their.html"&gt;Linux System Directories and their Filesystems&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: The &lt;b&gt;easiest way to backup a system is booting from a live-cd or live-usb&lt;/b&gt;, then mount the partition you want to back up. This way you do not need to worry about which files to exclude, etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Logging errors&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;2&gt;/home/error.log&lt;/code&gt;  redirects standard error output to &lt;b&gt;error.log&lt;/b&gt; file so we will be able to check if there have been important errors when creating backup file.&lt;br /&gt;&lt;br /&gt;Normally some warnings appear about not storing some sockets and not including &lt;b&gt;/&lt;/b&gt; at beginning of files. You can simply ignore them.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;RESTORING YOUR SYSTEM&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;exec:&lt;br /&gt;&lt;code&gt;$sudo tar &lt;b&gt;x&lt;/b&gt;vzf /home/Backup.tgz -C /&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;IF YOU RESTORE THE BACKUP IN A DIFFERENT PARTION OR MACHINE&lt;/b&gt;:&lt;br /&gt;* Remember to &lt;b&gt;change /etc/fstab&lt;/b&gt; file in your restored copy to correct new values.&lt;br /&gt;* Also be sure, that the restored copy has all &lt;b&gt;needed drivers for the new hardware&lt;/b&gt;.&lt;br /&gt;* And in the end &lt;b&gt;set&lt;/b&gt; correctly the &lt;b&gt;bootloader configuration&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;TESTING BACKUP FILE&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;To test if your backup file has no errors try this command:&lt;br /&gt;&lt;code&gt;$tar &lt;b&gt;t&lt;/b&gt;vzf /home/Backup.tgz&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;BACKING UP VIA NETWORK&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;We are going to send our backup copy over the network. We will explain two methods:&lt;br /&gt;&lt;br /&gt;* using &lt;b&gt;netcat&lt;/b&gt; tool.&lt;br /&gt;Bytes are sent without encryption.&lt;br /&gt;No need of a previous server, we set it on the fly.&lt;br /&gt;&lt;br /&gt;* using &lt;b&gt;ssh&lt;/b&gt; tool.&lt;br /&gt;It needs a ssh server already installed.&lt;br /&gt;Provides encryption.&lt;br /&gt;Simpler command setup.&lt;br /&gt;It manages the connection.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We have two computers: &lt;br /&gt;&lt;br /&gt;- &lt;b&gt;Local computer&lt;/b&gt; with &lt;em&gt;&lt;b&gt;IP_local&lt;/b&gt;&lt;/em&gt; address. Contents of this computer will be backed up.&lt;br /&gt;- &lt;b&gt;Remote computer&lt;/b&gt;, which ip address is &lt;em&gt;&lt;b&gt;IP_remote&lt;/b&gt;&lt;/em&gt;. Backup file will be stored in this computer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;USING NETCAT TOOL&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;First at remote computer launch netcat in listening mode:&lt;br /&gt;&lt;code&gt;$nc -l -p 6000 &gt;/home/Backup.tgz&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;That command starts listening at port 6000 and sends what receives to file /home/Backup.tgz.&lt;br /&gt;&lt;br /&gt;Second at local computer:&lt;br /&gt;&lt;code&gt;$sudo tar cvzp --same-owner --exclude=/home/error.log --exclude=/proc/* --exclude=/media/* --exclude=/dev/* --exclude=/mnt/* --exclude=/sys/* --exclude=/tmp/* &lt;b&gt;/&lt;/b&gt; 2&gt;/home/error.log | &lt;b&gt;nc -w 3 IP_remote 6000&lt;/b&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: We have deleted &lt;b&gt;f&lt;/b&gt; and &lt;b&gt;--exclude=/home/Backup.tgz&lt;/b&gt; options because tar data is sent to standard output instead of to a file.&lt;br /&gt;&lt;br /&gt;Backup starts, is sent via network and stored at remote computer.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: You need to start first netcat in listening mode or it will give you a connection error.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;USING SSH TOOL&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Depending on where is the ssh server installed we have two possibilities:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ssh server in remote computer: (We exec this command in the local computer)&lt;/b&gt;&lt;br /&gt;$sudo tar cvzp --same-owner --exclude=/home/error.log --exclude=/proc/* --exclude=/media/* --exclude=/dev/* --exclude=/mnt/* --exclude=/sys/* --exclude=/tmp/* / 2&gt;/home/error.log | ssh IP_remote "cat - &gt; /home/Backup.tgz"&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ssh server in local computer: (We exec this command in the remote computer)&lt;/b&gt;&lt;br /&gt;$ssh IP_local "sudo tar cvzp --same-owner --exclude=/home/error.log --exclude=/proc/* --exclude=/media/* --exclude=/dev/* --exclude=/mnt/* --exclude=/sys/* --exclude=/tmp/* / 2&gt;/home/error.log" &gt; /home/Backup.tgz&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;More info at ubuntu forums: &lt;br /&gt;&lt;a href="https://help.ubuntu.com/community/BackupYourSystem/TAR"&gt;BackupYourSystem using Tar&lt;/a&gt;&lt;br /&gt;&lt;a href="https://help.ubuntu.com/community/BackupYourSystem"&gt;BackupYourSystem&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-7639039603479988201?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/7639039603479988201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=7639039603479988201' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/7639039603479988201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/7639039603479988201'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/07/backup-your-system-using-tar.html' title='Backup your system using TAR'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1810057280041377847.post-3630913352899831591</id><published>2007-07-29T21:52:00.001+02:00</published><updated>2007-07-29T21:52:38.267+02:00</updated><title type='text'>Free software - open source LINKS</title><content type='html'>&lt;b&gt;&lt;u&gt;DOCUMENTATION&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;a href="http://tldp.org"&gt;The Linux Documentation Project&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.linuxdocs.org/"&gt;Linuxdocs - Linux Documents&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;KERNEL FOCUSED LINKS&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;a href="http://kerneltrap.org"&gt;KernelTrap&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.kernel.org/"&gt;www.kernel.org&lt;/a&gt;&lt;br /&gt;&lt;a href="http://kernelnewbies.org"&gt;KernelNewbies.org&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;MAGAZINES&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.linuxjournal.com/"&gt;LinuxJournal&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;OTHER LINKS&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.linuxsecurity.com"&gt;Linuxsecurity.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.debian-administration.org/"&gt;Debian-Administration.org&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.linuxfromscratch.org/"&gt;Linux From Scratch&lt;/a&gt;&lt;br /&gt;&lt;a href="http://linux-net.osdl.org/index.php/Main_Page"&gt;Linux Networking Wiki&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.fsf.org/"&gt;The Free Software Foundation&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-3630913352899831591?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/3630913352899831591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=3630913352899831591' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/3630913352899831591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/3630913352899831591'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/07/free-software-open-source-links.html' title='Free software - open source LINKS'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-4782542996856830401</id><published>2007-07-25T20:09:00.002+02:00</published><updated>2008-07-07T03:23:51.252+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><title type='text'>Errors and Solutions</title><content type='html'>Solutions to common linux related errors appear frequently along this blog.&lt;br /&gt;Unfortunately it is very difficult to track them from main page.&lt;br /&gt;&lt;br /&gt;This blog entry shows a &lt;u&gt;&lt;b&gt;list of common errors and corresponding articles where solutions are explained&lt;/b&gt;&lt;/u&gt;.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;"Could not open '/dev/kqemu' - QEMU acceleration layer not activated"&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;On Ubuntu: &lt;a href="http://linuxclues.blogspot.com/2007/07/installing-qemu-in-ubunty-feisty-system.html"&gt;Installing Qemu on a Ubuntu Feisty System&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;"Could not open '\\.\kqemu' - QEMU acceleration layer not activated"&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;On Windows: &lt;a href="http://linuxclues.blogspot.com/2007/06/installing-qemu-on-windows-vista.html"&gt;Installing Qemu on Windows Vista&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;"/dev/sdX does not have any corresponding BIOS drive"&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;a href="http://linuxclues.blogspot.com/2007/07/howto-create-ubuntu-usblive-with.html"&gt;Howto create a ubuntu usb live with persistence&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Howto change X-Windows screen resolution&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;i.e: You are running qemu emulator and its window outbounds your monitor screen&lt;br /&gt;&lt;br /&gt;&lt;a href="http://linuxclues.blogspot.com/2007/06/bash-tips.html"&gt;Bash tips&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;When booting GParted live cd, tft screen ends black&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;a href="http://linuxclues.blogspot.com/2007/06/resizing-partitions-with-gparted.html"&gt;Resizing partitions with gparted&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Network in Qemu does not work&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;On a Linux system: &lt;a href="http://linuxclues.blogspot.com/2007/07/installing-qemu-in-ubunty-feisty-system.html"&gt;Installing Qemu on a Ubuntu Feisty System&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;"apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName"&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;a href="http://linuxclues.blogspot.com/2008/04/installing-configuring-mediawiki-ubuntu.html"&gt;Installing and Configuring Mediawiki on a Ubuntu Gutsy Desktop System&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-4782542996856830401?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/4782542996856830401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=4782542996856830401' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/4782542996856830401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/4782542996856830401'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/07/errors-and-solutions.html' title='Errors and Solutions'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-4648899218143101786</id><published>2007-07-18T17:38:00.001+02:00</published><updated>2008-02-22T22:23:03.900+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='qemu'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Installing Qemu on a Ubunty Feisty System</title><content type='html'>That simply command will install qemu emulator:&lt;br /&gt;&lt;code&gt;$sudo aptitude install qemu&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Right now, qemu works as an emulator, that is, emulates every guest system instruction on the host system. &lt;br /&gt;Emulating is a slow working mode, but if qemu runs on a x86 platform, it is possible to execute guest code directly as host code so speed will improve. (That is called &lt;u&gt;&lt;b&gt;virtualization&lt;/b&gt;&lt;/u&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;INSTALLING KQEMU MODULE&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To use virtualization mode in qemu, we have to install &lt;b&gt;kqemu&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#aptitude install kqemu-common&lt;/code&gt;&lt;br /&gt;That package has some documentation and a configuration file, but is not really kqemu module&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo aptitude install kqemu-source&lt;/code&gt; # Installs kqemu module sources&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Compiling sources:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; You will need &lt;b&gt;libc6-dev&lt;/b&gt; package to be able to compile kqemu sources.&lt;br /&gt;If you haven't it: &lt;code&gt;$sudo aptitude install libc6-dev&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$sudo su&lt;/code&gt; # Becoming root&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#cd /usr/src&lt;br /&gt;# tar xvfj kqemu.tar.bz2 &lt;br /&gt;#cd modules/kqemu&lt;br /&gt;# ./configure&lt;br /&gt;#make&lt;br /&gt;#make install&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;kqemu module is now installed!!&lt;br /&gt;&lt;br /&gt;Gonna load kqemu module:&lt;br /&gt;&lt;code&gt;#modprobe kqemu&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;and then run qemu:&lt;br /&gt;&lt;code&gt;#qemu -m 256 -cdrom .....  &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Appears an error:&lt;br /&gt;"&lt;b&gt;Could not open '/dev/kqemu' - QEMU acceleration layer not activated&lt;/b&gt;"&lt;br /&gt;&lt;br /&gt;This bug occurs because qemu searchs for a module which major number equals zero and kqemu-common has set it to 250.&lt;br /&gt;&lt;br /&gt;To solve that:&lt;br /&gt;&lt;code&gt;#rmmod kqemu&lt;br /&gt;#gedit /etc/modprobe.d/kqemu&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;and change &lt;code&gt;250&lt;/code&gt; by &lt;code&gt;0&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;again:&lt;br /&gt;&lt;code&gt;#modprobe kqemu&lt;br /&gt;#qemu -m 256 -cdrom ....... &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;SETTING THE NETWORK IN QEMU&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you dont specify network options when invoking qemu, then defaults apply.&lt;br /&gt;&lt;br /&gt;This default options are: &lt;b&gt;-net nic  -net user&lt;/b&gt;&lt;br /&gt;&lt;code&gt;-net nic&lt;/code&gt; : emulates a NE2000 network interface card.&lt;br /&gt;&lt;code&gt;-net user&lt;/code&gt;: use the &lt;b&gt;user mode network stack&lt;/b&gt; which requires no administrator priviledge to run.&lt;br /&gt;&lt;br /&gt;That should be enough to have network working in your virtual machine but with &lt;b&gt;some limitations:&lt;/b&gt; &lt;br /&gt;* Pings are not available.&lt;br /&gt;* By default User mode network stack allow us to navigate and connect to our host system, but not to act as a server.&lt;br /&gt;&lt;br /&gt;User mode network stack has a &lt;b&gt;built in dhcp server&lt;/b&gt; that will provide us an ip address.&lt;br /&gt;&lt;br /&gt;If everything has gone fine you can open a browser and surf on the internet. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;If you cannot connect to internet&lt;/b&gt;, open a console and type:&lt;br /&gt;&lt;code&gt;$ifconfig&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;check if virtual nic has its associated ip address and if not, exec this command:&lt;br /&gt;&lt;code&gt;$sudo dhclient eth0&lt;/code&gt;        # eth0 is your virtual nic&lt;br /&gt;&lt;br /&gt;try your browser again.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: Another way to configure the network in qemu consists in using a &lt;b&gt;tap device&lt;/b&gt; and a &lt;b&gt;network software bridge&lt;/b&gt;, instead of using user mode network stack.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-4648899218143101786?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/4648899218143101786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=4648899218143101786' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/4648899218143101786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/4648899218143101786'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/07/installing-qemu-in-ubunty-feisty-system.html' title='Installing Qemu on a Ubunty Feisty System'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-1913020643472957475</id><published>2007-07-07T20:57:00.004+02:00</published><updated>2011-08-21T05:33:04.949+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>Apt, Aptitude and Dpkg Reference</title><content type='html'>&lt;b&gt;Apt&lt;/b&gt;, &lt;b&gt;Aptitude&lt;/b&gt; and &lt;b&gt;Dpkg&lt;/b&gt; are Debian package managing tools. Let's see a small reference about them:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;# apt-get install foo&lt;/b&gt; .......................Installs foo package&lt;br /&gt;&lt;b&gt;# apt-get remove foo&lt;/b&gt; ........................Removes foo package&lt;br /&gt;&lt;b&gt;# apt-get remove --purge foo&lt;/b&gt; ................Removes foo package and its configuration files.&lt;br /&gt;&lt;b&gt;# apt-get update&lt;/b&gt; ............................Updates package database.&lt;br /&gt;&lt;b&gt;# apt-get -f install&lt;/b&gt;.........................Installs and removes packages in order to fix dependency problems.&lt;br /&gt;&lt;b&gt;# apt-get clean&lt;/b&gt; .............................Deletes all .deb packages from local repository.&lt;br /&gt;&lt;b&gt;# apt-get upgrade&lt;/b&gt; ...........................Upgrades all packages to its newer versions.&lt;br /&gt;&lt;b&gt;# apt-get dist-upgrade&lt;/b&gt; ......................Upgrades packages but also deals with dependency problems caused by new packages.&lt;br /&gt;&lt;b&gt;$ apt-get source foo&lt;/b&gt; ........................Downloads foo package source files.&lt;br /&gt;&lt;b&gt;# apt-get -t unstable foo&lt;/b&gt; ...................Installs foo package searching for foo package and its dependencies at unstable version.&lt;br /&gt;&lt;b&gt;# apt-get foo/unstable&lt;/b&gt; ......................Installs foo package from unstable version, but searchs for dependencies without overriding priorities at /etc/apt/preferences file.&lt;br /&gt;&lt;b&gt;# apt-get build-dep foo&lt;/b&gt; .....................Installs all necessary packages to satisfy the    build dependencies for foo source package.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$ apt-cache show foo&lt;/b&gt; ........................Gives a long info description about foo package.&lt;br /&gt;&lt;b&gt;$ apt-cache search foo&lt;/b&gt; ......................Searchs for packages that match "foo" pattern.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;# apt-file update&lt;/b&gt; ...........................Resynchronize  the  package  contents  from their sources (/etc/apt/sources.list)&lt;br /&gt;&lt;b&gt;$ apt-file search foo&lt;/b&gt; .......................Lists all packages containing files that match foo pattern. Searchs also in not installed packages.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;# aptitude install foo&lt;/b&gt; ......................Installs foo package&lt;br /&gt;&lt;b&gt;# aptitude remove foo&lt;/b&gt; .......................Removes foo package&lt;br /&gt;&lt;b&gt;# aptitude remove --purge foo&lt;/b&gt; ...............Removes foo package and its configuration files.&lt;br /&gt;&lt;b&gt;$ aptitude search foo&lt;/b&gt; .......................Searchs for packages that match "foo" pattern&lt;br /&gt;&lt;b&gt;# aptitude update&lt;/b&gt; ...........................Updates package database.&lt;br /&gt;&lt;b&gt;# aptitude upgrade&lt;/b&gt; ..........................Upgrades packages to its newer versions.&lt;br /&gt;&lt;b&gt;# aptitude safe-upgrade&lt;/b&gt; .....................Same as aptitude upgrade.&lt;br /&gt;&lt;b&gt;# aptitude full-upgrade&lt;/b&gt; .....................Upgrades packages to its newer versions, taking care about dependencies. Sames as dist-upgrade.&lt;br /&gt;&lt;b&gt;# aptitude hold foo&lt;/b&gt; .........................Marks foo package so it will not be removed or upgraded when executing safe-upgrade or full-upgrade&lt;br /&gt;&lt;b&gt;# aptitude unhold foo&lt;/b&gt; .......................Turn off the hold on foo package. &lt;br /&gt;&lt;b&gt;$ aptitude show foo&lt;/b&gt; .........................Gives a long info description about foo package.&lt;br /&gt;&lt;b&gt;# aptitude clean&lt;/b&gt; ............................Removes all previously downloaded .deb files from the package cache directory.&lt;br /&gt;&lt;b&gt;$ aptitude download foo&lt;/b&gt; .....................Downloads foo package to current directory.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;# dpkg -i foo&lt;/b&gt; ...............................Installs foo package&lt;br /&gt;&lt;b&gt;# dpkg -i --force-depends foo&lt;/b&gt; ...............Converts all dependency errors into warnings and installs foo package.&lt;br /&gt;&lt;b&gt;# dpkg -r foo&lt;/b&gt; ...............................Removes foo package&lt;br /&gt;&lt;b&gt;# dpkg --purge foo&lt;/b&gt; ..........................Removes foo package and its configuration files too.&lt;br /&gt;&lt;b&gt;$ dpkg -l *foo*&lt;/b&gt; .............................Lists packages containing "foo" pattern.&lt;br /&gt;&lt;b&gt;$ dpkg -L foo&lt;/b&gt; ...............................Lists files pertaining to foo package.&lt;br /&gt;&lt;b&gt;# dpkg-reconfigure -plow foo&lt;/b&gt; ................Reconfigures previously installed "foo" package, asking all configuration questions.&lt;br /&gt;&lt;b&gt;# dpkg --configure -a&lt;/b&gt; ...........................Configures all packages that have been unpacked but not yet configured.&lt;br /&gt;&lt;b&gt;$ dpkg --search foo&lt;/b&gt; .........................Lists packages containing files matching foo pattern. Only searchs on installed packages.&lt;br /&gt;&lt;b&gt;$ dpkg -c foo.deb&lt;/b&gt; ...........................List files contained in foo.deb package.&lt;br /&gt;&lt;b&gt;$ dpkg -I foo.deb&lt;/b&gt; ...........................Shows info about foo.deb package.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$ dpkg-query -S foo&lt;/b&gt; .........................Searchs for a filename from installed packages listed in the local dpkg database.&lt;br /&gt;&lt;br /&gt;More info at: &lt;br /&gt;&lt;a href="http://www.debian.org/doc/FAQ/ch-pkgtools.en.html"&gt;The Debian package management tools&lt;/a&gt;.&lt;br /&gt;&lt;a href="http://www.debian.org/doc/manuals/apt-howto/index.en.html"&gt;APT Howto&lt;/a&gt;.&lt;br /&gt;&lt;a href="http://www.debian.org/doc/manuals/reference/ch-package.en.html"&gt;Debian package management&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-1913020643472957475?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/1913020643472957475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=1913020643472957475' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1913020643472957475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/1913020643472957475'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/07/apt-aptitude-dpkg-reference.html' title='Apt, Aptitude and Dpkg Reference'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-3462715273558141286</id><published>2007-07-07T18:49:00.000+02:00</published><updated>2007-07-28T09:18:03.116+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='livedistro'/><category scheme='http://www.blogger.com/atom/ns#' term='qemu'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='dapper'/><title type='text'>Howto create an Ubuntu UsbLive with persistence</title><content type='html'>First step is downloading &lt;strong&gt;Ubuntu Dapper iso&lt;/strong&gt; file:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; &lt;em&gt;Newer versions(Feisty and Gutsy), by now, july 2007, have a bug that prevents to use persistence feature.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;You can navigate to &lt;a href="http://www.ubuntu.com/getubuntu/download"&gt;Ubuntu download page&lt;/a&gt; and select &lt;strong&gt;Ubuntu 6.06 LTS Desktop edition (alias Dapper)&lt;/strong&gt;,&lt;br /&gt;&lt;br /&gt;or simply enter at console command line:&lt;br /&gt;&lt;code&gt;$wget http://releases.ubuntu.com/dapper/ubuntu-6.06.1-desktop-i386.iso&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;I recommend a usb pendrive with a capacity higher than 1 Gigabyte,&lt;/b&gt; because you will need at least 700 megabytes to copy dapper iso file on it.&lt;br /&gt;In my case I use a 2G pendrive.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Connect the usb pendrive so it be detected.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$dmesg&lt;/b&gt; command will show something like:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;[ 2697.454838] usb-storage: device found at 4&lt;br /&gt;...&lt;br /&gt;[ 2704.387453] SCSI &lt;u&gt;device sdh&lt;/u&gt;: 4029440 512-byte hdwr sectors (2063 MB)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$fdisk -l&lt;/b&gt; also shows the new device.&lt;br /&gt;&lt;br /&gt;If you still dont find it, you can seek for it at  &lt;b&gt;$cat /proc/bus/usb/devices&lt;/b&gt;  output.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;On my system the new device appears as &lt;b&gt;/dev/sdh&lt;/b&gt;, in this tutorial, to be more general, I will write it as &lt;b&gt;/dev/sdX&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Next step will be &lt;b&gt;partitionating our usb pendrive&lt;/b&gt;: (choose the program you prefer: &lt;em&gt;fdisk, cfdisk, gparted &lt;/em&gt;...)&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;b&gt;#fdisk /dev/sdX&lt;/b&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;(for help on this step read $man fdisk)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I partitionate the device into two partitions sdX1 and sdX2, both sized one gigabyte, and make bootable the first one, showing this result with fdisk:&lt;br /&gt;&lt;br /&gt;&lt;table align="left" border=0 cellpadding=3 bgcolor="#FFF8DC"&gt;&lt;tr&gt;&lt;th align="left"&gt;Device&lt;/th&gt;&lt;th align="left"&gt;Active&lt;/th&gt;&lt;th align="left"&gt;Beginning&lt;/th&gt;&lt;th align="left"&gt;End&lt;/th&gt;&lt;th align="left"&gt;Blocks&lt;/th&gt;&lt;th align="left"&gt;Id&lt;/th&gt;&lt;th align="left"&gt;System&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;/dev/sdX1&lt;/td&gt;&lt;td&gt;*&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;493&lt;/td&gt;&lt;td&gt;978081&lt;/td&gt;&lt;td&gt;b&lt;/td&gt;&lt;td&gt;W95 FAT32&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;/dev/sdX2&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;494&lt;/td&gt;&lt;td&gt;1015&lt;/td&gt;&lt;td&gt;1035648&lt;/td&gt;&lt;td&gt;83&lt;/td&gt;&lt;td&gt;Linux&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Umount both partitions if they are mounted and then format them with:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#mkfs.vfat -F 32 -n usb /dev/sdX1&lt;br /&gt;#mkfs.ext3 -L casper-rw -b 4096 /dev/sdX2&lt;/code&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; &lt;b&gt;casper-rw&lt;/b&gt; label is important, do not change it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Mount dapper iso file in your harddisk:&lt;br /&gt;&lt;code&gt;#mkdir dapper_directory&lt;br /&gt;#mount -o loop ubuntu-6.06.1-desktop-i386.iso dapper_directory&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Copy iso files to first usb pendrive partition:&lt;br /&gt;&lt;code&gt;#mount /dev/sdX1 /media/foo&lt;br /&gt;#cd dapper_directory&lt;br /&gt;#cp -dpR . /media/foo&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Installing grub bootloader:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#grub-install --root-directory=/media/foo /dev/sdX&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;this does not install &lt;b&gt;menu.lst&lt;/b&gt; file so we will create it manually:&lt;br /&gt;&lt;code&gt;$sudo gedit /media/foo/boot/grub/menu.lst&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Howto change isolinux.cfg entries&lt;/b&gt; (/media/foo/isolinux/isolinux.cfg) &lt;b&gt;into menu.lst format:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;E.g: isolinux.cfg entry&lt;br /&gt;&lt;br /&gt;&lt;code&gt;LABEL live&lt;br /&gt;menu label ^Start or install Ubuntu&lt;br /&gt;kernel /casper/vmlinuz&lt;br /&gt;append   boot=casper initrd=/casper/initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash --&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;changes into: (menu.lst entry)&lt;br /&gt;&lt;br /&gt;&lt;code&gt;title    Start or install Ubuntu&lt;br /&gt;root     (hd0,0) &lt;/code&gt;              &lt;---------------- this is necessary to identify usb device at boot.&lt;br /&gt;&lt;code&gt;kernel   /casper/vmlinuz boot=casper initrd=/casper/initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash&lt;br /&gt;initrd   /casper/initrd.gz&lt;br /&gt;boot&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: If you have problems creating menu.lst file, copy the one that appears at the end of this article.&lt;br /&gt;&lt;br /&gt;Now you have written a correct menu.lst file at /media/foo/boot/grub directory exec again:&lt;br /&gt;&lt;code&gt;#grub-install --root-directory=/media/foo /dev/sdX&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; If grub gives this error message &lt;b&gt;"/dev/sdX does not have any corresponding BIOS drive"&lt;/b&gt;&lt;br /&gt;execute this command: &lt;br /&gt;&lt;code&gt;#grub-install --root-directory=/media/foo --recheck /dev/sdX&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; to be able to run your usb pendrive from qemu you have to trick the emulator giving a usb dapper iso as a cdrom device e.g:&lt;br /&gt;&lt;code&gt;#qemu -hda /dev/sdX -cdrom ubuntu-6.06.1-desktop-i386.iso -boot c&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you want to restart your computer to probe your creation, run:&lt;br /&gt;&lt;code&gt;#eject /dev/sdX&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; eject /dev/sdX  umounts sdX partitions and deletes /dev/sdX, /dev/sdX1,... devices&lt;br /&gt;&lt;br /&gt;Restart and boot from your usb pendrive.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Have fun!!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;APPENDIX: Example of &lt;u&gt;menu.lst&lt;/u&gt; file&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; &lt;b&gt;&lt;u&gt;persistent&lt;/u&gt;&lt;/b&gt; tag at first kernel line enables persistence mode in our usb pendrive.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;timeout         10&lt;br /&gt;&lt;br /&gt;color cyan/blue white/blue&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;title           Start Ubuntu in Persistent mode&lt;br /&gt;root            (hd0,0)&lt;br /&gt;kernel          /casper/vmlinuz boot=casper initrd=/casper/initrd.gz ramdisk_size=1048576 root=/dev/ram rw &lt;b&gt;persistent&lt;/b&gt;&lt;br /&gt;initrd          /casper/initrd.gz&lt;br /&gt;boot&lt;br /&gt;&lt;br /&gt;title           Live - Start or install Ubuntu&lt;br /&gt;root            (hd0,0)&lt;br /&gt;kernel          /casper/vmlinuz boot=casper initrd=/casper/initrd.gz ramdisk_size=1048576 root=/dev/ram rw&lt;br /&gt;initrd          /casper/initrd.gz&lt;br /&gt;boot&lt;br /&gt;&lt;br /&gt;title           Start Ubuntu in safe graphics mode&lt;br /&gt;root            (hd0,0)&lt;br /&gt;kernel          /casper/vmlinuz boot=casper xforcevesa initrd=/casper/initrd.gz ramdisk_size=1048576 root=/dev/ram rw&lt;br /&gt;initrd          /casper/initrd.gz&lt;br /&gt;boot&lt;br /&gt;&lt;br /&gt;title           Check CD for defects&lt;br /&gt;root            (hd0,0)&lt;br /&gt;kernel          /casper/vmlinuz boot=casper integrity-check initrd=/casper/initrd.gz ramdisk_size=1048576 root=/dev/ram rw&lt;br /&gt;initrd          /casper/initrd.gz&lt;br /&gt;boot&lt;br /&gt;&lt;br /&gt;title           Memory test&lt;br /&gt;root            (hd0,0)&lt;br /&gt;kernel          /install/mt86plus&lt;br /&gt;boot&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This article is based on this &lt;a href="http://www.ubuntu-es.org/index.php?q=node/51536"&gt;excelent spanish one&lt;/a&gt; extracted from &lt;a href="http://www.ubuntu-es.org/index.php?q=blog/70327"&gt;Daniel Perella's Blog&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-3462715273558141286?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/3462715273558141286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=3462715273558141286' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/3462715273558141286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/3462715273558141286'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/07/howto-create-ubuntu-usblive-with.html' title='Howto create an Ubuntu UsbLive with persistence'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-8021553815481441224</id><published>2007-06-26T21:41:00.000+02:00</published><updated>2007-07-09T10:48:15.400+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xen'/><title type='text'>Xen</title><content type='html'>Xen is a virtual machine monitor (VMM) for x86-compatible computers. Xen can securely execute multiple virtual machines, each running its own OS, on a single physical system with close-to-native performance.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://wiki.xensource.com/xenwiki/"&gt;Xen Wiki&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Xen"&gt;Xen (Wikipedia)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://wiki.xensource.com/xenwiki/XenFaq"&gt;Xen FAQ&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://mediakey.dk/~cc/howto-install-windows-xp-vista-on-xen/"&gt;howto-install-windows-xp-vista-on-xen&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.debian-administration.org/articles/533"&gt;A brief introduction to xen-tools&lt;/a&gt; (debian-administration.org)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.debian-administration.org/articles/304"&gt;Installing Xen 3.0 upon Debian Sarge&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-8021553815481441224?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/8021553815481441224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=8021553815481441224' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/8021553815481441224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/8021553815481441224'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/06/xen.html' title='Xen'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-6940317984661575092</id><published>2007-06-26T08:49:00.001+02:00</published><updated>2007-06-26T13:05:25.261+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gentoo'/><category scheme='http://www.blogger.com/atom/ns#' term='livedistro'/><category scheme='http://www.blogger.com/atom/ns#' term='distro'/><title type='text'>Gentoo Linux Distribution</title><content type='html'>&lt;a href="http://www.gentoo.org/"&gt;Gentoo official page&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Gentoo_Linux"&gt;Gentoo Linux Distribution&lt;/a&gt; (Wikipedia)&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Gentoo Linux operating system is designed to be modular, portable, easy to maintain, flexible, and optimized for the user's machine. &lt;strong&gt;All tools and utilities are built from source code.&lt;/strong&gt; For convenience, however, several large software packages are also available as precompiled binaries for various architectures via the &lt;a href="http://en.wikipedia.org/wiki/Portage_%28software%29"&gt;Portage&lt;/a&gt; system.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;It is a distro oriented to developers and network professionals. &lt;a href="http://distrowatch.com/table.php?distribution=gentoo"&gt;Gentoo at distrowatch&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://gentoo-wiki.com/Main_Page"&gt;Gentoo Wiki&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://packages.gentoo.org/"&gt;Packages Online Database&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;INSTALLING&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.gentoo.org/main/en/where.xml"&gt;Downloading Gentoo&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.gentoo.org/doc/en/handbook/handbook-x86.xml"&gt;Installing Gentoo Handbook&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://linuxgazette.net/106/orr.html"&gt;Linux Gazette article about installing Gentoo&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;LIVE CD&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://gentoo-wiki.com/Talk:HOWTO_build_a_LiveCD_from_scratch"&gt;HowTo build a LiveCD from scratch&lt;/a&gt; (Gentoo-Wiki)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;IRC CHANNEL&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#gentoo&lt;/b&gt;  at &lt;b&gt;irc.gnu.org&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;strong&gt;OTHER INTERESTING LINKS&lt;/strong&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.gentoo.org/proj/en/base/embedded/"&gt;Embedded Gentoo&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://devmanual.gentoo.org/"&gt;Gentoo Development Guide&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-6940317984661575092?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/6940317984661575092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=6940317984661575092' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6940317984661575092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6940317984661575092'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/06/installing-gentoo.html' title='Gentoo Linux Distribution'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-7270747104858824298</id><published>2007-06-19T20:38:00.001+02:00</published><updated>2008-05-04T19:59:05.900+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='file extensions'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><title type='text'>File types and Debian packages</title><content type='html'>This article describes some file types (&lt;a href="http://filext.com/"&gt;their extensions&lt;/a&gt;) and programs and debian or ubuntu packages to visualize those file types.&lt;br /&gt;&lt;br /&gt;&lt;table bgcolor="#f0f0f0" border="1" width="100%"&gt;&lt;tbody&gt;&lt;tr bgcolor="#e0e0e0"&gt;&lt;th align="left"&gt;File Extension&lt;/th&gt;&lt;th align="center"&gt;Program&lt;/th&gt;&lt;th align="center"&gt;Debian/Ubuntu package&lt;/th&gt;&lt;th align="left"&gt;File Description&lt;/th&gt;&lt;/tr&gt;&lt;tr bgcolor="white"&gt;&lt;td align="left"&gt;&lt;b&gt;.chm&lt;/b&gt;&lt;/td&gt;&lt;td align="center"&gt;gnochm&lt;/td&gt;&lt;td align="center"&gt;gnochm&lt;/td&gt;&lt;td align="left"&gt;Microsoft help files&lt;/td&gt;&lt;/tr&gt;&lt;tr bgcolor="white"&gt;&lt;td align="left"&gt;&lt;b&gt;.djvu&lt;/b&gt;&lt;/td&gt;&lt;td align="center"&gt;djview&lt;/td&gt;&lt;td align="center"&gt;djview / djvulibre-plugin&lt;/td&gt;&lt;td align="left"&gt;Djvu file format for documents (alternative to pdf)&lt;/td&gt;&lt;/tr&gt;&lt;tr bgcolor="white"&gt;&lt;td align="left"&gt;&lt;b&gt;.rar&lt;/b&gt;&lt;/td&gt;&lt;td align="center"&gt;unrar&lt;/td&gt;&lt;td align="center"&gt;unrar&lt;/td&gt;&lt;td align="left"&gt;Rar compressed file format&lt;/td&gt;&lt;/tr&gt;&lt;tr bgcolor="white"&gt;&lt;td align="left"&gt;&lt;b&gt;.flv&lt;/b&gt;&lt;/td&gt;&lt;td align="center"&gt;mplayer&lt;/td&gt;&lt;td align="center"&gt;mplayer&lt;/td&gt;&lt;td align="left"&gt;Flash video file format&lt;/td&gt;&lt;/tr&gt;&lt;tr bgcolor="white"&gt;&lt;td align="left"&gt;&lt;b&gt;&lt;/b&gt;&lt;/td&gt;&lt;td align="center"&gt;&lt;/td&gt;&lt;td align="center"&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-7270747104858824298?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/7270747104858824298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=7270747104858824298' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/7270747104858824298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/7270747104858824298'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/06/file-types-and-debian-packages.html' title='File types and Debian packages'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-6351866997775181202</id><published>2007-06-18T12:31:00.000+02:00</published><updated>2007-08-30T10:46:00.635+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='livedistro'/><category scheme='http://www.blogger.com/atom/ns#' term='gutsy'/><category scheme='http://www.blogger.com/atom/ns#' term='distro'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu</title><content type='html'>&lt;a href="https://help.ubuntu.com/community/CommonQuestions"&gt;Ubuntu Community FAQ&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ubuntu.com/aboutus/faq"&gt;Ubuntu FAQ&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ubuntu.com/community/ubuntustory/components"&gt;Repository Components&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://packages.ubuntu.com/"&gt;Ubuntu Packages&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://wiki.ubuntu.com/MarkShuttleworth"&gt;Mark Suttleworth wiki&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.markshuttleworth.com/"&gt;Mark Shuttleworth's blog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ubuntuforums.org"&gt;Ubuntu Forums&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ubuntuforums.org/showthread.php?t=476302"&gt;HowTo: Install Feisty on a bootable USB Flash drive&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.edoceo.com/liber/ubuntu-live-usb.php"&gt;Ubuntu USB live&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://xubuntublog.wordpress.com/2007/06/17/ubuntu-feisty-on-your-usb-drive-finally/"&gt;Persistence  Bug Feisty&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ubuntu.com/community/participate"&gt;Get involved in Ubuntu&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ubuntu.com/community/processes/newdev"&gt;Becoming an Ubuntu Developer&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://wiki.ubuntu.com/UbuntuDevelopment"&gt;Ubuntu development&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ubuntu.com/community/developerzone/bounties"&gt;Ubuntu paid work&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://launchpad.net/ubuntu"&gt;Ubuntu bug tracker&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://wiki.ubuntu.com/GutsyReleaseSchedule"&gt;Gutsy Release Schedule&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://cdimage.ubuntu.com/releases/gutsy/tribe-1/"&gt;Gutsy Tribe-1 CDs&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://wiki.ubuntu.com/LiveUsbPendrivePersistent"&gt;Live Usb Pendrive Persistent&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;strong&gt;IRC CHANNELS&lt;/strong&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;(at irc.gnu.org)&lt;br /&gt;#ubuntu&lt;br /&gt;#ubuntu+1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-6351866997775181202?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/6351866997775181202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=6351866997775181202' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6351866997775181202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/6351866997775181202'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/06/ubuntu.html' title='Ubuntu'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-4611569143386488402</id><published>2007-06-17T17:14:00.001+02:00</published><updated>2008-02-19T13:07:30.889+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><category scheme='http://www.blogger.com/atom/ns#' term='commands'/><title type='text'>Bash tips</title><content type='html'>&lt;a href="http://builder.com.com/5100-6372_14-5827311.html"&gt;http://builder.com.com/5100-6372_14-5827311.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.expertsrt.com/tutorials/Matt/CmdPrompt.html"&gt;Customizing the bash command prompt&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;strong&gt;COMMAND REFERENCE&lt;/strong&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.perpetualpc.net/srtd_commands_rev.html"&gt;Linux Command Reference Index&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.pixelbeat.org/cmdline.html"&gt;Another command Reference&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.linuxdevcenter.com/linux/cmd/"&gt;O'Reilly Command Reference&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.karakas-online.de/gnu-linux-tools-summary/"&gt;GNU/Linux Command Line Tools Sumary&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.linuxcommand.org/learning_the_shell.php"&gt;Learning the Shell Tutorial&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;Changing X resolution&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;strong&gt;$xrandr&lt;/strong&gt;&lt;/code&gt;                #shows all available resolutions&lt;br /&gt;i.e: &lt;br /&gt;&lt;code&gt;SZ:    Pixels          Physical       Refresh&lt;br /&gt;*0   1024 x 768    ( 271mm x 203mm )  *61&lt;br /&gt; 1    800 x 600    ( 271mm x 203mm )   73&lt;br /&gt; 2    640 x 480    ( 271mm x 203mm )   73&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;now, to switch to 800x600 resolution we can exec:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;strong&gt;$xrandr -s 1&lt;/strong&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;or &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;strong&gt;$xrandr --size 800x600&lt;/strong&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;wait for 5 secs and voila! resolution changed!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; &lt;em&gt;another way to change resolution is pressing &lt;b&gt;ctrl&lt;/b&gt;+&lt;b&gt;alt&lt;/b&gt;+&lt;b&gt;+&lt;/b&gt; or &lt;b&gt;ctrl&lt;/b&gt;+&lt;b&gt;alt&lt;/b&gt;+&lt;b&gt;-&lt;/b&gt; keys&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; this command is very useful to change &lt;b&gt;qemu X-windows resolution&lt;/b&gt; when it is bigger than your screen.&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Listing file sizes in human readable form:&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;ls -l&lt;/code&gt;   # shows file sizes, usually in bytes.&lt;br /&gt;&lt;br /&gt;if you want to list them in a more readable way type:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;ls -lh&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; this "h" switch option also works with other commands like &lt;b&gt;df&lt;/b&gt;, &lt;b&gt;du&lt;/b&gt;, etc.&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Obtaining an ISO file from a CDRom&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;You need to now what device your cdrom drive is associated to: (In this example will be &lt;b&gt;/dev/sdX&lt;/b&gt;)&lt;br /&gt;&lt;br /&gt;exec this command:&lt;br /&gt;&lt;code&gt;dd if=/dev/sdX of=cdrom_image.iso bs=1000000&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;that makes a byte by byte copy from &lt;em&gt;/dev/sdX&lt;/em&gt; device (our cdrom) to &lt;em&gt;cdrom_image.iso&lt;/em&gt; file in 1000000 bytes size chunks.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; Change bs argument to suit your needs. That value has effect on the speed the copy is performed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-4611569143386488402?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/4611569143386488402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=4611569143386488402' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/4611569143386488402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/4611569143386488402'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/06/bash-tips.html' title='Bash tips'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-8748171222766157178</id><published>2007-06-12T17:05:00.000+02:00</published><updated>2007-07-28T09:18:58.161+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gparted'/><category scheme='http://www.blogger.com/atom/ns#' term='errors'/><title type='text'>Resizing partitions with GParted</title><content type='html'>&lt;a href="http://gparted.sourceforge.net"&gt;GParted&lt;/a&gt; stands for &lt;strong&gt;Gnome Partition Editor&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;GParted is an industrial-strength package for creating, destroying, resizing, moving, checking and copying partitions, and the filesystems on them. This is useful for creating space for new operating systems, reorganizing disk usage, copying data residing on hard disks and mirroring one partition with another (disk imaging).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Supported Filesystems&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;Before using GParted we should check if it supports the filesystems we want to deal with:&lt;br /&gt;&lt;a href="http://gparted.sourceforge.net/features.php"&gt;Filesystems supported &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Comparison_of_file_systems"&gt;More info about filesystems from Wikipedia.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Getting GParted&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;GParted is distributed within three ways, as &lt;strong&gt;source code&lt;/strong&gt;, as  &lt;strong&gt;live cd&lt;/strong&gt; or as &lt;strong&gt;live usb&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;I choose to download and use the live cdrom one: &lt;a href="http://gparted.sourceforge.net/livecd.php"&gt;GParted Live CD&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;So I download and burn it to a writable cd, and then boot my computer from this cdrom.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE:&lt;/b&gt; &lt;em&gt;When booting GParted live cd, my tft screen ends black. To solve that, press &lt;strong&gt;ctrl+alt+del&lt;/strong&gt;. Then at console mode exec &lt;strong&gt;#Forcevideo&lt;/strong&gt; and select a supported vesa video mode for the tft.&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-8748171222766157178?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/8748171222766157178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=8748171222766157178' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/8748171222766157178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/8748171222766157178'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/06/resizing-partitions-with-gparted.html' title='Resizing partitions with GParted'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-7283216327122327448</id><published>2007-06-10T22:21:00.000+02:00</published><updated>2007-07-28T09:17:30.398+02: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='errors'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Installing Qemu on Windows Vista</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/QEMU"&gt;Qemu introduction from Wikipedia&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;QEMU emulates a full computer system, including a processor and various peripherals. It can be used to provide virtual hosting of several virtual computers on a single computer.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Accelerator&lt;/b&gt;&lt;br /&gt;Qemu author, Fabrice Bellard, also wrote a Linux kernel module (with preliminary ports to FreeBSD and Windows) named KQEMU or QEMU Accelerator, which notably speeds up i386 emulation on i386 platforms. This is accomplished by running user mode code directly on the host computer's CPU, and using processor and peripheral emulation only for kernel mode and real mode code. KQEMU also supports a kernel emulation mode in which portions of kernel mode code run on the host's CPU&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Qemu official page:&lt;br /&gt;&lt;a href="http://fabrice.bellard.free.fr/qemu/"&gt;http://fabrice.bellard.free.fr/qemu/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Qemu ported to Windows:&lt;br /&gt;&lt;a href="http://www.h7.dion.ne.jp/~qemu-win/"&gt;http://www.h7.dion.ne.jp/~qemu-win/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;First we download a zip package:&lt;br /&gt;&lt;a href="http://www1.interq.or.jp/~t-takeda/qemu/qemu-0.9.0-windows.zip"&gt;qemu-0.9.0-windows.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Next unzip archives to a folder.&lt;br /&gt;&lt;br /&gt;There are some clues at file &lt;strong&gt;README-en.txt&lt;/strong&gt;, and a html manual at &lt;strong&gt;qemu-doc.html&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Qemu is now ready to be run:&lt;br /&gt;so exec &lt;strong&gt;qemu-win.bat&lt;/strong&gt; and a small linux test image &lt;strong&gt;"linux.img"&lt;/strong&gt; is emulated.&lt;br /&gt;&lt;br /&gt;NOTE: &lt;em&gt;When a mouse cursor is missing, type Ctrl and Alt key together. Please use Alt&lt;br /&gt;and Tab on WindowsMe.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;NOTE: &lt;em&gt;To exit from Linux, press Ctrl-Alt-2 keys together then you will see (qemu) prompt.&lt;br /&gt;&lt;br /&gt;Then type quit: &lt;code&gt;(qemu) quit&lt;/code&gt;&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Running Qemu:&lt;br /&gt;&lt;br /&gt;I have downloaded a Ubuntu iso cdrom image: &lt;strong&gt;ubuntu-7.04-desktop-i386.iso&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First I exec &lt;strong&gt;C:\Windows\System32\cmd.exe&lt;/strong&gt; to open a comand line window, and then:&lt;br /&gt;&lt;em&gt;&lt;code&gt;&gt;cd &amp;lt;qemu-directory-path&amp;gt;&lt;br /&gt;&gt;qemu -L . -m 512 -cdrom &lt;ubuntu-iso-path&gt;ubuntu-7.04-desktop-i386.iso&lt;br /&gt;&lt;/UBUNTU-ISO-PATH&gt;&lt;/code&gt;&lt;/em&gt;&lt;br /&gt;&lt;table width="75%" border="1"&gt;&lt;caption align="center"&gt;Argument options have the following meanings:&lt;/caption&gt;&lt;tr&gt;&lt;th&gt;Option&lt;/th&gt;&lt;th&gt;Value&lt;/th&gt;&lt;th&gt;Explanation&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;-L&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;bios path&lt;/td&gt;&lt;td&gt;in our example actual directory "."&lt;/td&gt;&lt;/tr&gt;&lt;td&gt;&lt;strong&gt;-m&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;available memory&lt;/td&gt;&lt;td&gt;Default is 128 meg, I set it to 512&lt;/td&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;-cdrom&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;iso cdrom image path&lt;/td&gt;&lt;td&gt;Iso image to emulate a cdrom&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Qemu gives this warning:&lt;br /&gt;&lt;em&gt;Could not open '\\.\kqemu' - QEMU acceleration layer not activated&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;To avoid this message, install &lt;strong&gt;qemu accelerator&lt;/strong&gt;, which will improve qemu speed:&lt;br /&gt;(NOTE: uninstall any previous version accelerator you have before installing this one)&lt;br /&gt;&lt;a href="http://www.h6.dion.ne.jp/~kazuw/qemu-win/Kqemu-1.3.0pre11-install.exe"&gt;Qemu accelerator Kqemu-1.3.0pre11&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;NETWORK SET UP FOR QEMU ON WINDOWS VISTA&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Right now we don't have network available. We check at this doc for some clues: &lt;a href="http://www.h7.dion.ne.jp/~qemu-win/HowToNetwork-en.html"&gt;HowToNetwork-en.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have decided to use a TAP (virtual ethernet network interface) to have full internet access: &lt;a href="http://www.h7.dion.ne.jp/~qemu-win/TapWin32-en.html"&gt;TapWin32-en.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;First we need a VPN driver for windows: &lt;a href="http://openvpn.net/download.html"&gt;OpenVPN driver download page&lt;/a&gt;.&lt;br /&gt;Download and install this program: &lt;a href="http://openvpn.net/release/openvpn-2.0.9-install.exe"&gt;openvpn-2.0.9-install.exe&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Once installed go to Programs menu and then&lt;br /&gt;&lt;em&gt;-&gt; OpenVPN -&gt; Add a new TAP-Win32 virtual ethernet adapter &lt;/em&gt;&lt;br /&gt;&lt;br /&gt;If all has gone fine, a tap device will appear at:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Control panel -&gt; Network and Sharing Center -&gt; Manage networks&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Remember the &lt;u&gt;TAP interface name&lt;/u&gt; because it will be passed as an argument to qemu, i.e. in my computer is &lt;em&gt;"Local area connection 2"&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now we have to establish a &lt;strong&gt;NETWORK SOFTWARE BRIDGE&lt;/strong&gt; in windows vista.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Network_bridge"&gt;Network bridge&lt;/a&gt; (Wikipedia)&lt;br /&gt;&lt;br /&gt;A network bridge connects multiple network segments at the &lt;strong&gt;data link layer (layer 2)&lt;/strong&gt; of the &lt;strong&gt;OSI model&lt;/strong&gt;.&lt;br /&gt;In our case the bridge will interconnect a real network interface with our TAP interface at data link layer, so &lt;strong&gt;both interfaces will share same IP address&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;Howto set up a network bridge at windows xp and vista: &lt;a href="http://www.windowsnetworking.com/articles_tutorials/wxpbrdge.html"&gt;Win XP network bridge set up.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Select both interfaces pressing ctrl key, and right click the mouse.&lt;br /&gt;Select &lt;em&gt;"Bridge connections"&lt;/em&gt; at the pop up menu and wait till network bridge will be completed.&lt;br /&gt;&lt;br /&gt;After bridge completion gonna set up its network configuration:&lt;br /&gt;&lt;em&gt;right click at bridge icon -&gt; properties -&gt; Internet protocol version 4&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;If you have a dhcp server you can set bridge interface to automatically get its IP address.&lt;br /&gt;&lt;br /&gt;I use a static network configuration at my LAN.&lt;br /&gt;&lt;br /&gt;(&lt;em&gt;change values to suit your network.)&lt;br /&gt;&lt;code&gt;IP 192.168.0.5&lt;br /&gt;netmask 255.255.255.0&lt;br /&gt;gateway 192.168.0.129&lt;br /&gt;&lt;br /&gt;DNS1 194.179.1.100&lt;br /&gt;DNS2 194.179.1.101&lt;/code&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;To check the network at console window we can make some pings:&lt;br /&gt;&lt;code&gt;ping 192.168.0.5&lt;br /&gt;ping 192.168.0.129 (checking gateway)&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Time of truth arrives, we launch qemu:&lt;br /&gt;&lt;code&gt;&lt;qemu-path&gt;qemu -L . -m 512 -cdrom ubuntu-7.04-desktop-i386.iso -net nic -net tap,ifname="Local area connection 2"&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;at ubuntu guest system I configure the network with a free IP address on my LAN:&lt;br /&gt;&lt;code&gt;&lt;em&gt;IP 192.168.0.10&lt;br /&gt;netmask 255.255.255.0&lt;br /&gt;gateway 192.168.0.129&lt;br /&gt;DNS 194.179...&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;pings work:&lt;br /&gt;ping 192.168.0.10&lt;br /&gt;ping 192.168.0.5&lt;br /&gt;ping 192.168.0.129 (checking the gateway)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;If you have Internet access through your LAN, you can now open a browser and surf on the Internet from inside your qemu guest system. :-)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;More info about bridging:&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/hnw_bridge_install.mspx?mfr=true"&gt;hnw_bridge_install&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/hnw_understanding_bridge.mspx?mfr=true"&gt;hnw_understanding_bridge&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;strong&gt;OTHER INTERESTING LINKS&lt;/strong&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.h7.dion.ne.jp/~qemu-win/HowToFloppyCdrom-en.html"&gt;Qemu HowTo Floppy Cdrom&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-7283216327122327448?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/7283216327122327448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=7283216327122327448' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/7283216327122327448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/7283216327122327448'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/06/installing-qemu-on-windows-vista.html' title='Installing Qemu on Windows Vista'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1810057280041377847.post-5825245664357461821</id><published>2007-06-08T23:54:00.003+02:00</published><updated>2008-08-11T18:31:35.206+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='distro'/><title type='text'>Debian GNU/Linux Distribution</title><content type='html'>&lt;a href="http://www.debian.org"&gt;&lt;b&gt;Debian GNU/Linux&lt;/b&gt;&lt;/a&gt; is an complete &lt;b&gt;Operating System&lt;/b&gt; based on the Linux kernel(there are also other platforms available).&lt;br /&gt;&lt;br /&gt;It is &lt;b&gt;developed in an open way by volunteers&lt;/b&gt; all over the world.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Debian"&gt;Debian&lt;/a&gt; (from Wikipedia)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;DEBIAN DISTRIBUTION PHILOSOPHY AND GOALS&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;These documents describe Debian philosophy.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.debian.org/doc/manuals/project-history/ap-manifesto.en.html"&gt;Debian Manifiesto&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.debian.org/social_contract"&gt;Debian Social Contract&lt;/a&gt;  - Describes Debian Goals.&lt;br /&gt;&lt;a href="http://www.debian.org/social_contract#guidelines"&gt;Debian Free Software Guidelines&lt;/a&gt; - Requirements software has to accomplish to be accepted as Debian Free Software.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Debian currently provides &lt;b&gt;over 26000 software packages&lt;/b&gt;, and targets &lt;b&gt;eleven hardware architectures&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Ubuntu&lt;/b&gt; distro and others like &lt;b&gt;Damn Small Linux, Knoppix, Xandros,&lt;/b&gt; etc are Debian based distributions. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;DEVELOPMENT PROCEDURE&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Debian has three main branches: &lt;strong&gt;unstable (sid), testing and stable&lt;/strong&gt;. &lt;br /&gt;&lt;br /&gt;The &lt;b&gt;stable&lt;/b&gt; one is suited for server environments. &lt;b&gt;Packages at this version are frozen&lt;/b&gt;, and there are &lt;b&gt;only security updates&lt;/b&gt;. (&lt;a href="http://www.debian.org/security/faq"&gt;Debian Security Faq&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;Usually &lt;b&gt;newer software package versions are added to the unstable branch&lt;/b&gt;. If no serious bugs are found, after some time, the package migrate to testing branch (its dependencies also have to be in the testing branch).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Stable branch regularly receive security updates&lt;/b&gt;. Using Debian Sid (unstable) means that you have the latest package versions at the cost of stability and security. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Debian repositories&lt;/u&gt;&lt;/b&gt; are separated into several &lt;b&gt;categories&lt;/b&gt;:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;main&lt;/b&gt;&lt;/li&gt; contains the main Debian repository.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;contrib&lt;/b&gt;&lt;/li&gt; contains software deployed under a free license but with non-free dependencies.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;non-free&lt;/b&gt;&lt;/li&gt;software that does not adhere to Debian free software guidelines.&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;DEBIAN PACKAGE MANAGEMENT SYSTEM&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;APT (Advanced Packaging Tool&lt;/b&gt;) is the Debian Package Management System. It is a user interface to some libraries that deal with software installation.&lt;br /&gt;&lt;br /&gt;It comprises a set of tools. e.g: &lt;b&gt;apt-get, apt-cache, apt-cdrom, ...  &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;APT tracks dependency problems, performing installation and removing of packages in the most suitable order. When you install a package &lt;b&gt;APT automatically installs all required dependencies&lt;/b&gt;. APT allows installing packages via network.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://linuxclues.blogspot.com/2007/07/apt-aptitude-dpkg-reference.html"&gt;Apt, Aptitude, Dpkg Reference Article&lt;/a&gt;.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;DEBIAN PACKAGE DEVELOPMENT&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Documentation about creating and maintaining Debian packages. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.debian.org/doc/devel-manuals"&gt;Developer manuals&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.debian.org/doc/manuals/maint-guide/index.en.html"&gt;Debian New Mantainers' Guide&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;OTHER DEBIAN RELATED LINKS&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://wiki.debian.org/"&gt;Debian Wiki&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.debian.org/doc/manuals/reference/index.en.html"&gt;Debian Reference&lt;/a&gt; (debian.org)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.debian.org/doc/FAQ/"&gt;Debian FAQ&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.debian.org/doc/FAQ/ch-support.en.html#s-debiandocs"&gt;Getting support for Debian GNU/Linux.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://packages.debian.org"&gt;Debian package list&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://forums.debian.net/"&gt;Debian Forums&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.debian-administration.org/"&gt;Debian Administration&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;IRC&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#debian&lt;/b&gt; irc channel at &lt;b&gt;irc.gnu.org&lt;/b&gt; server.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-5825245664357461821?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/5825245664357461821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=5825245664357461821' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/5825245664357461821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/5825245664357461821'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/06/debian-linux-distribution.html' title='Debian GNU/Linux Distribution'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-2375016157454351113</id><published>2007-05-20T01:18:00.000+02:00</published><updated>2007-06-08T23:56:24.604+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><title type='text'>Comparison of Linux distributions</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/Comparison_of_Linux_distributions"&gt;Wikipedia: Comparison of Linux distributions.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Each Distro has a package managing system, and uses a package format, i.e:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;deb&lt;/strong&gt; for Debian,&lt;br /&gt;&lt;strong&gt;rpm&lt;/strong&gt; for Fedora(Red Hat),&lt;br /&gt;&lt;strong&gt;tgz&lt;/strong&gt; for Slackware,&lt;br /&gt;...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-2375016157454351113?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/2375016157454351113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=2375016157454351113' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/2375016157454351113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/2375016157454351113'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/05/comparison-of-linux-distributions.html' title='Comparison of Linux distributions'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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-1810057280041377847.post-2866130627751783498</id><published>2007-05-19T14:31:00.000+02:00</published><updated>2007-06-26T08:55:21.650+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='livedistro'/><category scheme='http://www.blogger.com/atom/ns#' term='distro'/><title type='text'>LiveDistro List</title><content type='html'>Easiest way to begin with Linux based systems is using a &lt;a href="http://en.wikipedia.org/wiki/LiveCD"&gt;Live CD&lt;/a&gt; or &lt;a href="http://en.wikipedia.org/wiki/Live_USB"&gt;Live USB&lt;/a&gt; distribution.&lt;br /&gt;&lt;br /&gt;LiveDistro is a generic term for an operating system distribution that is executed upon boot, without previous installation on a hard drive. In fact, a hard drive is not needed at all. &lt;br /&gt;&lt;br /&gt;What in other distros would be stored in hard disk, is stored in RAM memory. That cuts down on the RAM available to applications, reducing performance somewhat. (Is recommended a minimum of 256 MB RAM)&lt;br /&gt;&lt;br /&gt;For a list of LiveDistros you can search at:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/List_of_LiveDistros"&gt;List of LiveDistros&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Comparison_of_Linux_LiveDistros"&gt;Comparison of Linux LiveDistros&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.livecdlist.com/"&gt;www.livecdlist.com&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;I have tested &lt;a href="http://www.ubuntu.com/"&gt;Ubuntu&lt;/a&gt; and &lt;a href="http://www.knoppix.net/"&gt;Knoppix&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Other insteresting links:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.linux-live.org/"&gt;Linux Live Scripts&lt;/a&gt; How to build your own LiveDistro.&lt;br /&gt;&lt;a href="http://gentoo-wiki.com/Talk:HOWTO_build_a_LiveCD_from_scratch"&gt;HOWTO build a LiveCD from scratch&lt;/a&gt; (gentoo-wiki).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1810057280041377847-2866130627751783498?l=linuxclues.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxclues.blogspot.com/feeds/2866130627751783498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1810057280041377847&amp;postID=2866130627751783498' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/2866130627751783498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1810057280041377847/posts/default/2866130627751783498'/><link rel='alternate' type='text/html' href='http://linuxclues.blogspot.com/2007/05/live-distro-list.html' title='LiveDistro List'/><author><name>Vicente Hernando</name><uri>http://www.blogger.com/profile/08115029329135594927</uri><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></feed>
