<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>dimitar.me &#187; Ubuntu</title>
	<atom:link href="http://dimitar.me/category/linux/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://dimitar.me</link>
	<description>Dimitar Darazhanski&#039;s blog.</description>
	<lastBuildDate>Wed, 01 Sep 2010 13:50:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Change the date and time (or any other EXIF image meta-data) of pictures with Ubuntu</title>
		<link>http://dimitar.me/change-the-date-and-time-or-any-other-exif-image-meta-data-of-pictures-with-ubuntu/</link>
		<comments>http://dimitar.me/change-the-date-and-time-or-any-other-exif-image-meta-data-of-pictures-with-ubuntu/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 20:04:06 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=984</guid>
		<description><![CDATA[There is a very flexible and easy Linux tool that helps you change the EXIF meta-data of images. It allows you to change individual files or whole bunch of them with one command. You can also put different rules about what files and how you want to change them if you need to. The program [...]]]></description>
			<content:encoded><![CDATA[<p>There is a very flexible and easy Linux tool that helps you change the EXIF meta-data of images. It allows you to change individual files or whole bunch of them with one command. You can also put different rules about what files and how you want to change them if you need to.</p>
<p>The program is called <em>exiftool</em>. So let&#8217;s install it first. </p>
<p>In terminal execute:</p>
<pre><code>sudo apt-get install libimage-exiftool-perl</code></pre>
<p>Now you are ready to start changing the meta-data of the images.</p>
<p>For example, if I wanted to change all the dates and times (DateTimeOriginal, CreateDate and ModifyDate) of the IMG_01.jpg file to the 8th of August 2010 at 3:35:33 PM I would do:</p>
<pre><code>exiftool -AllDates='2010:08:08 15:35:33' -overwrite_original IMG_01.jpg</code></pre>
<p>If I wanted to change the dates on all the files in the <em>&#8220;images&#8221;</em> directory, I would do:</p>
<pre><code>exiftool -AllDates='2010:08:08 15:35:33' -overwrite_original images</code></pre>
<p>The<em> &#8220;-overwrite_original&#8221;</em> option is necessary if you want to change the meta-data of the original images. If you omit that option, then exiftool will back-up the originals by making a copy of them and adding <em>&#8220;_original&#8221;</em> to the end of the file names.</p>
<p>If you want to change the dates to all the files in the &#8220;images&#8221; directory that were taken by a Cannon camera (and not touch the rest) I would do:</p>
<pre><code>exiftool -AllDates='2010:08:08 15:35:33' -if '$make eq "Canon"' -overwrite_original images</code></pre>
<p>As far as changing dates and times, there is another option of exiftool that lets you do time calculation. </p>
<p>For example, the other day I found out that my camera&#8217;s time was correct but the date was ahead by 30 days. That meant that all the photos I had taken lately had dates that were off by exactly 30 days. If I were to use the above examples I could set the dates individually (which would be a long and tedious process) or set all the images to the same date and time (which would be wrong). In this case I used the date calculating option and just executed:</p>
<pre><code>exiftool -AllDates-=720:00 -overwrite_original images</code></pre>
<p>That command subtracts 720 hours (30 days) off the dates of each image file in the images directory. Now every image has the exact date and time it was taken.</p>
<p>I have only scratched the surface of what this tool is capable of. For more information look at the man pages of the exiftool command.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/change-the-date-and-time-or-any-other-exif-image-meta-data-of-pictures-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Subversion and Subclipse for Eclipse on Ubuntu</title>
		<link>http://dimitar.me/install-subversion-and-subclipse-for-eclipse-on-ubuntu/</link>
		<comments>http://dimitar.me/install-subversion-and-subclipse-for-eclipse-on-ubuntu/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 19:03:32 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=875</guid>
		<description><![CDATA[If you do not have Eclipse installed yet, run: sudo apt-get install eclipse Install Subversion sudo apt-get install subversion Install the Subversion plugin for Eclipse Get the Java bindings for Subversion: sudo apt-get install libsvn-java Now we are ready to install the plugins in Eclipse. Open Eclipse. Go to Help -> Install New Software Then [...]]]></description>
			<content:encoded><![CDATA[<p>If you do not have Eclipse installed yet, run:</p>
<pre><code>sudo apt-get install eclipse</code></pre>
<p><b>Install Subversion</b></p>
<pre><code>sudo apt-get install subversion</code></pre>
<p><b>Install the Subversion plugin for Eclipse</b></p>
<p>Get the Java bindings for Subversion:</p>
<pre><code>sudo apt-get install libsvn-java</code></pre>
<p>Now we are ready to install the plugins in Eclipse.</p>
<p>Open Eclipse.</p>
<p>Go to Help -> Install New Software</p>
<p>Then hit the &#8220;Add&#8221; button.</p>
<p>Put &#8220;Subclipse 1.6.x (Eclipse 3.2+)&#8221; under Name and &#8220;http://subclipse.tigris.org/update_1.6.x&#8221; under Location:</p>
<div id="attachment_892" class="wp-caption aligncenter" style="width: 530px"><a href="http://dimitar.me/wp-content/uploads/2010/06/Subclipse1.png"><img src="http://dimitar.me/wp-content/uploads/2010/06/Subclipse1.png" alt="Add the libraries for Subclipse" title="Subclipse Libraries" width="520" height="409" class="size-full wp-image-892" /></a><p class="wp-caption-text">Add the libraries for Subclipse</p></div>
<p>The above is for Elclips 3.2+ and Subversion 1.6.x.</p>
<p>If you have different Eclipse or Subversion versions, check this list and substitute accordingly:<br />
<em><br />
Name: Subclipse 1.6.x (Eclipse 3.2+)<br />
URL:  http://subclipse.tigris.org/update_1.6.x</p>
<p>Name: Subclipse 1.4.x (Eclipse 3.2+)<br />
URL:  http://subclipse.tigris.org/update_1.4.x</p>
<p>Name: Subclipse 1.2.x (Eclipse 3.2+)<br />
URL:  http://subclipse.tigris.org/update_1.2.x</p>
<p>Name: Subclipse 1.0.x (Eclipse 3.0/3.1)<br />
URL:  http://subclipse.tigris.org/update_1.0.x<br />
</em><br />
More info about the different versions: <a target="_blank" href="http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA" onclick="pageTracker._trackPageview('/outgoing/subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA&amp;referer=');">http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA</a></p>
<p>Then hit &#8220;OK&#8221;. You will now be presented with these options:</p>
<div id="attachment_902" class="wp-caption aligncenter" style="width: 530px"><a href="http://dimitar.me/wp-content/uploads/2010/06/Subclipse2.png"><img src="http://dimitar.me/wp-content/uploads/2010/06/Subclipse2.png" alt="Subclipse Installation Options" title="Subclipse Installation Options" width="520" height="513" class="size-full wp-image-902" /></a><p class="wp-caption-text">Subclipse Installation Options</p></div>
<p>If you are unsure what Subclipse component you will need, you can check all of them. Also, keep in mind that you can always go back to this in the future and install/uninstall any of the components as needed.</p>
<p>Then &#8220;Next&#8221; and &#8220;Finish&#8221; on the subsequent screens.</p>
<p>After the plugins are installed, it will prompt you to restart Eclipse. Go ahead and do so.</p>
<p><b>You are not done yet. You need to fix the JavaHL.</b></p>
<p>Edit the <em>eclipse.ini</em> file:</p>
<pre><code>sudo vi /usr/lib/eclipse/eclipse.ini</code></pre>
<p>Add the following line under -vmargs:</p>
<p>-Djava.library.path=/usr/lib/jni</p>
<p>Here is what my <em>eclipse.ini</em> file looks like:</p>
<pre><code>$ cat /usr/lib/eclipse/eclipse.ini
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090520
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-startup
--launcher.library
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-startup
/usr/lib/eclipse/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
/usr/lib/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090520
-vmargs
-Djava.library.path=/usr/lib/jni
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=//usr/share/eclipse/dropins
-Xms40m
-Xmx256m
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=//usr/share/eclipse/dropins</code></pre>
<p>For more info on fixing JavaHL if you need it: <a target="_blank" href="http://subclipse.tigris.org/wiki/JavaHL#head-bb1dd50f9ec2f0d8c32246430c00e237d27a04fe" onclick="pageTracker._trackPageview('/outgoing/subclipse.tigris.org/wiki/JavaHL_head-bb1dd50f9ec2f0d8c32246430c00e237d27a04fe?referer=');">http://subclipse.tigris.org/wiki/JavaHL#head-bb1dd50f9ec2f0d8c32246430c00e237d27a04fe</a></p>
<p>You should be able to use Subversion with Eclipse for your projects at this point.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/install-subversion-and-subclipse-for-eclipse-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extract Audio (.mp3) from Video Files Like .flv, .mov, .avi and Others with Ubuntu</title>
		<link>http://dimitar.me/extract-audio-mp3-from-video-files-like-flv-mov-avi/</link>
		<comments>http://dimitar.me/extract-audio-mp3-from-video-files-like-flv-mov-avi/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 20:49:26 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=807</guid>
		<description><![CDATA[It is very easy to extract the audio track from video files using Linux. All you need is ffmpeg and some codecs. Let&#8217;s get started&#8230; Note: The commands below are for Ubuntu (or Debian derivatives) but you can do the same with any other Linux distribution provided you can install the necessary packages. 1. Add [...]]]></description>
			<content:encoded><![CDATA[<p>It is very easy to extract the audio track from video files using Linux. All you need is <em>ffmpeg</em> and some codecs.</p>
<p>Let&#8217;s get started&#8230;</p>
<p><em>Note:</em> The commands below are for Ubuntu (or Debian derivatives) but you can do the same with any other Linux distribution provided you can install the necessary packages.</p>
<p><strong>1. Add the Medibuntu&#8217;s repository to your sources.list:</strong></p>
<pre><code>sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list &#038;&#038; sudo apt-get --quiet update &#038;&#038; sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring &#038;&#038; sudo apt-get --quiet update</code></pre>
<p><strong>2. Install ffmpeg:</strong></p>
<pre><code>sudo apt-get install ffmpeg</code></pre>
<p><strong>3. Let&#8217;s get the restricted packages and some codecs installed:</strong></p>
<pre><code>sudo apt-get install ubuntu-restricted-extras libmp3lame0 libdvdcss2 w32codecs</code></pre>
<p>The above command is for i386 architecture. If you have an amd64 architecture, substitute <em>w32codecs</em> with <em>w64codecs</em>.</p>
<p><em>Note:</em> This is not a complete list of codec packages by any stretch of the imagination. It will get you started though and you will be able to do most formats, but you might have to add codecs as you go along.</p>
<p><strong>4. Now we are ready to extract the audio from the video files:</strong></p>
<pre><code>ffmpeg -i input_file.flv output_file.mp3</code></pre>
<p>The above command will extract the audio from a Flash video file. You can do the same for a QuickTime file as well:</p>
<pre><code>ffmpeg -i input_file.mov output_file.mp3</code></pre>
<p>Or for an Audio Video Interface file:</p>
<pre><code>ffmpeg -i input_file.avi output_file.mp3</code></pre>
<p><strong>YouTube and other video web sites:</strong></p>
<p>Having done all this, now we can download flash files from places like YouTube and strip the audio from them. All you need besides the steps above is a way to save the Flash files (.flv) from YouTube. An easy way to do that is by using Firefox Add-ons like <a href="https://addons.mozilla.org/en-US/firefox/addon/53003?src=api" onclick="pageTracker._trackPageview('/outgoing/addons.mozilla.org/en-US/firefox/addon/53003?src=api&amp;referer=');">Download Flash and Video</a> or <a href="https://addons.mozilla.org/en-US/firefox/addon/6584?src=api" onclick="pageTracker._trackPageview('/outgoing/addons.mozilla.org/en-US/firefox/addon/6584?src=api&amp;referer=');">Flash Video Downloader</a>.</p>
<p>The quality of the audio in the YouTube videos for example is 64 bit/sec. Most of the mp3 files are normally compressed to 128 bit/sec or above. Obviously the quality will not be the same, but a human year cannot tell the difference. </p>
<p>The quality of the extracted mp3 will depend on the quality of the audio track in the video file. So the above statement about the 64 bit/sec audio is mostly the case for the files on some video sharing sites.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/extract-audio-mp3-from-video-files-like-flv-mov-avi/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Resume Partial File Transfers</title>
		<link>http://dimitar.me/how-to-resume-partial-file-transfers/</link>
		<comments>http://dimitar.me/how-to-resume-partial-file-transfers/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 05:03:11 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MacOS X]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=793</guid>
		<description><![CDATA[I work primarily with UNIX and Linux machines and scp is my main choice to transfer files with. It is both convenient, short and secure. Example: scp localfile user@remotecomputer:/path/to/target/dir Recently I was transferring an 8GB file and due to a network issue, the transfer was interrupted at nearly 40%. I found a solution at joen.dk [...]]]></description>
			<content:encoded><![CDATA[<p>I work primarily with UNIX and Linux machines and <em>scp</em> is my main choice to transfer files with. It is both convenient, short and secure.<em></em><em></em></p>
<p>Example:</p>
<pre><code>scp localfile user@remotecomputer:/path/to/target/dir</code></pre>
<p>Recently I was transferring an 8GB file and due to a network issue, the transfer was interrupted at nearly 40%.</p>
<p>I found a solution at <a href="http://joen.dk/wordpress/?p=34" onclick="pageTracker._trackPageview('/outgoing/joen.dk/wordpress/?p=34&amp;referer=');">joen.dk</a> ,which uses <em>rsync</em> to resume the transfer:</p>
<pre><code>rsync --partial --progress --rsh=ssh host:remote_file local_file</code></pre>
<p>Now we can improve this slightly by shortening the above command. We can substitute <em>&#8211;rsh=ssh</em> with <em>-e ssh</em>, and use <em>-P</em> instead of <em>&#8211;partial &#8211;progress</em>. Also, you can add <em>user@host</em> if you need to specify a different remote shell user:</p>
<pre><code>rsync -P -e ssh user@host:remote_file local_file</code></pre>
<p>This above example will work with any file that was partially transfered. How the transfer was started does not really matter. It could be through scp, nc or even ftp. After you execute the above command it will take <em>rsync</em> a little time to verify the previously downloaded part before it continues with the rest. Be patient, depending on your network speed <em>rsync</em> could take some time to go through what you have already transfered. Of course this is much faster than if you were to start the download all over again and it shows you the progress in percentages.</p>
<p>Keep in mind that there have to be a couple of requirements in place in order to resume the file transfer with <em>rsync</em>:</p>
<p>1. You should have remote shell access.<br />
2. The remote machine should have rsync installed. Since rsync is by default on most Linux distributions that generally should not be an issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/how-to-resume-partial-file-transfers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert Quicktime Movies to AVI encoded with MPEG-4 (MOV to AVI) with Linux/Ubuntu</title>
		<link>http://dimitar.me/convert-quicktime-movies-to-avi-encoded-with-mpeg-4-mov-to-avi-with-linuxubuntu/</link>
		<comments>http://dimitar.me/convert-quicktime-movies-to-avi-encoded-with-mpeg-4-mov-to-avi-with-linuxubuntu/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 05:31:15 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=764</guid>
		<description><![CDATA[A lot of camcorders record in the .mov (Quicktime) format. It has high quality video and depending on the underlying codec it provides a good compression, but it is too proprietary and very often you might not be able to play it on different devices. AVI on the other hand is more widely accepted format. [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of camcorders record in the .mov (Quicktime) format. It has high quality video and depending on the underlying codec it provides a good compression, but it is too proprietary and very often you might not be able to play it on different devices.  </p>
<p>AVI on the other hand is more widely accepted format. AVI, like MOV, is a media container that envelops encoded media. In this example we will convert Quicktime video (.mov) to .avi that contains media encoded with mpeg-4.</p>
<p>If you want to preserve the original quality and resolution with pcm_u8 (analog 8bit) audio:</p>
<pre><code>ffmpeg -i inputfile.mov -sameq -vcodec msmpeg4v2 -acodec pcm_u8 outputfile.avi</code></pre>
<p>Obviously I would prefer something better for the sound so I normally use the mp3 as an audio codec. To do this make sure that you have the libmp3lame0 package installed to do that:</p>
<pre><code>sudo apt-get install libmp3lame0</code></pre>
<p>And then:</p>
<pre><code>ffmpeg -i inputfile.mov -sameq -vcodec msmpeg4v2 -acodec libmp3lame outputfile.avi</code></pre>
<p>If you want to change the resolution then add the -s option and specify the horizontal and vertical resolution. Make sure to preserve the original aspect ratio:</p>
<pre><code>ffmpeg -i inputfile.mov -s 960x540 -sameq -vcodec msmpeg4v2 -acodec libmp3lame outputfile.avi</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/convert-quicktime-movies-to-avi-encoded-with-mpeg-4-mov-to-avi-with-linuxubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Broadcom Wireless Chipset (BCM4311, BCM4312, BCM4321, and BCM4322) on Ubuntu Karmic.</title>
		<link>http://dimitar.me/broadcom-wireless-chipset-bcm4311-bcm4312-bcm4321-and-bcm4322-on-ubuntu-karmic/</link>
		<comments>http://dimitar.me/broadcom-wireless-chipset-bcm4311-bcm4312-bcm4321-and-bcm4322-on-ubuntu-karmic/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 21:24:32 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=728</guid>
		<description><![CDATA[If you have a Broadcom wireless chipset BCM4311, BCM4312, BCM4321, or BCM4322 it will not work with Ubuntu Karmic after an upgrade or an install. To get it working, you need to install the STA driver. You can get it from the Broadcom site: http://www.broadcom.com/support/802.11/linux_sta.php Follow the instructions in the README.txt file which is on [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a Broadcom wireless chipset BCM4311, BCM4312, BCM4321, or BCM4322 it will not work with Ubuntu Karmic after an upgrade or an install.</p>
<p>To get it working, you need to install the STA driver. You can get it from the Broadcom site:</p>
<p><a href="http://www.broadcom.com/support/802.11/linux_sta.php" onclick="pageTracker._trackPageview('/outgoing/www.broadcom.com/support/802.11/linux_sta.php?referer=');">http://www.broadcom.com/support/802.11/linux_sta.php</a></p>
<p>Follow the instructions in the README.txt file which is on same page.</p>
<p>After you have finished installing it the wireless will work, but only until the next reboot. To make this permanent follow these steps:</p>
<p>1. Run:</p>
<pre><code>sudo rmmod ssb</code></pre>
<p>For some reason you cannot blacklist the ssb module. It always runs on boot even if it is in the blacklist.conf file.<br />
After that you need to run this to get rid of the ssb module permanently:</p>
<pre><code>sudo update-initramfs -u</code></pre>
<p>2. Now that we got rid of ssb, we need to make sure that lib80211 is loaded on boot. To do that add lib80211 to the end of the /etc/modules file:</p>
<pre><code>echo "lib80211" | sudo tee -a /etc/modules</code></pre>
<p>I went ahead and added wl to it as well:</p>
<pre><code>echo "wl" | sudo tee -a /etc/modules</code></pre>
<p>So the /etc/modules file looks like this:</p>
<pre><code>
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
lp
rtc
lib80211
wl
</code></pre>
<p>3. Now we need to make sure that &#8220;insmod wl.ko&#8221; as specified in the README.txt file runs every time we boot. There might be a better way to do this but I just added it to the /etc/rc.local file.</p>
<p>Before I did this I copied the wl.ko file to the /lib/modules/2.6.31-14-generic/kernel/lib directory. This way we can get rid of the source files we downloaded from the Broadcom site along with the binaries we compiled and not worry about losing the wl.ko file:</p>
<pre><code>sudo cp wl.ko  /lib/modules/2.6.31-14-generic/kernel/lib</code></pre>
<p>Then add the line &#8220;insmod /lib/modules/2.6.31-14-generic/kernel/lib/wl.ko&#8221; at the end of the rc.local file, right above the exit 0 line:</p>
<pre><code>sudo gedit /etc/rc.local</code></pre>
<p>Here is how the rc.local file looks:</p>
<pre><code>cat /etc/rc.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

insmod /lib/modules/2.6.31-14-generic/kernel/lib/wl.ko
exit 0
</code></pre>
<p>4. Last step is to pin down the linux kernel so that we don&#8217;t upgrade the kernel accidentally along with the other updates:</p>
<p>System -> Administration -> Synaptic Package Manager</p>
<p>Then click on the &#8220;Status&#8221; button and select &#8220;Installed&#8221;. Then search for &#8220;linux-&#8221;. Select all packages that start with &#8220;linux-&#8221; and then Package -> Lock Version.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/broadcom-wireless-chipset-bcm4311-bcm4312-bcm4321-and-bcm4322-on-ubuntu-karmic/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Clone Disk Drives with Ubuntu. Make an Exact Copy of Your Hard Drive.</title>
		<link>http://dimitar.me/clone-disk-drives-with-ubuntu/</link>
		<comments>http://dimitar.me/clone-disk-drives-with-ubuntu/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 05:16:02 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=660</guid>
		<description><![CDATA[Before I start, I would like to clarify that this step by step tutorial applies not only to duplicating hard drives that have Linux OS on them. You can clone pretty much any drive. What is on the hard disk is irrelevant; it could be Windows, Mac OS, Linux, just data, etc. There have to [...]]]></description>
			<content:encoded><![CDATA[<p>Before I start, I would like to clarify that this step by step tutorial applies not only to duplicating hard drives that have Linux OS on them. You can clone pretty much any drive. What is on the hard disk is irrelevant; it could be Windows, Mac OS, Linux, just data, etc. There have to be just a few basic things in place:</p>
<ol>
<li>The target drive should be the same size or bigger than the source disk drive.</li>
<li>Have a Linux Live CD or a Linux bootable USB drive or some other way of booting into Linux (we will be using Ubuntu&#8217;s Live CD for this tutorial).</li>
<li>Access to the internet.</li>
<li>There is a presumption that you know how to install a hard drive.</li>
</ol>
<p>Making an exact copy of a hard drive (or any drive for that matter &#8211; CD, DVD, USB, etc.) is very easy and quick with Linux. One of the most popular commands on Linux to do this is <em>dd</em>. It is a very powerful utility that was originally developed for the UNIX operating system and is now default on every Linux distribution. It does a bit for bit copy of the data and it does not care about cylinders, partitions or files. Here is an example of a dd command that would make an exact copy of one disk to another:</p>
<p><em>dd if=/dev/sda of=/dev/sdb bs=64k</em></p>
<p>The <em>bs</em> option specifies the block size and it could be omitted, but it would speed up the process since the default block size is only 512 bits. <em>dd </em>is very effective and powerful command but it is not very suitable when you are trying to make a copy of a failing or failed disk. <em>dd</em> is not designed to read and recover bad sectors.</p>
<p>There are a number of other open source programs developed since <em>dd</em> (<em>dd</em> variants) that would address situations where there might be some bad drive sectors and they perform faster and more efficient than dd. Some of those are: <em>dd_rescue</em>, <em>dd_rhelp</em> and <em>GNU ddrescue</em>. <em>GNU ddrescue</em> is the one that I would recommend using if you want to clone a drive. It works both for a perfectly good drives that you would like to clone and for failed drives that you would want to recover data from.</p>
<p><strong>Install the new drive.</strong></p>
<p>The new drive should be of the same or bigger size. You might have to get the BIOS to recognize the new disk; in most cases that is not necessary. After you have put the drive in, boot into Linux from another device. An Ubuntu Live CD would be perfect for that. You can download an ISO image from <a href="http://www.ubuntu.com/getubuntu/download" onclick="pageTracker._trackPageview('/outgoing/www.ubuntu.com/getubuntu/download?referer=');">here</a>.</p>
<p>Now you have to find out what the drives&#8217; logical names are. Open up a terminal window: <em>Accessories -&gt; Terminal</em> or<em> Alt + F2</em>, then type in <em>gnome-terminal</em> and hit Enter.<br />
In the terminal window type <em>sudo lshw -C disk</em>:</p>
<pre><code>
sudo lshw -C disk
  *-disk:0
       description: ATA Disk
       product: WDC WD400BB-75FJ
       vendor: Western Digital
       physical id: 0
       bus info: scsi@0:0.0.0
       logical name: /dev/sda
       version: 14.0
       serial: WD-WMAJA3488275
       size: 37GiB (40GB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 signature=000b280f
  *-disk:1
       description: ATA Disk
       product: ST340016A
       vendor: Seagate
       physical id: 1
       bus info: scsi@0:0.1.0
       logical name: /dev/sdb
       version: 3.75
       serial: 3HS63J2C
       size: 37GiB (40GB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 signature=000b280f
  *-cdrom:0
       description: SCSI CD-ROM
       physical id: 2
       bus info: scsi@1:0.0.0
       logical name: /dev/cdrom
       logical name: /dev/scd0
       logical name: /dev/sr0
       capabilities: audio
       configuration: status=nodisc
</code></pre>
<p>In my case I have two disks- <em>disk:0</em> and <em>disk:1</em>. The logical name of <em>disk:0</em> is <em>/dev/sda</em> and the one for the second disk is <em>/dev/sdb</em>. Make a note of that. In your case that might be different. Identify which drive will be the source and which one the copy. There are 2 things in the above output that will help you do that- the <em>product</em> and the <em>size</em>. You can also use the command <em>sudo fdisk -l</em>. It will show you the hard drives and their partitions.</p>
<p><strong>Prepare the target drive.</strong></p>
<p>Now that you have identified the target drive you need to put an initial partition on it. In the terminal window you have opened execute:</p>
<pre><code>cfdisk -z /dev/sdb</code></pre>
<p>The cfdisk program will start, then type <em>W</em> and then <em>yes</em> to confirm. This is simple enough but you could also use the GParted program that comes with Ubuntu to do the same.</p>
<p><strong>Install the GNU ddrescue program</strong></p>
<p>Before you can install ddrescue you need to enable the Universe Software Repository. Go to <em>System -&gt; Administration -&gt; Software Sources</em> and then check the box next to &#8220;<em>Community-maintained Open Source software (universe)</em>&#8220;. Close the window. It will ask you to whether you want to refresh the list of software- go ahead and agree to that. After it finishes you can install <em>ddrescue</em> by running this in the terminal window:</p>
<pre><code>sudo apt-get install gddrescue</code></pre>
<p><strong>Clone the disk.</strong></p>
<p>Now you are ready to clone the drive by executing <em>ddrescue</em>. Specify the source disk first and then the target disk. You can use the -v option to be able to see the progress of the operation:</p>
<pre><code>sudo ddrescue -v /dev/sda /dev/sdb</code></pre>
<p><em>Make sure you get the order of the drives right or you could overlay the old drive with the new drive and loose all the data!</em></p>
<p>Depending on the size of your source drive this operation could take a couple of hours or even more. Once it finishes the new drive will be an exact copy of the old one. You can run a quick check on the file systems of the new drive:</p>
<pre><code>e2fsck -fp /dev/sdb1</code></pre>
<p>If the new drive is bigger than the old one you need to extend the partition(s) on it or create another one to make use of the rest of the space. The GParted program that comes with Ubuntu is ideal for this.</p>
<p>Once you are done, remove the old drive and boot from the new disk.</p>
<p>Credit: <a href="http://www.amazon.com/exec/obidos/asin/1934356220/vasoft-20" onclick="pageTracker._trackPageview('/outgoing/www.amazon.com/exec/obidos/asin/1934356220/vasoft-20?referer=');">Ubuntu Kung Fu</a>. <a href="http://www.linux.com/learn/tutorials/8225-clone-your-ubuntu-installation-onto-a-new-hard-disk" onclick="pageTracker._trackPageview('/outgoing/www.linux.com/learn/tutorials/8225-clone-your-ubuntu-installation-onto-a-new-hard-disk?referer=');">Published article from the book</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/clone-disk-drives-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Manage What Applications to Run on Boot in Ubuntu</title>
		<link>http://dimitar.me/manage-what-applications-to-run-on-boot-in-ubuntu/</link>
		<comments>http://dimitar.me/manage-what-applications-to-run-on-boot-in-ubuntu/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 03:48:34 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=637</guid>
		<description><![CDATA[Update: November 20th, 2009 I am not sure what I was thinking when I wrote this post, but if you want to easily control the programs that run on boot from a graphical interface go to: System -> Administration -> BootUP-Manager. If you do not have BootUP-Manager do &#8220;sudo apt-get install bum&#8221;. If you want [...]]]></description>
			<content:encoded><![CDATA[<hr />
Update: November 20th, 2009<br />
I am not sure what I was thinking when I wrote this post, but if you want to easily control the programs that run on boot from a graphical interface go to: System -> Administration -> BootUP-Manager. If you do not have BootUP-Manager do &#8220;sudo apt-get install bum&#8221;.<br />
If you want to know how to do this from command line, read below. </p>
<hr />
<p>After I installed vmware server 2.0.2 on my Ubuntu 9.10 machine I realized that it would start every time the computer boots up. This makes total sense to be the default behavior, since you would like your guests to be automatically up and running again after a reboot. But in my case I only used a guest OS every once and a while so I do not want to have all the vmware server processes running on the background for no reason. And since vmware uses a browser based management console it also starts apache and java. That is too much stuff running in vain if you are not going to be using vmware.</p>
<p>My first notion was to check <em>System -> Preferences -> Startup Applications</em> but to my surprise it did not contain the vmware server application. </p>
<p>Since I knew that vmware server can be started or stopped with the /etc/init.d/vmware script, I was fairly sure that the installation had put some links in the rc.d directories to that file.</p>
<p>That meant using the <em>update-rc.d</em> command line utility. It manages all the links in the /etc/rc?.d directories where the &#8220;?&#8221; is the run level. So you can configure any application that has a script in the /etc/init.d directory to start (or not to start) on boot. You can also easily create your own init.d script by just copying and modifying an existent one.</p>
<p>So, first I checked if vmware has set up any links in the rc.d directories:</p>
<pre><code>
ls -l /etc/rc?.d/*vmware
lrwxrwxrwx 1 root root 16 2009-11-03 21:44 /etc/rc0.d/K20vmware -> ../init.d/vmware
lrwxrwxrwx 1 root root 16 2009-11-03 21:44 /etc/rc1.d/K20vmware -> ../init.d/vmware
lrwxrwxrwx 1 root root 16 2009-11-03 21:44 /etc/rc2.d/S20vmware -> ../init.d/vmware
lrwxrwxrwx 1 root root 16 2009-11-03 21:44 /etc/rc3.d/S20vmware -> ../init.d/vmware
lrwxrwxrwx 1 root root 16 2009-11-03 21:44 /etc/rc4.d/S20vmware -> ../init.d/vmware
lrwxrwxrwx 1 root root 16 2009-11-03 21:44 /etc/rc5.d/S20vmware -> ../init.d/vmware
lrwxrwxrwx 1 root root 16 2009-11-03 21:44 /etc/rc6.d/K20vmware -> ../init.d/vmware</code></pre>
<p>If you notice some of the link names start with &#8220;K&#8221; and some with &#8220;S&#8221;. &#8220;K&#8221; means &#8220;kill&#8221; and &#8220;S&#8221; means &#8220;start&#8221;.</p>
<p>To prevent vmware from starting at boot run the following command:</p>
<pre><code>sudo update-rc.d -f vmware remove</code></pre>
<p>This will remove all the links to the /etc/init.d/vmware script. The &#8220;f&#8221; option here is necessary because it forces update-rc.d to remove the links even though the /etc/init.d/vmware still exists. If you do not specify the &#8220;f&#8221; option you will have to delete this init.d script first.</p>
<p>If you want to restore the vmware application to run at boot again:</p>
<pre><code>sudo update-rc.d vmware defaults</code></pre>
<p><a href="http://www.debuntu.org/how-to-manage-services-with-update-rc.d" onclick="pageTracker._trackPageview('/outgoing/www.debuntu.org/how-to-manage-services-with-update-rc.d?referer=');">Debuntu.org</a> has a more detailed explanation of <em>update-rc.d</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/manage-what-applications-to-run-on-boot-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Madwifi drivers for Ubuntu 9.10 (Karmic Koala) or linux kernels 2.6.29 and above.</title>
		<link>http://dimitar.me/madwifi-drivers-for-ubuntu-9-10-karmic-koala-or-linux-kernels-2-6-29-and-above/</link>
		<comments>http://dimitar.me/madwifi-drivers-for-ubuntu-9-10-karmic-koala-or-linux-kernels-2-6-29-and-above/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 02:50:36 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=616</guid>
		<description><![CDATA[After upgrading to the latest Ubuntu version 9.10 I could no longer compile and install the madwifi drivers. Here are the compilation errors I was getting: In file included from /home/user/madwifi/madwifi-hal-0.10.5.6/ath/../net80211/ieee80211_monitor.h:34, from /home/user/madwifi/madwifi-hal-0.10.5.6/ath/if_ath.c:75: /home/user/madwifi/madwifi-hal-0.10.5.6/ath/../ath/if_athvar.h:107: error: conflicting types for 'irqreturn_t' include/linux/irqreturn.h:16: note: previous declaration of 'irqreturn_t' was here /home/user/madwifi/madwifi-hal-0.10.5.6/ath/if_ath.c: In function 'ath_attach': /home/user/madwifi/madwifi-hal-0.10.5.6/ath/if_ath.c:478: error: 'struct net_device' [...]]]></description>
			<content:encoded><![CDATA[<p>After upgrading to the latest Ubuntu version 9.10 I could no longer compile and install the madwifi drivers. Here are the compilation errors I was getting:</p>
<pre><code>In file included from /home/user/madwifi/madwifi-hal-0.10.5.6/ath/../net80211/ieee80211_monitor.h:34,
from /home/user/madwifi/madwifi-hal-0.10.5.6/ath/if_ath.c:75:
/home/user/madwifi/madwifi-hal-0.10.5.6/ath/../ath/if_athvar.h:107: error: conflicting types for 'irqreturn_t'
include/linux/irqreturn.h:16: note: previous declaration of 'irqreturn_t' was here
/home/user/madwifi/madwifi-hal-0.10.5.6/ath/if_ath.c: In function 'ath_attach':
/home/user/madwifi/madwifi-hal-0.10.5.6/ath/if_ath.c:478: error: 'struct net_device' has no member named 'priv'
/home/user/madwifi/madwifi-hal-0.10.5.6/ath/if_ath.c:819: error: 'struct net_device' has no member named 'open'
/home/user/madwifi/madwifi-hal-0.10.5.6/ath/if_ath.c:820: error: 'struct net_device' has no member named 'stop'
/home/user/madwifi/madwifi-hal-0.10.5.6/ath/if_ath.c:821: error: 'struct net_device' has no member named 'hard_start_xmit'
/home/user/madwifi/madwifi-hal-0.10.5.6/ath/if_ath.c:822: error: 'struct net_device' has no member named 'tx_timeout'
.....
.....
.....
make[3]: *** [/home/user/madwifi/madwifi-hal-0.10.5.6/ath/if_ath.o] Error 1
make[2]: *** [/home/user/madwifi/madwifi-hal-0.10.5.6/ath] Error 2
make[1]: *** [_module_/home/user/madwifi/madwifi-hal-0.10.5.6] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.31-14-generic'
make: *** [modules] Error 2</pre>
<p></code></p>
<p>This is due to the fact that there was a change in the kernel headers. The new kernels replaced the old net_device structure with a new one called net_device_ops. It looks like this change exists since kernel 2.6.29 and up.</p>
<p>There currently is no stable release of the madwifi drivers for the new kernerls. But the madwifi project's latest trunk compiles and works fine (at least for me) and I have not noticed any issues yet. This should work with any Linux distribution with a kernel of 2.6.29 and above. To find out your kernel version run:</p>
<pre><code>uname -r</pre>
<p></code></p>
<p>Here is how to get and install it:</p>
<p>1. You can either get the latest trunk from the madwifi website at <a href="http://snapshots.madwifi-project.org/madwifi-trunk-current.tar.gz" onclick="pageTracker._trackPageview('/outgoing/snapshots.madwifi-project.org/madwifi-trunk-current.tar.gz?referer=');">http://snapshots.madwifi-project.org/madwifi-trunk-current.tar.gz</a> or use the one that worked for me: <a href="http://dimitar.me/wp-content/uploads/2009/10/madwifi-trunk-r4099-20090929.tar.gz">madwifi-trunk-r4099-20090929.tar.gz</a></p>
<p>2. Download and uncompress the files:</p>
<p>Provided you downloaded the madwifi-trunk-r4099-20090929.tar.gz file, cd to the directory containing the file. Then gunzip and untar the files:</p>
<pre><code>tar -xvzf madwifi-trunk-r4099-20090929.tar.gz</pre>
<p></code></p>
<p>Cd into the newly created directory:</p>
<pre><code>cd madwifi-trunk-r4099-20090929</pre>
<p></code></p>
<p>3. Install the drivers:</p>
<p>First make sure you have the kernel headers:</p>
<pre><code>sudo apt-get install build-essential</pre>
<p></code></p>
<p>Now compile and install:</p>
<pre><code>sudo make
sudo make install</pre>
<p></code></p>
<p>4. Add the ath_pci module to the kernel:</p>
<p>You need to add a line to the end of the /etc/modules file. The line should read: ath_pci. You can do this with vi of course, but if you don't know the vi editor then it would be much easier to use gedit. So, do:</p>
<pre><code>sudo gedit /etc/modules</pre>
<p></code></p>
<p>Add ath_pci to the end of the file. Here is how my file looks:</p>
<pre><code># /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

lp
sbp2
ath_pci</pre>
<p></code></p>
<p>At this point you can reboot and you should have wireless. You could save yourself a reboot by modprobing the kernel with the ath_pci module like this:</p>
<pre><code>sudo modprobe ath_pci</pre>
<p></code></p>
<p>You should be good to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/madwifi-drivers-for-ubuntu-9-10-karmic-koala-or-linux-kernels-2-6-29-and-above/feed/</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
		<item>
		<title>Ubuntu &#8211; Choose what volume to control with your keyboard sound controls</title>
		<link>http://dimitar.me/ubuntu-choose-what-volume-to-control-with-your-keyboard-sound-controls/</link>
		<comments>http://dimitar.me/ubuntu-choose-what-volume-to-control-with-your-keyboard-sound-controls/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 04:01:52 +0000</pubDate>
		<dc:creator>dimitar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dimitar.me/?p=566</guid>
		<description><![CDATA[Like any other laptop my Acer has a designated keyboard sound control. I can turn the volume up, down or mute it all together. This was working fine until one day I decided to mess with a couple of microphones (the built in and an external one). All of a sudden I noticed that my [...]]]></description>
			<content:encoded><![CDATA[<p>Like any other laptop my Acer has a designated keyboard sound control. I can turn the volume up, down or mute it all together. This was working fine until one day I decided to mess with a couple of microphones (the built in and an external one). All of a sudden I noticed that my volume knob no longer controlled the speaker volume but the microphone (input) sound instead.</p>
<p>I automatically decided that I had somehow messed up the kernel keycodes or the GNOME key mapping. After spending sometime looking into this I found out that the issue was much simpler than this.</p>
<p>I must have looked at least a half dozen times at the sound dialog (Preferences-&gt;Sound) but on the n-th time I realized what the issue was.</p>
<p>If you look at the bottom of it you will see a section called &#8220;Default Mixer Tracks&#8221;, then there is a drop down to choose the device and a text box with a bunch of different options:</p>
<div id="attachment_573" class="wp-caption aligncenter" style="width: 521px"><a href="http://dimitar.me/wp-content/uploads/2009/09/SoundPreferences.jpg"><img class="size-full wp-image-573" title="SoundPreferences" src="http://dimitar.me/wp-content/uploads/2009/09/SoundPreferences.jpg" alt="Sound Preferences" width="511" height="446" /></a><p class="wp-caption-text">Sound Preferences</p></div>
<p>Notice the quick explanation at the very bottom: &#8220;Select the device and tracks to control with the keyboard&#8230;&#8221;. They have to put this in red font for ignorant people like me! I only noticed it after I had found out the problem.</p>
<p>I had changed the device in this section to &#8220;Capture: HDA Intel&#8221; when I was playing with the microphones. All I had to do is put it back to &#8220;HDA Intel (Alsa mixer)&#8221; and then picked the master track. Then I was back in business&#8230;</p>
<p>It is good to know that I can easily change what volume my keyboard controls are in charge of without having to mess with the GNOME key tables.</p>
<p>If you have a problem where the computer does not even respond to a keyboard event, look at this<a title="https://help.ubuntu.com/community/MultimediaKeys" href="https://help.ubuntu.com/community/MultimediaKeys" target="_blank" onclick="pageTracker._trackPageview('/outgoing/help.ubuntu.com/community/MultimediaKeys?referer=');"> entry</a> in the Ubuntu wiki. It has a good explanation of how to diagnose and fix the issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimitar.me/ubuntu-choose-what-volume-to-control-with-your-keyboard-sound-controls/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
