<?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>Jason L. Froebe - Tech tips and How Tos for Fellow Techies &#187; ubuntu</title>
	<atom:link href="http://froebe.net/blog/index.php/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://froebe.net/blog</link>
	<description>Tips &#38; Tricks for Databases (Sybase, Oracle, MySQL, PostgreSQL, SQLite), Windows, Linux, Solaris, Perl, Java, Bash and so much much more</description>
	<lastBuildDate>Sat, 07 Jan 2012 22:12:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>if you&#8217;re unable to install the broadcom sta driver on ubuntu 11.04&#8230; we have the answer</title>
		<link>http://froebe.net/blog/2011/04/29/if-youre-unable-to-install-the-broadcom-sta-driver-on-ubuntu-11-04-we-have-the-answer/</link>
		<comments>http://froebe.net/blog/2011/04/29/if-youre-unable-to-install-the-broadcom-sta-driver-on-ubuntu-11-04-we-have-the-answer/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 23:38:45 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[11.04]]></category>
		<category><![CDATA[broadcom]]></category>
		<category><![CDATA[driver]]></category>
		<category><![CDATA[natty]]></category>
		<category><![CDATA[sta]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=1320</guid>
		<description><![CDATA[if you&#8217;re unable to install the broadcom sta driver on ubuntu 11.04, fire up synaptic and reinstall bcmwl-kernel-source 2011-04-29 18:29:50,089 WARNING: /sys/module/wl/drivers does not exist, cannot rebind wl driver it should work now]]></description>
			<content:encoded><![CDATA[<p>if you&#8217;re unable to install the broadcom sta driver on ubuntu 11.04, fire up synaptic and reinstall bcmwl-kernel-source</p>
<p>2011-04-29 18:29:50,089 WARNING: /sys/module/wl/drivers does not exist, cannot rebind wl driver</p>
<p>it should work now <img src='http://froebe.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2011/04/29/if-youre-unable-to-install-the-broadcom-sta-driver-on-ubuntu-11-04-we-have-the-answer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install PostgreSQL 9 on Ubuntu Linux 10.04/10.10</title>
		<link>http://froebe.net/blog/2010/12/18/how-to-install-postgresql-9-on-ubuntu-linux-10-0410-10/</link>
		<comments>http://froebe.net/blog/2010/12/18/how-to-install-postgresql-9-on-ubuntu-linux-10-0410-10/#comments</comments>
		<pubDate>Sat, 18 Dec 2010 15:59:32 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[DBMS]]></category>
		<category><![CDATA[Dctr Watson]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[postgres]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=1298</guid>
		<description><![CDATA[Very easy, just add a repository and run apt-get install postresql-9.0 Dctr Watson explains how: Installing PostgreSQL 9.0 on Ubuntu 10.04]]></description>
			<content:encoded><![CDATA[<p>Very easy, just add a repository and run apt-get install postresql-9.0 <img src='http://froebe.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <a href="http://www.postgresql.org"><img class="alignright" title="PostgreSQL" src="http://www.postgresql.org/layout/images/hdr_left.png" alt="" width="230" height="80" /></a></p>
<p><a href="http://www.dctrwatson.com/">Dctr Watson</a> explains how:</p>
<h2><a href="http://www.dctrwatson.com/2010/09/installing-postgresql-9-0-on-ubuntu-10-04/">Installing PostgreSQL 9.0 on Ubuntu 10.04</a></h2>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2010/12/18/how-to-install-postgresql-9-on-ubuntu-linux-10-0410-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Run multiple versions of Perl from your home directory</title>
		<link>http://froebe.net/blog/2010/11/22/run-multiple-versions-of-perl-from-your-home-directory/</link>
		<comments>http://froebe.net/blog/2010/11/22/run-multiple-versions-of-perl-from-your-home-directory/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 04:07:46 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[Kang-min Liu]]></category>
		<category><![CDATA[perlbrew]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=1288</guid>
		<description><![CDATA[Run multiple versions of Perl from your home directory using Perlbrew! One thing to know:  Perl won&#8217;t compile if you have an encrypted home directory. Bug has been fixed but not exactly how and it hasn&#8217;t been put into the Ubuntu updates yet. Thanks goes to Kang-min Liu for creating Perlbrew!!!! The recommended way to [...]]]></description>
			<content:encoded><![CDATA[<p>Run multiple versions of Perl from your home directory using <a href="http://search.cpan.org/dist/App-perlbrew/lib/App/perlbrew.pm">Perlbrew</a>!<a href="http://search.cpan.org/dist/App-perlbrew/lib/App/perlbrew.pm"><img class="alignright" title="Kang-min Liu" src="http://external.ak.fbcdn.net/safe_image.php?d=cbda410c3d38aac55ff886e3270f01c3&amp;w=90&amp;h=90&amp;url=http%3A%2F%2Fwww.gravatar.com%2Favatar.php%3Fgravatar_id%3Dae74261cb1cdcc52eb0d2b1cbaf06e25%26rating%3DG%26size%3D80%26default%3Dhttp%3A%2F%2Fst.pimg.net%2Ftucs%2Fimg%2Fwho.png" alt="" width="80" height="80" /></a></p>
<div id="id_4ceb3c83b6a110a34130872">One thing to know:  Perl  won&#8217;t compile if you have an encrypted home directory. <img src='http://froebe.net/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  Bug has been  fixed but not exactly how and it hasn&#8217;t been put into the Ubuntu updates  yet.</div>
<div>Thanks goes to Kang-min Liu for creating Perlbrew!!!! <img src='http://froebe.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </div>
<div>
<blockquote><p><em>The recommended way to install perlbrew is to run these statements in your shell:</em></p>
<div class="bash dean_ch">&nbsp; &nbsp; curl <span class="re5">-LO</span> http:<span class="sy0">//</span>xrl.us<span class="sy0">/</span>perlbrew<br />
&nbsp; &nbsp; <span class="kw2">chmod</span> +x perlbrew<br />
&nbsp; &nbsp; .<span class="sy0">/</span>perlbrew <span class="kw2">install</span></div>
<p><em>After that, <code>perlbrew</code> installs itself to <code>~/perl5/perlbrew/bin</code>, and you should follow the instruction on screen to setup your <code>.bashrc</code> or <code>.cshrc</code> to put it in your PATH.</em></p></blockquote>
</div>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2010/11/22/run-multiple-versions-of-perl-from-your-home-directory/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>High overview of Cloud Computing with Ubuntu Eucalyptus Cloud (UEC) from Canonical</title>
		<link>http://froebe.net/blog/2010/06/22/high-overview-of-cloud-computing-with-ubuntu-eucalyptus-cloud-uec-from-canonical/</link>
		<comments>http://froebe.net/blog/2010/06/22/high-overview-of-cloud-computing-with-ubuntu-eucalyptus-cloud-uec-from-canonical/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 12:52:15 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[em]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[qemu]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=1260</guid>
		<description><![CDATA[I installed Ubuntu Eucalyptus cloud (#UEC) on a couple of servers at home. I was naively expecting it to be similar to VMware. Oh I was wrong. UEC is the Eucalyptus &#8216;cloud&#8217; software running on Ubuntu servers. The instances would run under the KVM or Xen hypervisors. Ubuntu&#8217;s defaulted to running KVM but isn&#8217;t restricted [...]]]></description>
			<content:encoded><![CDATA[<p>I installed Ubuntu Eucalyptus cloud (#UEC) on a couple of servers at home.  I was naively expecting it to be similar to VMware.  Oh I was wrong.</p>
<p>UEC is the Eucalyptus &#8216;cloud&#8217; software running on Ubuntu servers.  The instances would run under the KVM or Xen hypervisors.  Ubuntu&#8217;s defaulted to running KVM but isn&#8217;t restricted by it.</p>
<p>&#8220;Eucalyptus  is a software available under GPL that helps in creating and managing a private or even a publicly accessible cloud. It provides an EC2 compatible cloud computing platform and S3 compatible cloud storage platform&#8230;&#8221;  <a href="http://cssoss.wordpress.com/2010/05/10/eucalyptus-beginner%E2%80%99s-guide-%E2%80%93-uec-edition-chapter-1-%E2%80%93-introduction-to-uec-and-its%C2%A0components/">Eucalyptus Beginner’s Guide</a></p>
<p>This is how a vm works in UEC:</p>
<p>You publish an image that you previously installed all the software you need (or you can download such an image).  There can be as many instances of this image running as the hardware supports (spread across N number of backend Node Servers).</p>
<p>All instances are transient.  As long as an image is running, it will have a physical presence.. but when it is shutdown, the instance is removed including any work performed in the instance.</p>
<p>&#8220;static&#8221; storage is available via a Storage Server.  After you create an image but before you start it, you have the opportunity to attach storage to the instance.</p>
<div class="wp-caption alignnone" style="width: 610px"><a href="http://cssoss.wordpress.com/2010/05/10/eucalyptus-beginner%E2%80%99s-guide-%E2%80%93-uec-edition-chapter-1-%E2%80%93-introduction-to-uec-and-its%C2%A0components/"><img src="http://cssoss.files.wordpress.com/2010/05/eucalyptus_cloud.png?w=600&amp;h=467" alt="" width="600" height="467" /></a><p class="wp-caption-text">Diagram courtesy of  Eucalyptus Beginner’s Guide – UEC edition</p></div>
<p>While the management tools for UEC, and therefore Amazon EC2/EM, are primitive compared to VMware, it should be able to scale much higher with far less focus on which &#8216;virtual machine&#8217; goes where.</p>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2010/06/22/high-overview-of-cloud-computing-with-ubuntu-eucalyptus-cloud-uec-from-canonical/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to: Installing VMware ESXi 4 on a 6 year old cheap motherboard</title>
		<link>http://froebe.net/blog/2010/02/15/how-to-installing-vmware-esxi-4-on-a-6-year-old-cheap-motherboard/</link>
		<comments>http://froebe.net/blog/2010/02/15/how-to-installing-vmware-esxi-4-on-a-6-year-old-cheap-motherboard/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 14:59:17 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[ahci]]></category>
		<category><![CDATA[esxi]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[oem.tgz]]></category>
		<category><![CDATA[old motherboards]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unsupported]]></category>
		<category><![CDATA[vmware esxi]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=1203</guid>
		<description><![CDATA[I&#8217;ve been trying to get VMware ESXi 4 on my old MSI MS-7388 motherboard for a long time. No matter what I tried, neither the SATA controller on the motherboard or the add on SATA controller would be recognized. Install VMware ESXi 4.0 on an unsupported motherboard (SATA controller must support AHCI): make sure the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been trying to get <a href="http://www.vmware.com">VMware ESXi 4</a> on my old MSI MS-7388 motherboard for a long time. No matter what I tried, neither the SATA controller on the motherboard or the add on SATA controller would be recognized.</p>
<h3>Install VMware ESXi 4.0 on an unsupported motherboard (SATA controller must support AHCI):</h3>
<ol>
<li>make sure the SATA controller(s) is set to AHCI in the computer&#8217;s BIOS</li>
<li>download VMware ESXi 4 iso</li>
<li><strong>burn</strong> the iso to either a cdrom or a USB thumb drive (512mb minimum) using <a href="http://unetbootin.sourceforge.net/">unetbootin</a></li>
<li>boot the computer into VMware ESXi</li>
<li>Before you&#8217;re prompted to hit <strong>Enter</strong> to begin, hit ALT-F1 which will get you to a console screen without a prompt</li>
<li>Type <strong>&#8220;unsupported&#8221;</strong> followed by <strong>Enter</strong></li>
<li>When prompted for a password, just hit <strong>Enter</strong></li>
<li>Type <strong>&#8220;vmkload_mod ahci&#8221;</strong> followed by <strong>Enter</strong>.  This will load in the driver for just about any AHCI compliant SATA controller</li>
<li>Hit <strong>ALT-F2</strong> to finish the installation</li>
</ol>
<p>At this point VMware ESXi 4.0 will be installed but it won&#8217;t start when you reboot.  This is because VMware won&#8217;t load the AHCI driver by default.  So&#8230; we will have to tell it to load it automatically.  You will need a Linux Live CD such as <a href="http://www.ubuntu.com">Ubuntu</a>.</p>
<ol>
<li>Boot into Linux</li>
<li>From the desktop you will need to mount the VMware partitions.  In Ubuntu 8.04 and higher, you just need to click on the <em>folders</em> in the drop down menu</li>
<li>Locate oem.tgz on the second VMware partition and overwrite it with this <a href="http://www.froebe.net/attachments/oem.tgz">oem.tgz</a>.  It includes a system.map file telling VMware to load the AHCI driver</li>
<li>reboot and boot into VMware ESXi</li>
</ol>
<p>You should have a fully working VMware ESXi server installed and ready for you to setup virtual machines! <img src='http://froebe.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2010/02/15/how-to-installing-vmware-esxi-4-on-a-6-year-old-cheap-motherboard/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Sun&#8217;s VirtualBox 3.1.x: Getting VRDP (remote desktop) to authenticate properly with Linux PAM</title>
		<link>http://froebe.net/blog/2010/01/22/suns-virtualbox-3-1-x-getting-vrdp-remote-desktop-to-authenticate-properly-with-linux-pam/</link>
		<comments>http://froebe.net/blog/2010/01/22/suns-virtualbox-3-1-x-getting-vrdp-remote-desktop-to-authenticate-properly-with-linux-pam/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 16:39:55 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[3.1.2]]></category>
		<category><![CDATA[9.10]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[pam]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[user_mod]]></category>
		<category><![CDATA[vbox]]></category>
		<category><![CDATA[vboxheadless]]></category>
		<category><![CDATA[vboxtool]]></category>
		<category><![CDATA[vrdp]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=1193</guid>
		<description><![CDATA[I rebuilt an Ubuntu 9.10 server this past week, ripping off VMware and replacing it with VirtualBox 3.1.2. Setting up VirtualBox as a headless server was very easy with VBoxTool. However, I ran into a problem that I was unable to connect using remote desktop (rdesktop) as any user but the user that started the [...]]]></description>
			<content:encoded><![CDATA[<p>I rebuilt an Ubuntu 9.10 server this past week, ripping off <a href="http://www.vmware.com">VMware</a> and replacing it with <a href="http://www.virtualbox.org">VirtualBox 3.1.2</a>.  Setting up VirtualBox as a headless server was very easy with <a href="http://vboxtool.sourceforge.net/">VBoxTool</a>.  However, I ran into a problem that I was unable to connect using remote desktop (rdesktop) as any user but the user that started the virtual machine.  </p>
<div class="bash dean_ch">Jan <span class="nu0">21</span> <span class="nu0">22</span>:<span class="nu0">43</span>:<span class="nu0">13</span> vm-holder unix_chkpwd<span class="br0">&#91;</span><span class="nu0">16040</span><span class="br0">&#93;</span>: check pass; user unknown<br />
Jan <span class="nu0">21</span> <span class="nu0">22</span>:<span class="nu0">43</span>:<span class="nu0">13</span> vm-holder unix_chkpwd<span class="br0">&#91;</span><span class="nu0">16040</span><span class="br0">&#93;</span>: password check failed <span class="kw1">for</span> user <span class="br0">&#40;</span>jason<span class="br0">&#41;</span><br />
Jan <span class="nu0">21</span> <span class="nu0">22</span>:<span class="nu0">43</span>:<span class="nu0">13</span> vm-holder VBoxHeadless: pam_unix<span class="br0">&#40;</span>vrdpauth:auth<span class="br0">&#41;</span>: authentication failure; <span class="re2">logname</span>=virtualbox <span class="re2">uid</span>=<span class="nu0">1001</span> <span class="re2">euid</span>=<span class="nu0">1001</span> <span class="re2">tty</span>= <span class="re2">ruser</span>= <span class="re2">rhost</span>= &nbsp;<span class="re2">user</span>=jason</div>
<p>This is, currently, an undocumented security feature of VirtualBox 3.1x to prevent just anyone from accessing the virtual machine <i>console</i>.  For most folk, this might be a very good thing but if you have a team of sysadmins that should have access to the virtual machine consoles, you probably don&#8217;t want them to use the same login.</p>
<p>If that is the case, you can add the user(s) that should have access the virtual machine console to the <i>shadow</i> group on the host Linux machine.  Be warned though that the user(s) that are added to the shadow group should not be able to log into the host machine else they will be able to read the shadow file where all the passwords to the box are stored.  If the users need access to the host box, then they should have a login for host access (not part of the shadow group) and another for virtual machine console access.</p>
<p><strong>Adding linux user <i>jason_vrdp</i> to the shadow group:</strong></p>
<div class="bash dean_ch"><span class="br0">&#40;</span>root<span class="br0">&#41;</span> <span class="co0"># usermod -G shadow,virtualbox jason_vrdp</span></div>
<p><strong>Prevent <i>jason_vrdp</i> from logging in to the host or anyone from sudo&#8217;ing to it:</strong></p>
<pre lang=bash>(root) # usermod --shell /bin/false jason_vrdp</pre>
<p>That&#8217;s it <img src='http://froebe.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2010/01/22/suns-virtualbox-3-1-x-getting-vrdp-remote-desktop-to-authenticate-properly-with-linux-pam/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to create an iTunes/iPod compatible audiobook (MPEG4 m4b) on Linux using MP4Box and mp4v2 v1.9.1 &#8211; it can be done!</title>
		<link>http://froebe.net/blog/2009/12/24/how-to-create-an-itunesipod-compatible-audiobook-mpeg4-m4b-on-linux-using-mp4box-and-mp4v2-v1-9-1-it-can-be-done/</link>
		<comments>http://froebe.net/blog/2009/12/24/how-to-create-an-itunesipod-compatible-audiobook-mpeg4-m4b-on-linux-using-mp4box-and-mp4v2-v1-9-1-it-can-be-done/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 17:39:18 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[add chapters]]></category>
		<category><![CDATA[audiobook]]></category>
		<category><![CDATA[chapters]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[gpac]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[mp4box]]></category>
		<category><![CDATA[mp4v2]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=1163</guid>
		<description><![CDATA[I&#8217;ve been wracking my brains over this for the past few weeks and it finally struck me how to create an m4b audiobook with chapters that is compatible with your iPod, iTunes, VLC, etc.  It was very simple once I figured it out: Step 1: encode the mp3 files to &#8220;aac&#8221; (mpeg4) using your favorite [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been wracking my brains over this for the past few weeks and it finally struck me how to create an m4b audiobook with chapters that is compatible with your iPod, iTunes, VLC, etc.  It was very simple once I figured it out:</p>
<h3>Step 1:</h3>
<p>encode the mp3 files to &#8220;aac&#8221; (mpeg4) using your favorite converter (I use ffmpeg):</p>
<div class="bash dean_ch"><span class="kw2">ffmpeg</span> <span class="re5">-i</span> <span class="st0">&quot;track1.mp3&quot;</span> <span class="re5">-y</span> <span class="re5">-vn</span> <span class="re5">-acodec</span> libfaac <span class="re5">-ab</span> 128k <span class="re5">-ar</span> <span class="nu0">44100</span> <span class="re5">-threads</span> <span class="nu0">3</span> <span class="re5">-f</span> mp4 track1.aac</div>
<h3>Step 2:</h3>
<p>Create a <i>chapters</i> file so that <a href="http://gpac.sourceforge.net">MP4Box</a> can understand it:</p>
<blockquote><p>    * Common syntax : CHAPTERX=h:m:s[:ms or .ms] on one line and CHAPTERXNAME=name on the other &#8211; the order is not important but chapter lines MUST be declared sequencially (same X value expected for 2 consecutive lines).</p></blockquote>
<div class="bash dean_ch">$ <span class="kw2">cat</span> track1.chapters<br />
<span class="re2">CHAPTER1</span>=00:00:<span class="nu0">00.000</span><br />
<span class="re2">CHAPTER1NAME</span>=Chapter 001<br />
<span class="re2">CHAPTER2</span>=00:<span class="nu0">30</span>:<span class="nu0">00.139</span><br />
<span class="re2">CHAPTER2NAME</span>=Chapter 002<br />
<span class="re2">CHAPTER3</span>=01:00:<span class="nu0">00.728</span><br />
<span class="re2">CHAPTER3NAME</span>=Chapter 003<br />
<span class="re2">CHAPTER4</span>=01:<span class="nu0">30</span>:<span class="nu0">01.269</span><br />
<span class="re2">CHAPTER4NAME</span>=Chapter 004<br />
<span class="re2">CHAPTER5</span>=02:00:<span class="nu0">01.858</span><br />
<span class="re2">CHAPTER5NAME</span>=Chapter 005<br />
<span class="re2">CHAPTER6</span>=02:<span class="nu0">30</span>:<span class="nu0">02.375</span><br />
<span class="re2">CHAPTER6NAME</span>=Chapter 006<br />
<span class="re2">CHAPTER7</span>=03:00:<span class="nu0">02.964</span><br />
<span class="re2">CHAPTER7NAME</span>=Chapter 007<br />
<span class="re2">CHAPTER8</span>=03:<span class="nu0">30</span>:<span class="nu0">03.553</span><br />
<span class="re2">CHAPTER8NAME</span>=Chapter 008<br />
<span class="re2">CHAPTER9</span>=04:00:<span class="nu0">04.094</span><br />
<span class="re2">CHAPTER9NAME</span>=Chapter 009<br />
<span class="re2">CHAPTER10</span>=04:<span class="nu0">30</span>:<span class="nu0">04.683</span><br />
<span class="re2">CHAPTER10NAME</span>=Chapter 010<br />
<span class="re2">CHAPTER11</span>=05:00:<span class="nu0">05.224</span><br />
<span class="re2">CHAPTER11NAME</span>=Chapter 011<br />
<span class="re2">CHAPTER12</span>=05:<span class="nu0">30</span>:<span class="nu0">05.765</span><br />
<span class="re2">CHAPTER12NAME</span>=Chapter 012<br />
<span class="re2">CHAPTER13</span>=05:<span class="nu0">46</span>:<span class="nu0">14.106</span><br />
<span class="re2">CHAPTER13NAME</span>=Chapter 013<br />
<span class="re2">CHAPTER14</span>=06:<span class="nu0">16</span>:<span class="nu0">14.143</span><br />
<span class="re2">CHAPTER14NAME</span>=Chapter 014<br />
<span class="re2">CHAPTER15</span>=06:<span class="nu0">46</span>:<span class="nu0">14.732</span><br />
<span class="re2">CHAPTER15NAME</span>=Chapter 015<br />
<span class="re2">CHAPTER16</span>=07:<span class="nu0">16</span>:<span class="nu0">15.249</span><br />
<span class="re2">CHAPTER16NAME</span>=Chapter 016<br />
<span class="re2">CHAPTER17</span>=07:<span class="nu0">46</span>:<span class="nu0">15.790</span><br />
<span class="re2">CHAPTER17NAME</span>=Chapter 017<br />
<span class="re2">CHAPTER18</span>=08:<span class="nu0">16</span>:<span class="nu0">16.331</span><br />
<span class="re2">CHAPTER18NAME</span>=Chapter 018<br />
<span class="re2">CHAPTER19</span>=08:<span class="nu0">46</span>:<span class="nu0">16.920</span><br />
<span class="re2">CHAPTER19NAME</span>=Chapter 019<br />
<span class="re2">CHAPTER20</span>=09:<span class="nu0">16</span>:<span class="nu0">17.460</span><br />
<span class="re2">CHAPTER20NAME</span>=Chapter 020<br />
<span class="re2">CHAPTER21</span>=09:<span class="nu0">46</span>:<span class="nu0">18.050</span><br />
<span class="re2">CHAPTER21NAME</span>=Chapter 021<br />
<span class="re2">CHAPTER22</span>=<span class="nu0">10</span>:<span class="nu0">16</span>:<span class="nu0">18.639</span><br />
<span class="re2">CHAPTER22NAME</span>=Chapter 022</div>
<h3>Step 3:</h3>
<p>Add the chapters to the audio file (creates Nero format chapter markers):</p>
<div class="bash dean_ch">MP4Box <span class="re5">-add</span> track1.aac <span class="re5">-chap</span> track1.chapters test.mp4</div>
<h3>Step 4:</h3>
<p>Convert the Nero chapter markers to Quicktime chapter markers using <a href="http://code.google.com/p/mp4v2/">mp4chaps from the mp4v2 project</a> (you will want v1.9.1 or higher):</p>
<div class="bash dean_ch">mp4chaps <span class="re5">&#8211;convert</span> <span class="re5">&#8211;chapter-qt</span> test.mp4<br />
converting chapters <span class="kw1">in</span> <span class="kw2">file</span> <span class="st0">&quot;test.mp4&quot;</span> from Nero to QuickTime</div>
<h3>Step 5:</h3>
<p>Rename the file from .mp4 to .m4b extension so iTunes will see it as an audiobook:</p>
<div class="bash dean_ch"><span class="kw2">mv</span> test.mp4 test.m4b</div>
<h3>Proof that it works:</h3>
<p><a href="http://froebe.net/blog/wp-content/uploads/2009/12/iTunes_showing_chapters.png"><img src="http://froebe.net/blog/wp-content/uploads/2009/12/iTunes_showing_chapters-300x253.png" alt="" title="iTunes with chapters shown" width="300" height="253" class="aligncenter size-medium wp-image-1164" /></a></p>
<p>and VLC showing the chapters:<br />
<a href="http://froebe.net/blog/wp-content/uploads/2009/12/VLC_showing_chapters.png"><img src="http://froebe.net/blog/wp-content/uploads/2009/12/VLC_showing_chapters.png" alt="" title="VLC showing chapters" width="427" height="138" class="aligncenter size-full wp-image-1165" /></a></p>
<p>Of course, we aren&#8217;t putting in any tags such as &#8220;author&#8221; or &#8220;genre&#8221; in this example.  Use your favorite tags editor to do so.</p>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2009/12/24/how-to-create-an-itunesipod-compatible-audiobook-mpeg4-m4b-on-linux-using-mp4box-and-mp4v2-v1-9-1-it-can-be-done/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>How to convert a laptop running Microsoft Windows 7 to a VirtualBox virtual machine</title>
		<link>http://froebe.net/blog/2009/12/21/how-to-convert-a-laptop-running-microsoft-windows-7-to-a-virtualbox-virtual-machine/</link>
		<comments>http://froebe.net/blog/2009/12/21/how-to-convert-a-laptop-running-microsoft-windows-7-to-a-virtualbox-virtual-machine/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 16:32:53 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[dell]]></category>
		<category><![CDATA[dell latitiude]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[microsoft windows 7]]></category>
		<category><![CDATA[mint]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vboxmanage]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[vista]]></category>
		<category><![CDATA[win7]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=1161</guid>
		<description><![CDATA[I was very much surprised just how easy it is to convert a Microsoft Windows 7 laptop into a virtual machine running within Sun&#8217;s VirtualBox.  This is what I did: Pull the hard drive from the laptop.  On my Dell Latitude, it was simply unscrewing the two screws on the bottom of the laptop marked [...]]]></description>
			<content:encoded><![CDATA[<p>I was very much surprised just how easy it is to convert a <a href="http://www.microsoft.com/windows7">Microsoft Windows 7</a> laptop into a virtual machine running within <a href="http://www.virtualbox.org">Sun&#8217;s VirtualBox</a>.  This is what I did:</p>
<ul>
<li>Pull the hard drive from the laptop.  On my Dell Latitude, it was simply unscrewing the two screws on the bottom of the laptop marked with the hard drive simble</li>
<li>Attach the drive to a SATA to USB connector and plug it in to your Linux box</li>
<li>If you don&#8217;t have VirtualBox installed, do so now using apt-get, rpm, or whatever you use to install software</li>
<li>Follow <a href="http://www.virtualbox.org/wiki/Migrate_Windows">How to migrate existing Windows installations to VirtualBox</a> but make sure you specify the entire drive (i.e. /dev/sdh) and not individual partitions else you will miss the hidden partitions that Vista and Windows 7 create</li>
</ul>
<p>You should have a working Windows 7 Virtual Machine.  You&#8217;ll notice that you probably have a huge vdi file.  Let&#8217;s shrink that down:</p>
<ul>
<li>Within Windows
<ul>
<li>download and install <a href="http://www.microsoft.com/technet/sysinternals/Security/SDelete.mspx">sdelete from Microsoft</a></li>
<li>download and install <a href="http://www.softpedia.com/get/System/Hard-Disk-Utils/Power-Defragmenter.shtml">PowerDefragmenter</a></li>
<li>Run PowerDefragmenter on your c: drive (as administrator)</li>
<li>Run <strong>&#8220;sdelete -c c:&#8221;</strong> from a cmd window (as administrator)</li>
<li>shutdown windows</li>
</ul>
</li>
<li>On the host
<ul>
<li>run <strong>&#8220;VBoxManage modifyvdi my_disk.vdi compact&#8221;</strong> replacing &#8220;my_disk.vdi&#8221; with the name of your vdi file you created earlier</li>
<li>Note that if you get a &#8220;Shrink hard disk operation is not implemented&#8221; error, then you&#8217;ve hit <a href="http://www.virtualbox.org/ticket/2833">bug #2833</a> and you will want to <a href="http://www.virtualbox.org">download the latest VirtualBox</a> to fix it.</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2009/12/21/how-to-convert-a-laptop-running-microsoft-windows-7-to-a-virtualbox-virtual-machine/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Trying to compile gspca on Ubuntu 9.04 or another recent Linux distribution?  We have the way!</title>
		<link>http://froebe.net/blog/2009/10/13/trying-to-compile-gspca-on-ubuntu-9-04-or-another-recent-linux-distribution-we-have-the-way/</link>
		<comments>http://froebe.net/blog/2009/10/13/trying-to-compile-gspca-on-ubuntu-9-04-or-another-recent-linux-distribution-we-have-the-way/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 18:13:47 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[drivers]]></category>
		<category><![CDATA[gspca]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux journal]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[webcam]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=1140</guid>
		<description><![CDATA[gspca On August 12th, 2009 Baires Norte Lug (not verified) says: Kernel >= 2.6.27 wget http://mxhaard.free.fr/spca50x/Download/gspcav1-20071224.tar.gz wget http://www.bairesnortelug.com.ar/diff/gspca.diff tar -zxvf gspcav1-20071224.tar.gz cd gspcav1-20071224 cat ../gspca.diff &#124; patch -p1 sudo ./gspca_build Happy !!!! Thz http://www.bairesnortelug.com.ar Slackware Rulez]]></description>
			<content:encoded><![CDATA[<h3><a href="http://www.linuxjournal.com/video/get-your-webcam-working-gspca">gspca</a></h3>
<h4>On August 12th, 2009 Baires Norte Lug (not verified) says:<a href="http://www.linuxjournal.com"><img class="alignright size-full wp-image-1141" title="Linux Journal Magazine" src="http://froebe.net/blog/wp-content/uploads/2009/10/linuxjournal.png" alt="Linux Journal Magazine" width="158" height="69" /></a></h4>
<div>
<p>Kernel >= 2.6.27</p>
<div class="bash dean_ch"><span class="kw2">wget</span> http:<span class="sy0">//</span>mxhaard.free.fr<span class="sy0">/</span>spca50x<span class="sy0">/</span>Download<span class="sy0">/</span>gspcav1-<span class="nu0">20071224</span>.tar.gz<br />
<span class="kw2">wget</span> http:<span class="sy0">//</span>www.bairesnortelug.com.ar<span class="sy0">/</span>diff<span class="sy0">/</span>gspca.diff<br />
<span class="kw2">tar</span> <span class="re5">-zxvf</span> gspcav1-<span class="nu0">20071224</span>.tar.gz<br />
<span class="kw3">cd</span> gspcav1-<span class="nu0">20071224</span><br />
<span class="kw2">cat</span> ..<span class="sy0">/</span>gspca.diff <span class="sy0">|</span> <span class="kw2">patch</span> <span class="re5">-p1</span><br />
<span class="kw2">sudo</span> .<span class="sy0">/</span>gspca_build</div>
<p>Happy !!!!</p>
<p>Thz http://www.bairesnortelug.com.ar</p>
<p>Slackware Rulez <img src='http://froebe.net/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </div>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2009/10/13/trying-to-compile-gspca-on-ubuntu-9-04-or-another-recent-linux-distribution-we-have-the-way/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Howto convert an entire directory of videos to play on your Sony Playstation 3 using ffmpeg</title>
		<link>http://froebe.net/blog/2009/09/23/howto-convert-an-entire-directory-of-videos-to-play-on-your-sony-playstation-3-using-ffmpeg/</link>
		<comments>http://froebe.net/blog/2009/09/23/howto-convert-an-entire-directory-of-videos-to-play-on-your-sony-playstation-3-using-ffmpeg/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 14:16:00 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[aac]]></category>
		<category><![CDATA[blackberry]]></category>
		<category><![CDATA[checkinstall]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[libxvid]]></category>
		<category><![CDATA[mediatomb]]></category>
		<category><![CDATA[mp4]]></category>
		<category><![CDATA[mpeg4]]></category>
		<category><![CDATA[pearl]]></category>
		<category><![CDATA[ps3]]></category>
		<category><![CDATA[sony]]></category>
		<category><![CDATA[sony playstation 3]]></category>
		<category><![CDATA[storm]]></category>
		<category><![CDATA[transcode]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[x264]]></category>
		<category><![CDATA[xvid]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=1127</guid>
		<description><![CDATA[I think a lot of people have been struggling with mass converting of videos for the ps3&#8230; I&#8217;ve been searching for a way to mass convert my videos (mostly podcasts) to play on my Sony PlayStation 3 over the wire with Mediatomb.  For a long time I&#8217;ve been using a hodpodge of mp4box and mencoder [...]]]></description>
			<content:encoded><![CDATA[<p>I think a lot of people have been struggling with mass converting of videos for the ps3&#8230;<br />
I&#8217;ve been searching for a way to mass convert my videos (mostly podcasts) to play on my <a href="http://www.amazon.com/gp/product/B002I0J4VQ?ie=UTF8&amp;tag=froebe-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B002I0J4VQ">Sony PlayStation 3</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=froebe-20&amp;l=as2&amp;o=1&amp;a=B002I0J4VQ" border="0" alt="" width="1" height="1" /> over the wire with <a href="http://mediatomb.cc/">Mediatomb</a>.  For a long time I&#8217;ve been using a hodpodge of <a href="http://gpac.sourceforge.net/">mp4box</a> and <a href="http://www.mplayerhq.hu">mencoder</a> to convert the videos.  The problem was that mp4box more often then not would crash or get stuck in a loop where it fills up a 1TB harddrive converting a 20mb file.  There had to be a better way.</p>
<p>If your ffmpeg doesn&#8217;t support x264 (video) or aac (audio) encoding, like all Ubuntu Linux distributions, then you will have to recompile ffmpeg.  Don&#8217;t worry, it is easier then you think!</p>
<p><a href="http://ubuntuforums.org/member.php?u=162846">FakeOutdoorsman</a> over on the Ubuntu Forums posted the method to <a href="http://ubuntuforums.org/showthread.php?t=7860j95">build ffmpeg from scratch</a>:</p>
<blockquote><p>
<strong>Choose your Ubuntu</strong></p>
<p>0.The instructions on the page are for Ubuntu Jaunty Jackalope 9.04 and Ubuntu Intrepid Ibex 8.10. Separate instructions are also available for other releases:</p>
<p>    * Install FFmpeg and x264 on Ubuntu Hardy Heron 8.04 LTS<br />
    * Install FFmpeg and x264 on Ubuntu Dapper Drake 6.06 LTS</p>
<p><strong>Getting the Dependencies</strong></p>
<p>1. Uninstall x264, libx264-dev, and ffmpeg if they are already installed. Open a terminal and run the following:</p>
<div class="bash dean_ch"><span class="kw2">sudo</span> <span class="kw2">apt-get</span> purge <span class="kw2">ffmpeg</span> x264 libx264-dev</div>
<p>2. Next, get all of the packages you will need to install FFmpeg and x264 (you may need to enable the universe and multiverse repositories):</p>
<p>Code:</p>
<div class="bash dean_ch"><span class="kw2">sudo</span> <span class="kw2">apt-get</span> update<br />
<span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libsdl1.2-dev libtheora-dev libx11-dev libxvidcore4-dev zlib1g-dev</div>
<p><strong>Install x264</strong><br />
3. Get the most current source files from the official x264 git repository, compile, and install. You can run &#8220;./configure &#8211;help&#8221; to see what features you can enable/disable. If you are behind a firewall or unable to use git, then daily source tarballs are also available.</p>
<div class="bash dean_ch"><span class="kw3">cd</span><br />
<span class="kw2">git</span> clone <span class="kw2">git</span>:<span class="sy0">//</span>git.videolan.org<span class="sy0">/</span>x264.git<br />
<span class="kw3">cd</span> x264<br />
.<span class="sy0">/</span>configure<br />
<span class="kw2">make</span><br />
<span class="kw2">sudo</span> checkinstall <span class="re5">&#8211;fstrans</span>=no <span class="re5">&#8211;install</span>=<span class="kw2">yes</span> <span class="re5">&#8211;pkgname</span>=x264 <span class="re5">&#8211;pkgversion</span> <span class="st0">&quot;1:0.svn<span class="es5">`date +%Y%m%d`</span>-0.0ubuntu1&quot;</span> <span class="re5">&#8211;default</span></div>
<p><strong>Install FFmpeg</strong><br />
4. Get the most current source files from the official FFmpeg svn, compile, and install. Run &#8220;./configure &#8211;help&#8221; to see what features you can enable/disable. If you are behind a firewall or unable to use subversion, then nightly FFmpeg snapshots are also available.</p>
<div class="bash dean_ch"><span class="kw3">cd</span><br />
<span class="kw2">svn</span> checkout <span class="kw2">svn</span>:<span class="sy0">//</span>svn.ffmpeg.org<span class="sy0">/</span>ffmpeg<span class="sy0">/</span>trunk <span class="kw2">ffmpeg</span><br />
<span class="kw3">cd</span> <span class="kw2">ffmpeg</span><br />
.<span class="sy0">/</span>configure <span class="re5">&#8211;enable-gpl</span> <span class="re5">&#8211;enable-nonfree</span> <span class="re5">&#8211;enable-pthreads</span> <span class="re5">&#8211;enable-libfaac</span> <span class="re5">&#8211;enable-libfaad</span> <span class="re5">&#8211;enable-libmp3lame</span> <span class="re5">&#8211;enable-libtheora</span> <span class="re5">&#8211;enable-libx264</span> <span class="re5">&#8211;enable-libxvid</span> <span class="re5">&#8211;enable-x11grab</span><br />
<span class="kw2">make</span><br />
<span class="kw2">sudo</span> checkinstall <span class="re5">&#8211;fstrans</span>=no <span class="re5">&#8211;install</span>=<span class="kw2">yes</span> <span class="re5">&#8211;pkgname</span>=<span class="kw2">ffmpeg</span> <span class="re5">&#8211;pkgversion</span> <span class="st0">&quot;3:0.svn<span class="es5">`date +%Y%m%d`</span>-12ubuntu3&quot;</span> <span class="re5">&#8211;default</span> </div>
<p>That&#8217;s it for installation. You can keep the ~/x264 and ~/ffmpeg directories if you later want to update the source files to a new revision. See &#8220;Updating Your Installation&#8221; below for more details.</p></blockquote>
<p>Now that we have a working ffmpeg, we can go on to the converting the video files (<a href='http://froebe.net/blog/wp-content/uploads/2009/10/convert_videos.sh'>convert_videos.sh</a>):</p>
<div class="bash dean_ch"><span class="co0">#!/bin/bash</span></p>
<p><span class="kw1">function</span> print_usage <span class="br0">&#123;</span><br />
&nbsp; <span class="kw3">echo</span> <span class="st0">&quot;=============================================================================================&quot;</span><br />
&nbsp; <span class="kw3">echo</span> <span class="st0">&quot; &nbsp; &nbsp; &nbsp; &nbsp;convert_videos.sh [file|directory] [output directory] {bb|bb_storm|ps3} {file prefix}&quot;</span> <br />
&nbsp; <span class="kw3">echo</span> <span class="st0">&quot;=============================================================================================&quot;</span><br />
<span class="br0">&#125;</span></p>
<p><span class="kw1">function</span> verify_file <span class="br0">&#123;</span><br />
&nbsp; <span class="kw3">echo</span> j<br />
<span class="br0">&#125;</span></p>
<p><span class="kw1">function</span> process_file <span class="br0">&#123;</span><br />
&nbsp; <span class="re2">ORIG_FILE</span>=<span class="st0">&quot;$1&quot;</span><br />
&nbsp; <span class="re2">DEST_DIR</span>=<span class="st0">&quot;$2&quot;</span></p>
<p>&nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-z</span> <span class="co1">${BLACKBERRY}</span> <span class="br0">&#93;</span><span class="br0">&#93;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; <span class="re2">DEST_FILE</span>=<span class="co1">${DEST_DIR}</span><span class="sy0">/</span><span class="co1">${FILE_PREFIX}</span>$<span class="br0">&#40;</span> <span class="kw2">basename</span> <span class="st0">&quot;<span class="es3">${ORIG_FILE}</span>&quot;</span> <span class="sy0">|</span> <span class="kw2">perl</span> <span class="re5">-ne</span> <span class="st_h">&#8216;s/\.(?:[a-z,A-Z,0-9]{3,4})$/\.mp4/; print $_&#8217;</span> <span class="br0">&#41;</span><br />
&nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; <span class="re2">DEST_FILE</span>=<span class="co1">${DEST_DIR}</span><span class="sy0">/</span><span class="co1">${FILE_PREFIX}</span>$<span class="br0">&#40;</span> <span class="kw2">basename</span> <span class="st0">&quot;<span class="es3">${ORIG_FILE}</span>&quot;</span> <span class="sy0">|</span> <span class="kw2">perl</span> <span class="re5">-ne</span> <span class="st_h">&#8216;s/\.(?:[a-z,A-Z,0-9]{3,4})$/_bb\.mp4/; print $_&#8217;</span> <span class="br0">&#41;</span><br />
&nbsp; <span class="kw1">fi</span></p>
<p>&nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-f</span> <span class="st0">&quot;<span class="es3">${DEST_FILE}</span>&quot;</span> <span class="br0">&#93;</span><span class="br0">&#93;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; <span class="kw3">echo</span> <span class="st0">&quot; &nbsp; &nbsp;We already processed <span class="es1">\&quot;</span><span class="es3">${ORIG_FILE}</span><span class="es1">\&quot;</span> &#8230; skipping&quot;</span><br />
&nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; <span class="re2">VID_INFO_FPS</span>=$<span class="br0">&#40;</span> <span class="kw2">mplayer</span> <span class="re5">-identify</span> <span class="re5">-nosound</span> <span class="re5">-vo</span> null <span class="re5">-nocache</span> <span class="re5">-really-quiet</span> <span class="re5">-frames</span> <span class="nu0">1</span> <span class="st0">&quot;<span class="es3">${ORIG_FILE}</span>&quot;</span> <span class="nu0">2</span><span class="sy0">&gt;/</span>dev<span class="sy0">/</span>null <span class="sy0">|</span> <span class="kw2">grep</span> FPS <span class="br0">&#41;</span> <br />
&nbsp; &nbsp; <span class="re2">VID_INFO_FPS</span>=<span class="co1">${VID_INFO_FPS#*=}</span><br />
&nbsp; &nbsp; <span class="re2">VID_INFO_WIDTH</span>=$<span class="br0">&#40;</span> <span class="kw2">mplayer</span> <span class="re5">-identify</span> <span class="re5">-nosound</span> <span class="re5">-vo</span> null <span class="re5">-nocache</span> <span class="re5">-really-quiet</span> <span class="re5">-frames</span> <span class="nu0">1</span> <span class="st0">&quot;<span class="es3">${ORIG_FILE}</span>&quot;</span> <span class="nu0">2</span><span class="sy0">&gt;/</span>dev<span class="sy0">/</span>null <span class="sy0">|</span> <span class="kw2">grep</span> WIDTH <span class="br0">&#41;</span> <br />
&nbsp; &nbsp; <span class="re2">VID_INFO_WIDTH</span>=<span class="co1">${VID_INFO_WIDTH##*=}</span><br />
&nbsp; &nbsp; <span class="re2">VID_INFO_HEIGHT</span>=$<span class="br0">&#40;</span> <span class="kw2">mplayer</span> <span class="re5">-identify</span> <span class="re5">-nosound</span> <span class="re5">-vo</span> null <span class="re5">-nocache</span> <span class="re5">-really-quiet</span> <span class="re5">-frames</span> <span class="nu0">1</span> <span class="st0">&quot;<span class="es3">${ORIG_FILE}</span>&quot;</span> <span class="nu0">2</span><span class="sy0">&gt;/</span>dev<span class="sy0">/</span>null <span class="sy0">|</span> <span class="kw2">grep</span> HEIGHT <span class="br0">&#41;</span> <br />
&nbsp; &nbsp; <span class="re2">VID_INFO_HEIGHT</span>=<span class="co1">${VID_INFO_HEIGHT##*=}</span><br />
&nbsp; &nbsp; <span class="re2">VID_INFO_ASPECT</span>=$<span class="br0">&#40;</span> <span class="kw2">mplayer</span> <span class="re5">-identify</span> <span class="re5">-nosound</span> <span class="re5">-vo</span> null <span class="re5">-nocache</span> <span class="re5">-really-quiet</span> <span class="re5">-frames</span> <span class="nu0">1</span> <span class="st0">&quot;<span class="es3">${ORIG_FILE}</span>&quot;</span> <span class="nu0">2</span><span class="sy0">&gt;/</span>dev<span class="sy0">/</span>null <span class="sy0">|</span> <span class="kw2">grep</span> ASPECT <span class="br0">&#41;</span> <br />
&nbsp; &nbsp; <span class="re2">VID_INFO_ASPECT</span>=<span class="co1">${VID_INFO_ASPECT##*=}</span></p>
<p>&nbsp; &nbsp; <span class="re2">AUD_INFO_FORMAT</span>=$<span class="br0">&#40;</span> <span class="kw2">mplayer</span> <span class="re5">-identify</span> <span class="re5">-ao</span> null <span class="re5">-vo</span> null <span class="re5">-nocache</span> <span class="re5">-really-quiet</span> <span class="re5">-frames</span> <span class="nu0">1</span> <span class="st0">&quot;<span class="es3">${ORIG_FILE}</span>&quot;</span> <span class="nu0">2</span><span class="sy0">&gt;/</span>dev<span class="sy0">/</span>null <span class="sy0">|</span> <span class="kw2">grep</span> AUDIO_FORMAT <span class="br0">&#41;</span> <br />
&nbsp; &nbsp; <span class="re2">AUD_INFO_FORMAT</span>=<span class="co1">${AUD_INFO_FORMAT##*=}</span><br />
&nbsp; &nbsp; <span class="re2">AUD_INFO_CHANNELS</span>=$<span class="br0">&#40;</span> <span class="kw2">mplayer</span> <span class="re5">-identify</span> <span class="re5">-ao</span> null <span class="re5">-vo</span> null <span class="re5">-nocache</span> <span class="re5">-really-quiet</span> <span class="re5">-frames</span> <span class="nu0">1</span> <span class="st0">&quot;<span class="es3">${ORIG_FILE}</span>&quot;</span> <span class="nu0">2</span><span class="sy0">&gt;/</span>dev<span class="sy0">/</span>null <span class="sy0">|</span> <span class="kw2">grep</span> AUDIO_NCH <span class="br0">&#41;</span> <br />
&nbsp; &nbsp; <span class="re2">AUD_INFO_CHANNELS</span>=<span class="co1">${AUD_INFO_CHANNELS##*=}</span><br />
&nbsp; &nbsp; <span class="re2">AUD_INFO_BITRATE</span>=$<span class="br0">&#40;</span> <span class="kw2">mplayer</span> <span class="re5">-identify</span> <span class="re5">-ao</span> null <span class="re5">-vo</span> null <span class="re5">-nocache</span> <span class="re5">-really-quiet</span> <span class="re5">-frames</span> <span class="nu0">1</span> <span class="st0">&quot;<span class="es3">${ORIG_FILE}</span>&quot;</span> <span class="nu0">2</span><span class="sy0">&gt;/</span>dev<span class="sy0">/</span>null <span class="sy0">|</span> <span class="kw2">grep</span> ID_AUDIO_BITRATE <span class="br0">&#41;</span> <br />
&nbsp; &nbsp; <span class="re2">AUD_INFO_BITRATE</span>=<span class="co1">${AUD_INFO_BITRATE##*=}</span></p>
<p>&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="br0">&#40;</span> <span class="co1">${AUD_INFO_BITRATE}</span> <span class="sy0">&lt;</span> <span class="nu0">163840</span> <span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; <span class="re2">AUD_INFO_BITRATE</span>=<span class="nu0">160</span><br />
&nbsp; &nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; &nbsp; <span class="re2">AUD_INFO_BITRATE</span>=$<span class="br0">&#40;</span> <span class="kw2">expr</span> <span class="co1">${AUD_INFO_BITRATE}</span> <span class="sy0">/</span> <span class="nu0">1024</span> <span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="kw1">fi</span></p>
<p>&nbsp; &nbsp; <span class="co0">###############</span><br />
&nbsp; &nbsp; <span class="co0"># &nbsp;We need to make the frame rate an acceptible amoun</span><br />
&nbsp; &nbsp; <span class="co0">###############</span><br />
&nbsp; &nbsp; <span class="kw1">case</span> <span class="co1">${VID_INFO_FPS}</span> <span class="kw1">in</span><br />
&nbsp; &nbsp; &nbsp; <span class="nu0">60.000</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co0"># HD</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re2">VID_INFO_FPS</span>=<span class="nu0">59.94</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">;;</span><br />
&nbsp; &nbsp; &nbsp; <span class="nu0">30.000</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co0"># NTSC</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re2">VID_INFO_FPS</span>=<span class="nu0">29.97</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">;;</span><br />
&nbsp; &nbsp; &nbsp; <span class="nu0">24.000</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co0"># PAL</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re2">VID_INFO_FPS</span>=<span class="nu0">23.97</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">;;</span><br />
&nbsp; &nbsp; <span class="kw1">esac</span> </p>
<p>&nbsp; &nbsp; <span class="co0">###############</span><br />
&nbsp; &nbsp; <span class="co0"># &nbsp;We need to make the video resolution a multiple of 16 for it to be properly compressed</span><br />
&nbsp; &nbsp; <span class="co0">###############</span><br />
&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="br0">&#40;</span> <span class="co1">${VID_INFO_HEIGHT}</span> <span class="sy0">%</span> <span class="nu0">16</span> <span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; <span class="re2">VID_BORDER_VERTICAL</span>=$<span class="br0">&#40;</span> <span class="kw2">expr</span> <span class="nu0">16</span> &#8211; <span class="co1">${VID_INFO_HEIGHT}</span> <span class="sy0">%</span> <span class="nu0">16</span> <span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span class="re2">VID_BORDER_VERTICAL</span>=$<span class="br0">&#40;</span> <span class="kw2">expr</span> <span class="co1">${VID_BORDER_VERTICAL}</span> <span class="sy0">/</span> <span class="nu0">2</span> <span class="br0">&#41;</span></p>
<p>&nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="br0">&#40;</span> <span class="co1">${VID_BORDER_VERTICAL}</span> <span class="sy0">%</span> <span class="nu0">2</span> <span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">let</span> VID_BORDER_VERTICAL_TOP+=$<span class="br0">&#40;</span> <span class="kw2">expr</span> <span class="co1">${VID_BORDER_VERTICAL}</span> &#8211; <span class="nu0">1</span> <span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">let</span> VID_BORDER_VERTICAL_BOTTOM+=$<span class="br0">&#40;</span> <span class="kw2">expr</span> <span class="co1">${VID_BORDER_VERTICAL}</span> + <span class="nu0">1</span> <span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re2">VID_BORDER_VERTICAL_TOP</span>=<span class="co1">${VID_BORDER_VERTICAL}</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re2">VID_BORDER_VERTICAL_BOTTOM</span>=<span class="co1">${VID_BORDER_VERTICAL}</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">fi</span><br />
&nbsp; &nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; &nbsp; <span class="re2">VID_BORDER_VERTICAL_TOP</span>=<span class="nu0">0</span><br />
&nbsp; &nbsp; &nbsp; <span class="re2">VID_BORDER_VERTICAL_BOTTOM</span>=<span class="nu0">0</span><br />
&nbsp; &nbsp; <span class="kw1">fi</span><br />
&nbsp;<br />
&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="br0">&#40;</span> <span class="co1">${VID_INFO_WIDTH}</span> <span class="sy0">%</span> <span class="nu0">16</span> <span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; <span class="re2">VID_BORDER_HORIZONTAL</span>=$<span class="br0">&#40;</span> <span class="nu0">16</span> &#8211; <span class="co1">${VID_INFO_WIDTH}</span> <span class="sy0">%</span> <span class="nu0">16</span> <span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span class="re2">VID_BORDER_HORIZONTAL</span>=$<span class="br0">&#40;</span> <span class="co1">${VID_INFO_WIDTH}</span> <span class="sy0">/</span> <span class="nu0">2</span> <span class="br0">&#41;</span></p>
<p>&nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="br0">&#40;</span> <span class="co1">${VID_BORDER_HORIZONTAL}</span> <span class="sy0">%</span> <span class="nu0">2</span> <span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">let</span> VID_BORDER_HORIZONTAL_RIGHT+=$<span class="br0">&#40;</span> <span class="kw2">expr</span> <span class="co1">${VID_BORDER_HORIZONTAL}</span> + <span class="nu0">1</span> <span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">let</span> VID_BORDER_HORIZONTAL_LEFT+=$<span class="br0">&#40;</span> <span class="kw2">expr</span> <span class="co1">${VID_BORDER_HORIZONTAL}</span> &#8211; <span class="nu0">1</span> <span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re2">VID_BORDER_HORIZONTAL_RIGHT</span>=<span class="co1">${VID_BORDER_HORIZONTAL}</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re2">VID_BORDER_HORIZONTAL_LEFT</span>=<span class="co1">${VID_BORDER_HORIZONTAL}</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">fi</span><br />
&nbsp; &nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; &nbsp; <span class="re2">VID_BORDER_HORIZONTAL_LEFT</span>=<span class="nu0">0</span><br />
&nbsp; &nbsp; &nbsp; <span class="re2">VID_BORDER_HORIZONTAL_RIGHT</span>=<span class="nu0">0</span><br />
&nbsp; &nbsp; <span class="kw1">fi</span></p>
<p>&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-z</span> <span class="co1">${VID_INFO_ASPECT}</span> <span class="br0">&#93;</span><span class="br0">&#93;</span> <span class="sy0">||</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="co1">${VID_INFO_ASPECT}</span> == <span class="st0">&quot;0.0000&quot;</span> <span class="br0">&#93;</span><span class="br0">&#93;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; <span class="re2">VID_INFO_ASPECT</span>=<span class="st0">&quot;16:9&quot;</span><br />
&nbsp; &nbsp; <span class="kw1">fi</span></p>
<p>&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-z</span> <span class="co1">${AUD_INFO_CHANNELS}</span> <span class="br0">&#93;</span><span class="br0">&#93;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; <span class="re2">AUD_INFO_CHANNELS</span>=<span class="nu0">2</span><br />
&nbsp; &nbsp; <span class="kw1">fi</span></p>
<p>
&nbsp; &nbsp; <span class="co0">##############</span><br />
&nbsp; &nbsp; <span class="co0"># If we&#8217;re not converting for the blackberry, perform a normal conversion </span><br />
&nbsp; &nbsp; <span class="co0">##############</span><br />
&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-z</span> <span class="co1">${BLACKBERRY}</span> <span class="br0">&#93;</span><span class="br0">&#93;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; <span class="re2">VID_INFO_RESOLUTION</span>=<span class="st0">&quot;<span class="es3">${VID_INFO_WIDTH}</span>x<span class="es3">${VID_INFO_HEIGHT}</span>&quot;</span></p>
<p>&nbsp; &nbsp; &nbsp; convert_file_first_pass </p>
<p>&nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="sy0">!</span> <span class="re5">-z</span> <span class="co1">${FIRST_PASS_BITRATE}</span> <span class="br0">&#93;</span><span class="br0">&#93;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re2">BITRATE</span>=<span class="co1">${FIRST_PASS_BITRATE}</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">fi</span><br />
&nbsp; &nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; &nbsp; <span class="co0">############</span><br />
&nbsp; &nbsp; &nbsp; <span class="co0"># if we have a blackberry, set the resolution appropriately</span><br />
&nbsp; &nbsp; &nbsp; <span class="co0">############</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">case</span> <span class="co1">${BB_TYPE}</span> <span class="kw1">in</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; STORM<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re2">VID_INFO_RESOLUTION</span>=<span class="st0">&quot;480&#215;360&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">;;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">*</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re2">VID_INFO_RESOLUTION</span>=<span class="st0">&quot;240&#215;180&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">;;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">esac</span><br />
&nbsp; &nbsp; <span class="kw1">fi</span></p>
<p>&nbsp; &nbsp; convert_file_second_pass <br />
&nbsp; <span class="kw1">fi</span><br />
<span class="br0">&#125;</span></p>
<p><span class="kw1">function</span> process_directory <span class="br0">&#123;</span><br />
&nbsp;<span class="re2">ORIG_VIDEO_DIR</span>=<span class="st0">&quot;$1&quot;</span><br />
&nbsp;<span class="re2">DEST_VIDEO_DIR</span>=<span class="st0">&quot;$2&quot;</span></p>
<p>&nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-d</span> <span class="st0">&quot;<span class="es3">${ORIG_VIDEO_DIR}</span>&quot;</span> <span class="br0">&#93;</span><span class="br0">&#93;</span> <span class="sy0">&amp;&amp;</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-d</span> <span class="st0">&quot;<span class="es3">${DEST_VIDEO_DIR}</span>&quot;</span> <span class="br0">&#93;</span><span class="br0">&#93;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; <span class="re2">IFS</span>=$<span class="st_h">&#8216;\n&#8217;</span></p>
<p>&nbsp; &nbsp; <span class="kw1">for</span> ORIG_VIDEO_FILE <span class="kw1">in</span> $<span class="br0">&#40;</span> <span class="kw2">find</span> <span class="st0">&quot;<span class="es3">${ORIG_VIDEO_DIR}</span>&quot;</span> <span class="re5">-depth</span> <span class="re5">-maxdepth</span> <span class="nu0">1</span> <span class="re5">-type</span> f <span class="re5">-readable</span> <span class="re5">-iregex</span> <span class="st_h">&#8216;.*\.\(3gp\|3g2\|avi\|divx\|flv\|m4v\|mj2\|mov\|mp1\|mp2\|mp4\|mpe\|mpeg\|mpeg4\|mpg\|mkv\|mv\|ogm\|rm\|rmvb\|rv\|qt\|wmv\)&#8217;</span> <span class="br0">&#41;</span>; <span class="kw1">do</span><br />
&nbsp; &nbsp; &nbsp; process_file <span class="st0">&quot;<span class="es3">${ORIG_VIDEO_FILE}</span>&quot;</span> <span class="st0">&quot;<span class="es3">${DEST_VIDEO_DIR}</span>&quot;</span><br />
&nbsp; &nbsp; <span class="kw1">done</span><br />
&nbsp; <span class="kw1">fi</span> <br />
<span class="br0">&#125;</span></p>
<p><span class="kw1">function</span> convert_file_first_pass <span class="br0">&#123;</span><br />
&nbsp; <span class="kw3">echo</span> <span class="st0">&quot;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&quot;</span><br />
&nbsp; <span class="kw3">echo</span> <span class="st0">&quot; &nbsp; First pass: <span class="es3">${ORIG_FILE}</span>&quot;</span><br />
&nbsp; <span class="kw3">echo</span> <span class="st0">&quot;ffmpeg -i <span class="es1">\&quot;</span><span class="es3">${ORIG_FILE}</span><span class="es1">\&quot;</span> -an -pass 1 <span class="es1">\<br />
</span> &nbsp; &nbsp;-vcodec libx264 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 <span class="es1">\<br />
</span> &nbsp; &nbsp;-me_method epzs -subq 1 -trellis 0 -refs 1 -bf 3 -b_strategy 1 -level 31 -coder 1 -me_range 16 -g 250 -keyint_min 25 <span class="es1">\<br />
</span> &nbsp; &nbsp;-sc_threshold 40 -i_qfactor 0.71 -bt 200kb -rc_eq &#8216;blurCplx^(1-qComp)&#8217; -qcomp 0.6 -qmin 1 -qmax 51 -qdiff 4 <span class="es1">\<br />
</span> &nbsp; &nbsp;-padtop <span class="es3">${VID_BORDER_VERTICAL_TOP}</span> -padbottom <span class="es3">${VID_BORDER_VERTICAL_BOTTOM}</span> <span class="es1">\<br />
</span> &nbsp; &nbsp;-padleft <span class="es3">${VID_BORDER_HORIZONTAL_LEFT}</span> -padright <span class="es3">${VID_BORDER_HORIZONTAL_RIGHT}</span> <span class="es1">\<br />
</span> &nbsp; &nbsp;-threads 2 <span class="es1">\<br />
</span> &nbsp; &nbsp;-s <span class="es3">${VID_INFO_RESOLUTION}</span> -aspect <span class="es3">${VID_INFO_ASPECT}</span> -f rawvideo -y /dev/null&quot;</span> </p>
<p>&nbsp; <span class="kw2">ffmpeg</span> <span class="re5">-i</span> <span class="st0">&quot;<span class="es3">${ORIG_FILE}</span>&quot;</span> <span class="re5">-an</span> <span class="re5">-pass</span> <span class="nu0">1</span> \<br />
&nbsp; &nbsp; <span class="re5">-vcodec</span> libx264 <span class="re5">-flags</span> +loop <span class="re5">-cmp</span> +chroma <span class="re5">-partitions</span> +parti4x4+partp8x8+partb8x8 \<br />
&nbsp; &nbsp; -me_method epzs <span class="re5">-subq</span> <span class="nu0">1</span> <span class="re5">-trellis</span> <span class="nu0">0</span> <span class="re5">-refs</span> <span class="nu0">1</span> <span class="re5">-bf</span> <span class="nu0">3</span> -b_strategy <span class="nu0">1</span> <span class="re5">-level</span> <span class="nu0">31</span> <span class="re5">-coder</span> <span class="nu0">1</span> -me_range <span class="nu0">16</span> <span class="re5">-g</span> <span class="nu0">250</span> -keyint_min <span class="nu0">250</span> \<br />
&nbsp; &nbsp; -sc_threshold <span class="nu0">40</span> -i_qfactor <span class="nu0">0.71</span> <span class="re5">-bt</span> 200kb -rc_eq <span class="st_h">&#8216;blurCplx^(1-qComp)&#8217;</span> <span class="re5">-qcomp</span> <span class="nu0">0.6</span> <span class="re5">-qmin</span> <span class="nu0">1</span> <span class="re5">-qmax</span> <span class="nu0">51</span> <span class="re5">-qdiff</span> <span class="nu0">4</span> \<br />
&nbsp; &nbsp; <span class="re5">-padtop</span> <span class="co1">${VID_BORDER_VERTICAL_TOP}</span> <span class="re5">-padbottom</span> <span class="co1">${VID_BORDER_VERTICAL_BOTTOM}</span> \<br />
&nbsp; &nbsp; <span class="re5">-padleft</span> <span class="co1">${VID_BORDER_HORIZONTAL_LEFT}</span> <span class="re5">-padright</span> <span class="co1">${VID_BORDER_HORIZONTAL_RIGHT}</span> \<br />
&nbsp; &nbsp; <span class="re5">-threads</span> <span class="nu0">2</span> \<br />
&nbsp; &nbsp; <span class="re5">-s</span> <span class="co1">${VID_INFO_RESOLUTION}</span> <span class="re5">-aspect</span> <span class="co1">${VID_INFO_ASPECT}</span> <span class="re5">-f</span> rawvideo <span class="re5">-y</span> <span class="sy0">/</span>dev<span class="sy0">/</span>null <span class="nu0">2</span><span class="sy0">&gt;&amp;</span><span class="nu0">1</span> <span class="sy0">|</span> <span class="kw2">tee</span> pass2.out</p>
<p>&nbsp; <span class="re2">BITRATE</span>=$<span class="br0">&#40;</span> <span class="kw2">grep</span> <span class="re5">-e</span> <span class="st0">&quot;\[libx264.*kb\/s&quot;</span> pass2.out <span class="br0">&#41;</span><br />
&nbsp; <span class="re2">BITRATE</span>=<span class="co1">${BITRATE##*:}</span><br />
&nbsp; <span class="re2">BITRATE</span>=<span class="co1">${BITRATE/.*}</span></p>
<p>&nbsp; <span class="kw3">echo</span> <span class="st0">&quot;average first pass bitrate: <span class="es3">${BITRATE}</span>&quot;</span></p>
<p>&nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-n</span> <span class="co1">${BITRATE}</span> <span class="br0">&#93;</span><span class="br0">&#93;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="br0">&#40;</span> <span class="co1">${BITRATE}</span> <span class="sy0">%</span> <span class="nu0">16</span> <span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw3">let</span> BITRATE+=$<span class="br0">&#40;</span> <span class="kw2">expr</span> <span class="co1">${BITRATE}</span> <span class="sy0">%</span> <span class="nu0">16</span> <span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="kw1">fi</span><br />
&nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="br0">&#40;</span> <span class="co1">${VID_INFO_WIDTH}</span> <span class="sy0">&gt;</span> <span class="nu0">1024</span> <span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span class="re2">BITRATE</span>=<span class="nu0">15360</span><br />
&nbsp; &nbsp; <span class="kw1">elif</span> <span class="br0">&#40;</span><span class="br0">&#40;</span> <span class="co1">${VID_INFO_WIDTH}</span> <span class="sy0">&gt;</span> <span class="nu0">900</span> <span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span class="re2">BITRATE</span>=<span class="nu0">10240</span> <br />
&nbsp; &nbsp; <span class="kw1">elif</span> <span class="br0">&#40;</span><span class="br0">&#40;</span> <span class="co1">${VID_INFO_WIDTH}</span> <span class="sy0">&gt;</span> <span class="nu0">719</span> <span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span class="re2">BITRATE</span>=<span class="nu0">8192</span><br />
&nbsp; &nbsp; <span class="kw1">elif</span> <span class="br0">&#40;</span><span class="br0">&#40;</span> <span class="co1">${VID_INFO_WIDTH}</span> <span class="sy0">&gt;</span> <span class="nu0">620</span> <span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span class="re2">BITRATE</span>=<span class="nu0">2560</span><br />
&nbsp; &nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span class="re2">BITRATE</span>=<span class="nu0">512</span><br />
&nbsp; &nbsp; <span class="kw1">fi</span><br />
&nbsp; <span class="kw1">fi</span></p>
<p>&nbsp; <span class="re2">MAX_BITRATE</span>=$<span class="br0">&#40;</span> <span class="kw2">expr</span> <span class="co1">${BITRATE}</span> + <span class="nu0">512</span> <span class="br0">&#41;</span><br />
<span class="br0">&#125;</span></p>
<p><span class="kw1">function</span> convert_file_second_pass <span class="br0">&#123;</span><br />
&nbsp; <span class="kw3">echo</span> <span class="st0">&quot;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&quot;</span><br />
&nbsp; <span class="kw3">echo</span> <span class="st0">&quot; &nbsp; Second pass: <span class="es3">${ORIG_FILE}</span>&quot;</span></p>
<p>&nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-n</span> <span class="co1">${BLACKBERRY}</span> <span class="br0">&#93;</span><span class="br0">&#93;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; <span class="kw3">echo</span> <span class="st0">&quot;ffmpeg -i <span class="es1">\&quot;</span><span class="es3">${ORIG_FILE}</span><span class="es1">\&quot;</span> -vcodec mpeg4 -vtag XVID -s <span class="es3">${VID_INFO_RESOLUTION}</span> <span class="es1">\<br />
</span> &nbsp; &nbsp; &nbsp;-qscale 10 -ab 48k -ar 22050 -ac 2 -acodec libmp3lame -deinterlace <span class="es1">\<br />
</span> &nbsp; &nbsp; &nbsp;-b 512kb -qmin 1 -qmax 51 <span class="es1">\<br />
</span> &nbsp; &nbsp; &nbsp;-padtop <span class="es3">${VID_BORDER_VERTICAL_TOP}</span> -padbottom <span class="es3">${VID_BORDER_VERTICAL_BOTTOM}</span> <span class="es1">\<br />
</span> &nbsp; &nbsp; &nbsp;-padleft <span class="es3">${VID_BORDER_HORIZONTAL_LEFT}</span> -padright <span class="es3">${VID_BORDER_HORIZONTAL_RIGHT}</span> <span class="es1">\<br />
</span> &nbsp; &nbsp; &nbsp;-aspect <span class="es3">${VID_INFO_ASPECT}</span> <span class="es1">\&quot;</span><span class="es3">${DEST_FILE}</span><span class="es1">\&quot;</span>&quot;</span></p>
<p>&nbsp; &nbsp; <span class="kw2">ffmpeg</span> <span class="re5">-i</span> <span class="st0">&quot;<span class="es3">${ORIG_FILE}</span>&quot;</span> <span class="re5">-vcodec</span> mpeg4 <span class="re5">-vtag</span> XVID <span class="re5">-s</span> <span class="co1">${VID_INFO_RESOLUTION}</span> \<br />
&nbsp; &nbsp; &nbsp; <span class="re5">-ab</span> 48k <span class="re5">-ar</span> <span class="nu0">22050</span> <span class="re5">-ac</span> <span class="nu0">2</span> <span class="re5">-acodec</span> libmp3lame <span class="re5">-deinterlace</span> \<br />
&nbsp; &nbsp; &nbsp; <span class="re5">-b</span> 512kb <span class="re5">-qmin</span> <span class="nu0">1</span> <span class="re5">-qmax</span> <span class="nu0">51</span> \<br />
&nbsp; &nbsp; &nbsp; <span class="re5">-padtop</span> <span class="co1">${VID_BORDER_VERTICAL_TOP}</span> <span class="re5">-padbottom</span> <span class="co1">${VID_BORDER_VERTICAL_BOTTOM}</span> \<br />
&nbsp; &nbsp; &nbsp; <span class="re5">-padleft</span> <span class="co1">${VID_BORDER_HORIZONTAL_LEFT}</span> <span class="re5">-padright</span> <span class="co1">${VID_BORDER_HORIZONTAL_RIGHT}</span> \<br />
&nbsp; &nbsp; &nbsp; <span class="re5">-aspect</span> <span class="co1">${VID_INFO_ASPECT}</span> <span class="st0">&quot;<span class="es3">${DEST_FILE}</span>&quot;</span><br />
&nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; <span class="kw3">echo</span> <span class="st0">&quot;ffmpeg -i <span class="es1">\&quot;</span><span class="es3">${ORIG_FILE}</span><span class="es1">\&quot;</span> -acodec libfaac -ar 44100 -ac <span class="es3">${AUD_INFO_CHANNELS}</span> <span class="es1">\<br />
</span> &nbsp; &nbsp; &nbsp;-async 1 -f mp4 -pass 2 -vcodec libx264 -vtag XVID -flags +loop+ilme -cmp +chroma <span class="es1">\<br />
</span> &nbsp; &nbsp; &nbsp;-partitions +parti4x4+partp8x8+partb8x8 -flags2 +mixed_refs -me_method umh -subq 5 <span class="es1">\<br />
</span> &nbsp; &nbsp; &nbsp;-trellis 1 -refs 5 -bf 3 -b_strategy 1 -level 31 -coder 1 -me_range 16 <span class="es1">\<br />
</span> &nbsp; &nbsp; &nbsp;-g 250 -keyint_min 250 -sc_threshold 40 -i_qfactor 0.71 -bt 200kb <span class="es1">\<br />
</span> &nbsp; &nbsp; &nbsp;-rc_eq &#8216;blurCplx^(1-qComp)&#8217; -qcomp 0.6 -qmin 3 -qmax 15 -qdiff 4 <span class="es1">\<br />
</span> &nbsp; &nbsp; &nbsp;-s <span class="es3">${VID_INFO_RESOLUTION}</span> -aspect <span class="es3">${VID_INFO_ASPECT}</span> <span class="es1">\<br />
</span> &nbsp; &nbsp; &nbsp;-padtop <span class="es3">${VID_BORDER_VERTICAL_TOP}</span> -padbottom <span class="es3">${VID_BORDER_VERTICAL_BOTTOM}</span> <span class="es1">\<br />
</span> &nbsp; &nbsp; &nbsp;-padleft <span class="es3">${VID_BORDER_HORIZONTAL_LEFT}</span> -padright <span class="es3">${VID_BORDER_HORIZONTAL_RIGHT}</span> <span class="es1">\<br />
</span> &nbsp; &nbsp; &nbsp;-b <span class="es3">${BITRATE}</span>kb -maxrate <span class="es3">${MAX_BITRATE}</span>kb <span class="es1">\<br />
</span> &nbsp; &nbsp; &nbsp;-bufsize <span class="es3">${MAX_BITRATE}</span>kb -ab <span class="es3">${AUD_INFO_BITRATE}</span>kb <span class="es1">\<br />
</span> &nbsp; &nbsp; &nbsp;-threads 2 <span class="es1">\<br />
</span> &nbsp; &nbsp; &nbsp;-r <span class="es3">${VID_INFO_FPS}</span> <span class="es1">\&quot;</span><span class="es3">${DEST_FILE}</span><span class="es1">\&quot;</span>&quot;</span></p>
<p>&nbsp; &nbsp; <span class="kw2">ffmpeg</span> <span class="re5">-i</span> <span class="st0">&quot;<span class="es3">${ORIG_FILE}</span>&quot;</span> <span class="re5">-acodec</span> libfaac <span class="re5">-ar</span> <span class="nu0">44100</span> <span class="re5">-ac</span> <span class="co1">${AUD_INFO_CHANNELS}</span> \<br />
&nbsp; &nbsp; &nbsp; <span class="re5">-async</span> <span class="nu0">1</span> <span class="re5">-f</span> mp4 <span class="re5">-pass</span> <span class="nu0">2</span> <span class="re5">-vcodec</span> libx264 <span class="re5">-vtag</span> XVID <span class="re5">-flags</span> +loop+ilme <span class="re5">-cmp</span> +chroma \<br />
&nbsp; &nbsp; &nbsp; <span class="re5">-partitions</span> +parti4x4+partp8x8+partb8x8 <span class="re5">-flags2</span> +mixed_refs -me_method umh <span class="re5">-subq</span> <span class="nu0">5</span> \<br />
&nbsp; &nbsp; &nbsp; <span class="re5">-trellis</span> <span class="nu0">1</span> <span class="re5">-refs</span> <span class="nu0">5</span> <span class="re5">-bf</span> <span class="nu0">3</span> -b_strategy <span class="nu0">1</span> <span class="re5">-level</span> <span class="nu0">31</span> <span class="re5">-coder</span> <span class="nu0">1</span> -me_range <span class="nu0">16</span> \<br />
&nbsp; &nbsp; &nbsp; <span class="re5">-g</span> <span class="nu0">250</span> -keyint_min <span class="nu0">250</span> -sc_threshold <span class="nu0">40</span> -i_qfactor <span class="nu0">0.71</span> <span class="re5">-bt</span> 200kb \<br />
&nbsp; &nbsp; &nbsp; -rc_eq <span class="st_h">&#8216;blurCplx^(1-qComp)&#8217;</span> <span class="re5">-qcomp</span> <span class="nu0">0.6</span> <span class="re5">-qmin</span> <span class="nu0">1</span> <span class="re5">-qmax</span> <span class="nu0">51</span> <span class="re5">-qdiff</span> <span class="nu0">4</span> \<br />
&nbsp; &nbsp; &nbsp; <span class="re5">-s</span> <span class="co1">${VID_INFO_RESOLUTION}</span> <span class="re5">-aspect</span> <span class="co1">${VID_INFO_ASPECT}</span> \<br />
&nbsp; &nbsp; &nbsp; <span class="re5">-padtop</span> <span class="co1">${VID_BORDER_VERTICAL_TOP}</span> <span class="re5">-padbottom</span> <span class="co1">${VID_BORDER_VERTICAL_BOTTOM}</span> \<br />
&nbsp; &nbsp; &nbsp; <span class="re5">-padleft</span> <span class="co1">${VID_BORDER_HORIZONTAL_LEFT}</span> <span class="re5">-padright</span> <span class="co1">${VID_BORDER_HORIZONTAL_RIGHT}</span> \<br />
&nbsp; &nbsp; &nbsp; <span class="re5">-b</span> <span class="co1">${BITRATE}</span>kb <span class="re5">-maxrate</span> <span class="co1">${MAX_BITRATE}</span>kb \<br />
&nbsp; &nbsp; &nbsp; <span class="re5">-bufsize</span> <span class="co1">${MAX_BITRATE}</span>kb <span class="re5">-ab</span> <span class="co1">${AUD_INFO_BITRATE}</span>kb \<br />
&nbsp; &nbsp; &nbsp; <span class="re5">-threads</span> <span class="nu0">2</span> \<br />
&nbsp; &nbsp; &nbsp; <span class="re5">-r</span> <span class="co1">${VID_INFO_FPS}</span> <span class="st0">&quot;<span class="es3">${DEST_FILE}</span>&quot;</span><br />
&nbsp; <span class="kw1">fi</span><br />
<span class="br0">&#125;</span></p>
<p><span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-n</span> <span class="st0">&quot;$1&quot;</span> <span class="br0">&#93;</span><span class="br0">&#93;</span> <span class="sy0">&amp;&amp;</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-n</span> <span class="st0">&quot;$2&quot;</span> <span class="br0">&#93;</span><span class="br0">&#93;</span>; <span class="kw1">then</span><br />
&nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-n</span> <span class="st0">&quot;$3&quot;</span> <span class="br0">&#93;</span><span class="br0">&#93;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; <span class="kw1">case</span> <span class="st0">&quot;$3&quot;</span> <span class="kw1">in</span><br />
&nbsp; &nbsp; &nbsp; bb<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re2">BLACKBERRY</span>=<span class="nu0">1</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re2">BB_TYPE</span>=<span class="st0">&quot;norm&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">;;</span><br />
&nbsp; &nbsp; &nbsp; bb_storm<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re2">BLACKBERRY</span>=<span class="nu0">1</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re2">BB_TYPE</span>=<span class="st0">&quot;STORM&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">;;</span><br />
&nbsp; &nbsp; &nbsp; ps3<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">;;</span><br />
&nbsp; &nbsp; &nbsp; <span class="sy0">*</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">;;</span><br />
&nbsp; &nbsp; <span class="kw1">esac</span><br />
&nbsp; <span class="kw1">fi</span></p>
<p>&nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-n</span> <span class="st0">&quot;$4&quot;</span> <span class="br0">&#93;</span><span class="br0">&#93;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; <span class="re2">FILE_PREFIX</span>=<span class="st0">&quot;<span class="es3">${4}</span>_&quot;</span><br />
&nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; <span class="re2">FILE_PREFIX</span>=<span class="st0">&quot;&quot;</span><br />
&nbsp; <span class="kw1">fi</span></p>
<p>&nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-f</span> <span class="st0">&quot;$1&quot;</span> <span class="br0">&#93;</span><span class="br0">&#93;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; process_file <span class="st0">&quot;$1&quot;</span> <span class="st0">&quot;$2&quot;</span><br />
&nbsp; <span class="kw1">elif</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-d</span> <span class="st0">&quot;$1&quot;</span> <span class="br0">&#93;</span><span class="br0">&#93;</span>; <span class="kw1">then</span><br />
&nbsp; &nbsp; process_directory <span class="st0">&quot;$1&quot;</span> <span class="st0">&quot;$2&quot;</span><br />
&nbsp; <span class="kw1">fi</span><br />
<span class="kw1">else</span><br />
&nbsp; print_usage<br />
&nbsp; <span class="kw3">exit</span><br />
<span class="kw1">fi</span><br />
&nbsp;</div>
<p>The ffmpeg parameters are based off of <a href="http://ps3wiki.qj.net/index.php/Using_ffmpeg_to_transcode_video_for_the_PS3">Using ffmpeg to transcode video for the PS3</a>.  Hope his works for you too.</p>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2009/09/23/howto-convert-an-entire-directory-of-videos-to-play-on-your-sony-playstation-3-using-ffmpeg/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Getting three monitors to work with Kubuntu (Ubuntu with KDE) on a Dell Optiplex GX520 &#8211; NVidia GeForce4 MX 4000 low profile video card and the onboard Intel 82945G/GZ video card</title>
		<link>http://froebe.net/blog/2009/05/11/getting-three-monitors-to-work-with-kubuntu-ubuntu-with-kde-on-a-dell-optiplex-gx520-nvidia-geforce4-mx-4000-low-profile-video-card-and-the-onboard-intel-82945ggz-video-card/</link>
		<comments>http://froebe.net/blog/2009/05/11/getting-three-monitors-to-work-with-kubuntu-ubuntu-with-kde-on-a-dell-optiplex-gx520-nvidia-geforce4-mx-4000-low-profile-video-card-and-the-onboard-intel-82945ggz-video-card/#comments</comments>
		<pubDate>Mon, 11 May 2009 18:22:35 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Sybase]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[dell]]></category>
		<category><![CDATA[GeForce4 MX 4000]]></category>
		<category><![CDATA[Intel]]></category>
		<category><![CDATA[jaunty]]></category>
		<category><![CDATA[kubuntu]]></category>
		<category><![CDATA[lspci]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[nvidia]]></category>
		<category><![CDATA[optiplex]]></category>
		<category><![CDATA[optiplex gx520]]></category>
		<category><![CDATA[Quadro NVS 110M]]></category>
		<category><![CDATA[twinview]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntu 9.04]]></category>
		<category><![CDATA[vesa]]></category>
		<category><![CDATA[xinerama]]></category>
		<category><![CDATA[xorg]]></category>
		<category><![CDATA[xorg.conf]]></category>
		<category><![CDATA[xwindows]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=1067</guid>
		<description><![CDATA[At work we have three generic LCD monitors mounted on a pole to view monitoring metrics for our Oracle &#038; Sybase database servers. On a previous machine that was cannibalized for another task, we ran Microsoft Windows XP to drive the three monitors. Last week we were given a hand me down desktop, a Dell [...]]]></description>
			<content:encoded><![CDATA[<p>At work we have three generic LCD monitors mounted on a pole to view monitoring metrics for our Oracle &#038; Sybase database servers.  On a previous machine that was cannibalized for another task, we ran Microsoft Windows XP to drive the three monitors.  </p>
<p>Last week we were given a hand me down desktop, a Dell Optiplex GX520 with integrated Intel 82945G/GZ video on the motherboard.  When we added the NVidia GeForce4 MX 4000 low profile video card, Windows XP for whatever reason was unable to use both video cards.  I proposed Kubuntu 9.04 Linux as an alternative.  As it was only myself that I had to convince to make the attempt, I was hard pressed to say no <img src='http://froebe.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>The Intel 82945G/GZ video card will be the primary card and must be attached to &#8220;Screen  0&#8243; in the ServerLayout section.</p>
<p>The NVidia video card has two connectors:  </p>
<ol>
<li>A standard VGA port driven by a GeForce4 MX 4000 GPU < - Primary nvidia port</li>
</li>
<li>A super-video port driven by a Quadro NVS 110M</li>
</ol>
<p>After the base install of the operating system, XWindows was only able to see the Intel video card.  After much tinkering with the /etc/xorg.conf file, I was able to get all three LCD monitors to work with Xinerama.  There are a number of gotchas that you might run into:</p>
<ul>
<li>If the integrated Intel video card is set to <i>Auto</i> in the BIOS, the card will be completely disabled.  You need to disable <i>Auto</i></li>
<li>You need to know which Nvidia Device entry drives the VGA connector.  It <strong>must</strong> be initialized prior to the S-Video port.</li>
<li>Disable NVidia&#8217;s <i>TwinView</i> and <i>metamodes</i> option lines in the Screen Section.
	</li>
<li>Use <strong>sudo lspci</strong> to identify the pci bus ids.  You will need to put them in the Device Sections.</li>
<li>The integrated Intel video card <strong>must</strong> use the <em>vesa</em> video driver as the intel video driver will stacktrace when used with xinerama.</li>
</ul>
<div class="bash dean_ch"><span class="co0"># nvidia-settings: X configuration file generated by nvidia-settings</span><br />
<span class="co0"># nvidia-settings: &nbsp;version 1.0 &nbsp;(buildd@palmer) &nbsp;Sun Feb &nbsp;1 20:21:04 UTC 2009</span></p>
<p>Section <span class="st0">&quot;ServerLayout&quot;</span><br />
&nbsp; &nbsp; Identifier &nbsp; &nbsp; <span class="st0">&quot;Default Layout&quot;</span><br />
&nbsp; &nbsp; Screen &nbsp; &nbsp; &nbsp;<span class="nu0">0</span> &nbsp;<span class="st0">&quot;Screen0&quot;</span> <span class="nu0">0</span> <span class="nu0">0</span> &nbsp; <br />
&nbsp; &nbsp; Screen &nbsp; &nbsp; &nbsp;<span class="nu0">1</span> &nbsp;<span class="st0">&quot;Screen2&quot;</span> Above <span class="st0">&quot;Screen0&quot;</span><br />
&nbsp; &nbsp; Screen &nbsp; &nbsp; &nbsp;<span class="nu0">2</span> &nbsp;<span class="st0">&quot;Screen1&quot;</span> Above <span class="st0">&quot;Screen2&quot;</span><br />
&nbsp; &nbsp; InputDevice &nbsp; &nbsp;<span class="st0">&quot;Keyboard0&quot;</span> <span class="st0">&quot;CoreKeyboard&quot;</span><br />
&nbsp; &nbsp; InputDevice &nbsp; &nbsp;<span class="st0">&quot;Mouse0&quot;</span> <span class="st0">&quot;CorePointer&quot;</span> &nbsp; &nbsp;<br />
&nbsp; &nbsp; Option <span class="st0">&quot;Xinerama&quot;</span> <span class="st0">&quot;On&quot;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
EndSection &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </p>
<p>Section <span class="st0">&quot;Files&quot;</span><br />
&nbsp; &nbsp; ModulePath &nbsp; &nbsp; &nbsp;<span class="st0">&quot;/usr/lib/xorg/modules/extensions&quot;</span><br />
&nbsp; &nbsp; ModulePath &nbsp; &nbsp; &nbsp;<span class="st0">&quot;/usr/lib/xorg/modules/drivers&quot;</span> &nbsp; <br />
&nbsp; &nbsp; ModulePath &nbsp; &nbsp; &nbsp;<span class="st0">&quot;/usr/lib/xorg/modules&quot;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
EndSection &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p>Section <span class="st0">&quot;Module&quot;</span><br />
&nbsp; &nbsp; Load &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;glx&quot;</span><br />
EndSection &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p>Section <span class="st0">&quot;ServerFlags&quot;</span><br />
&nbsp; &nbsp; Option &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;xinerama&quot;</span> <span class="st0">&quot;true&quot;</span><br />
&nbsp; &nbsp; Option &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;DefaultServerLayout&quot;</span> <span class="st0">&quot;Default Layout&quot;</span><br />
EndSection &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </p>
<p>Section <span class="st0">&quot;InputDevice&quot;</span><br />
&nbsp; &nbsp; Identifier &nbsp; &nbsp; <span class="st0">&quot;Keyboard0&quot;</span><br />
&nbsp; &nbsp; Driver &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;kbd&quot;</span> &nbsp; &nbsp; &nbsp;<br />
EndSection &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p>Section <span class="st0">&quot;InputDevice&quot;</span><br />
&nbsp; &nbsp; Identifier &nbsp; &nbsp; <span class="st0">&quot;Mouse0&quot;</span><br />
&nbsp; &nbsp; Driver &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;mouse&quot;</span> <br />
&nbsp; &nbsp; Option &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;Protocol&quot;</span> <span class="st0">&quot;auto&quot;</span><br />
&nbsp; &nbsp; Option &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;Device&quot;</span> <span class="st0">&quot;/dev/psaux&quot;</span><br />
&nbsp; &nbsp; Option &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;Emulate3Buttons&quot;</span> <span class="st0">&quot;no&quot;</span><br />
&nbsp; &nbsp; Option &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;ZAxisMapping&quot;</span> <span class="st0">&quot;4 5&quot;</span> &nbsp;<br />
EndSection &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </p>
<p>Section <span class="st0">&quot;Monitor&quot;</span><br />
&nbsp; &nbsp; Identifier &nbsp; &nbsp; <span class="st0">&quot;Configured Monitor&quot;</span><br />
EndSection &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </p>
<p>Section <span class="st0">&quot;Monitor&quot;</span><br />
&nbsp; &nbsp; Identifier &nbsp; &nbsp; <span class="st0">&quot;Monitor0&quot;</span><br />
&nbsp; &nbsp; VendorName &nbsp; &nbsp; <span class="st0">&quot;Unknown&quot;</span> <br />
&nbsp; &nbsp; ModelName &nbsp; &nbsp; &nbsp;<span class="st0">&quot;CMO CMC 17 AD&quot;</span><br />
&nbsp; &nbsp; HorizSync &nbsp; &nbsp; &nbsp; <span class="nu0">30.0</span> &#8211; <span class="nu0">82.0</span> &nbsp; <br />
&nbsp; &nbsp; VertRefresh &nbsp; &nbsp; <span class="nu0">50.0</span> &#8211; <span class="nu0">75.0</span> &nbsp; <br />
EndSection &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p>Section <span class="st0">&quot;Monitor&quot;</span><br />
&nbsp; &nbsp; Identifier &nbsp; &nbsp; <span class="st0">&quot;Monitor1&quot;</span><br />
&nbsp; &nbsp; VendorName &nbsp; &nbsp; <span class="st0">&quot;Unknown&quot;</span> <br />
&nbsp; &nbsp; ModelName &nbsp; &nbsp; &nbsp;<span class="st0">&quot;CMO CMC 17 AD&quot;</span><br />
&nbsp; &nbsp; HorizSync &nbsp; &nbsp; &nbsp; <span class="nu0">30.0</span> &#8211; <span class="nu0">82.0</span> &nbsp; <br />
&nbsp; &nbsp; VertRefresh &nbsp; &nbsp; <span class="nu0">50.0</span> &#8211; <span class="nu0">75.0</span> &nbsp; <br />
EndSection &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p>Section <span class="st0">&quot;Monitor&quot;</span><br />
&nbsp; &nbsp; Identifier &nbsp; &nbsp; <span class="st0">&quot;Monitor2&quot;</span><br />
&nbsp; &nbsp; VendorName &nbsp; &nbsp; <span class="st0">&quot;Unknown&quot;</span> <br />
&nbsp; &nbsp; ModelName &nbsp; &nbsp; &nbsp;<span class="st0">&quot;Seiko&quot;</span> &nbsp; <br />
&nbsp; &nbsp; HorizSync &nbsp; &nbsp; &nbsp; <span class="nu0">30.0</span> &#8211; <span class="nu0">75.0</span><br />
&nbsp; &nbsp; VertRefresh &nbsp; &nbsp; <span class="nu0">60.0</span> &nbsp; &nbsp; &nbsp; <br />
EndSection &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </p>
<p>
Section <span class="st0">&quot;Device&quot;</span><br />
&nbsp; &nbsp; Identifier &nbsp; &nbsp; <span class="st0">&quot;Configured Video Device&quot;</span><br />
&nbsp; &nbsp; Driver &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;nvidia&quot;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; Option &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;NoLogo&quot;</span> <span class="st0">&quot;True&quot;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
EndSection &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p>Section <span class="st0">&quot;Device&quot;</span><br />
&nbsp; &nbsp;Identifier &nbsp;<span class="st0">&quot;Device0&quot;</span><br />
&nbsp; &nbsp;<span class="co0">#Driver &nbsp; &nbsp; &nbsp;&quot;intel&quot; </span><br />
&nbsp; &nbsp;Driver &nbsp; &nbsp; &nbsp;<span class="st0">&quot;vesa&quot;</span> &nbsp; <br />
&nbsp; &nbsp;VendorName &nbsp;<span class="st0">&quot;Intel Corporation&quot;</span><br />
&nbsp; &nbsp;BoardName &nbsp; <span class="st0">&quot;82945G/GZ Integrated Graphics Controller&quot;</span><br />
&nbsp; &nbsp;BusID &nbsp; &nbsp; &nbsp; <span class="st0">&quot;PCI:0:2:0&quot;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp;Screen &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="nu0">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
EndSection &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </p>
<p>Section <span class="st0">&quot;Device&quot;</span><br />
&nbsp; &nbsp; Identifier &nbsp; &nbsp; <span class="st0">&quot;Device1&quot;</span><br />
&nbsp; &nbsp; Driver &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;nvidia&quot;</span><br />
&nbsp; &nbsp; VendorName &nbsp; &nbsp; <span class="st0">&quot;NVIDIA Corporation&quot;</span><br />
&nbsp; &nbsp; BoardName &nbsp; &nbsp; &nbsp;<span class="st0">&quot;Quadro NVS 110M&quot;</span><br />
&nbsp; &nbsp; BusID &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&quot;PCI:4:0:0&quot;</span><br />
&nbsp; &nbsp; Screen &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="nu0">1</span><br />
EndSection</p>
<p>Section <span class="st0">&quot;Device&quot;</span><br />
&nbsp; &nbsp; Identifier &nbsp; &nbsp; <span class="st0">&quot;Device2&quot;</span><br />
&nbsp; &nbsp; Driver &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;nvidia&quot;</span><br />
&nbsp; &nbsp; VendorName &nbsp; &nbsp; <span class="st0">&quot;NVIDIA Corporation&quot;</span><br />
&nbsp; &nbsp; BoardName &nbsp; &nbsp; &nbsp;<span class="st0">&quot;GeForce4 MX 4000&quot;</span><br />
&nbsp; &nbsp; BusID &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&quot;PCI:4:0:0&quot;</span><br />
EndSection</p>
<p>Section <span class="st0">&quot;Screen&quot;</span><br />
&nbsp; &nbsp; Identifier &nbsp; &nbsp; <span class="st0">&quot;Default Screen&quot;</span><br />
&nbsp; &nbsp; Device &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;Configured Video Device&quot;</span><br />
&nbsp; &nbsp; Monitor &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&quot;Configured Monitor&quot;</span><br />
&nbsp; &nbsp; DefaultDepth &nbsp; &nbsp;<span class="nu0">24</span><br />
EndSection</p>
<p>Section <span class="st0">&quot;Screen&quot;</span><br />
&nbsp; &nbsp; Identifier &nbsp; &nbsp; <span class="st0">&quot;Screen0&quot;</span><br />
&nbsp; &nbsp; Device &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;Device0&quot;</span><br />
&nbsp; &nbsp; Monitor &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&quot;Monitor0&quot;</span><br />
&nbsp; &nbsp; DefaultDepth &nbsp; &nbsp;<span class="nu0">24</span><br />
&nbsp; &nbsp; SubSection &nbsp; &nbsp; <span class="st0">&quot;Display&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Depth &nbsp; &nbsp; &nbsp; <span class="nu0">24</span><br />
&nbsp; &nbsp; EndSubSection<br />
EndSection</p>
<p>Section <span class="st0">&quot;Screen&quot;</span><br />
&nbsp; &nbsp; Identifier &nbsp; &nbsp; <span class="st0">&quot;Screen1&quot;</span><br />
&nbsp; &nbsp; Device &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;Device1&quot;</span><br />
&nbsp; &nbsp; Monitor &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&quot;Monitor1&quot;</span><br />
&nbsp; &nbsp; DefaultDepth &nbsp; &nbsp;<span class="nu0">24</span><br />
&nbsp; &nbsp; Option &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;TwinView&quot;</span> <span class="st0">&quot;0&quot;</span><br />
&nbsp; &nbsp; SubSection &nbsp; &nbsp; <span class="st0">&quot;Display&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Depth &nbsp; &nbsp; &nbsp; <span class="nu0">24</span><br />
&nbsp; &nbsp; EndSubSection<br />
EndSection</p>
<p>Section <span class="st0">&quot;Screen&quot;</span><br />
&nbsp; &nbsp; Identifier &nbsp; &nbsp; <span class="st0">&quot;Screen2&quot;</span><br />
&nbsp; &nbsp; Device &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;Device2&quot;</span><br />
&nbsp; &nbsp; Monitor &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&quot;Monitor2&quot;</span><br />
&nbsp; &nbsp; DefaultDepth &nbsp; &nbsp;<span class="nu0">24</span><br />
&nbsp; &nbsp; Option &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;TwinView&quot;</span> <span class="st0">&quot;0&quot;</span><br />
&nbsp; &nbsp; Option &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;TwinViewXineramaInfoOrder&quot;</span> <span class="st0">&quot;CRT-0&quot;</span><br />
&nbsp; &nbsp; SubSection &nbsp; &nbsp; <span class="st0">&quot;Display&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Depth &nbsp; &nbsp; &nbsp; <span class="nu0">24</span><br />
&nbsp; &nbsp; EndSubSection<br />
EndSection</p>
<p>Section <span class="st0">&quot;Extensions&quot;</span><br />
&nbsp; &nbsp; Option &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;Composite&quot;</span> <span class="st0">&quot;on&quot;</span><br />
EndSection</div>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2009/05/11/getting-three-monitors-to-work-with-kubuntu-ubuntu-with-kde-on-a-dell-optiplex-gx520-nvidia-geforce4-mx-4000-low-profile-video-card-and-the-onboard-intel-82945ggz-video-card/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to upgrade the Acer Aspire One (model 110) BIOS using a USB thumb drive</title>
		<link>http://froebe.net/blog/2009/03/13/how-to-upgrade-the-acer-aspire-one-model-110-bios-using-a-usb-thumb-drive/</link>
		<comments>http://froebe.net/blog/2009/03/13/how-to-upgrade-the-acer-aspire-one-model-110-bios-using-a-usb-thumb-drive/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 18:50:39 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[acer]]></category>
		<category><![CDATA[acer aspire one]]></category>
		<category><![CDATA[aspire one]]></category>
		<category><![CDATA[BIOS]]></category>
		<category><![CDATA[bios upgrade]]></category>
		<category><![CDATA[freedos]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=899</guid>
		<description><![CDATA[Note that upgrading the BIOS using an USB thumb drive is NOT needed if you have Windows XP or Windows Vista installed on your Acer Aspire One netbook. Prepare the USB thumb drive (need 64MB or larger): Install FreeDOS on your USB thumbdrive by using Unetbootin. Download the latest (currently 3309) BIOS from Acer&#8217;s ftp [...]]]></description>
			<content:encoded><![CDATA[<p>Note that upgrading the BIOS using an USB thumb drive is NOT needed if you have Windows XP or Windows Vista installed on your Acer Aspire One netbook.</p>
<h4>Prepare the USB thumb drive (need 64MB or larger):</h4>
<ol>
<li>Install FreeDOS on your USB thumbdrive by using  <a href="http://unetbootin.sourceforge.net/">Unetbootin</a>.</li>
<li>Download the latest (currently 3309) BIOS from <a href="ftp://ftp.acer-euro.com/netbook/aspire_one_110/bios/">Acer&#8217;s ftp server</a></li>
<li>Extract all the files in the zip file onto your USB thumb drive</li>
</ol>
<h4>On the Acer Aspire One machine:</h4>
<ol>
<li>Insert the prepared USB thumb drive into an USB port on the Aspire One</li>
<li>Reboot</li>
<li>Hit the &#8220;F12&#8243; button every second or so until the boot drive menu appears</li>
<li>Choose the option for USB HD or similar</li>
<li>Hit enter when presented with a PC Linux boot screen (it will boot into FreeDOS)</li>
<li>When the FreeDOS boot menu shows up, choose &#8220;safe mode&#8221; (no drivers loaded)</li>
<li>From the dos prompt, change to the c drive by typing &#8220;C:&#8221; and enter</li>
<li>Type &#8220;dir *.bat&#8221;, you should see 3309.bat (if you downloaded the 3309 BIOS).  Run that by typing &#8220;3309.bat&#8221;</li>
<li>If all goes well, reboot</li>
</ol>
<p>Above is a variant of the instructions found on <a href="http://macles.blogspot.com/2008/07/flashing-bios.html">Macles website</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2009/03/13/how-to-upgrade-the-acer-aspire-one-model-110-bios-using-a-usb-thumb-drive/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FW:  Full Circle Magazine issue 22 is out!</title>
		<link>http://froebe.net/blog/2009/03/10/fw-full-circle-magazine-issue-22-is-out/</link>
		<comments>http://froebe.net/blog/2009/03/10/fw-full-circle-magazine-issue-22-is-out/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 17:38:15 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[edubuntu]]></category>
		<category><![CDATA[ezine]]></category>
		<category><![CDATA[full circle magazine]]></category>
		<category><![CDATA[issue 22]]></category>
		<category><![CDATA[kubuntu]]></category>
		<category><![CDATA[magazine]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xubuntu]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=878</guid>
		<description><![CDATA[The folks over at Full Circle Magazine have release yet another issue Command and Conquer &#8211; Resizing Images With FFMPEG. How-To : Program in C &#8211; Part 6, Web Development &#8211; Part 3, Installing CrunchEEE To The EEE PC, and Spreading Ubuntu. My Story &#8211; Making The Switch Book Review &#8211; Ubuntu For Non-Geeks 3rd [...]]]></description>
			<content:encoded><![CDATA[<p>The folks over at <a href="http://fullcirclemagazine.org/">Full Circle Magazine</a> have release yet another issue <img src='http://froebe.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<ul>
<li>
<div id="attachment_879" class="wp-caption alignright" style="width: 310px"><a href="http://fullcirclemagazine.org/"><img class="size-medium wp-image-879" title="Full Circle Magazine Issue 22" src="http://froebe.net/blog/wp-content/uploads/2009/03/issue22_en_cover-300x212.png" alt="Full Circle Magazine Issue 22" width="300" height="212" /></a><p class="wp-caption-text">Full Circle Magazine Issue 22</p></div>
<p>Command and Conquer &#8211; Resizing Images With FFMPEG.</li>
<li>How-To : Program in C &#8211; Part 6, Web Development &#8211; Part 3,</li>
<li>Installing CrunchEEE To The EEE PC, and Spreading Ubuntu.</li>
<li>My Story &#8211; Making The Switch</li>
<li>Book Review &#8211; Ubuntu For Non-Geeks 3rd Edition</li>
<li>MOTU Interview &#8211; Emanuele Gentili</li>
<li>Top 5 &#8211; DVD Rippers</li>
<li>PLUS: all the usual goodness…</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2009/03/10/fw-full-circle-magazine-issue-22-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install Sybase&#8217;s ODBC driver on Ubuntu Linux for ASE/IQ/Replication Server/SQL Anywhere/etc</title>
		<link>http://froebe.net/blog/2009/01/13/how-to-install-sybases-odbc-driver-on-ubuntu-linux-810-for-aseiqreplication-serversql-anywhereetc/</link>
		<comments>http://froebe.net/blog/2009/01/13/how-to-install-sybases-odbc-driver-on-ubuntu-linux-810-for-aseiqreplication-serversql-anywhereetc/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 21:33:04 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[ASE]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Sybase]]></category>
		<category><![CDATA[ASE 15]]></category>
		<category><![CDATA[dsn]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unixodbc]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=825</guid>
		<description><![CDATA[ASE 15.0.3 full install on Linux 32bit. First we need to install unixODBC: % sudo aptitude install unixodbc unixodbc-bin unixodbc-dev libstdc++5 Because of a bug within the Sybase ODBC install, we need to change /opt/sybase/DataAccess/ODBC/samples/drivertemplate.txt. /opt/sybase/DataAccess/ODBC/samples/drivertemplate.txt: &#91;Adaptive Server Enterprise&#93; Description = Sybase ODBC Driver Driver = /opt/sybase/ODBC-12_5/lib/libsybdrvodb.so FileUsage = -1 Change to: &#91;Adaptive Server Enterprise&#93; [...]]]></description>
			<content:encoded><![CDATA[<p>ASE 15.0.3 full install on Linux 32bit.<br />
First we need to install unixODBC:</p>
<div class="bash dean_ch"><span class="sy0">%</span> <span class="kw2">sudo</span> <span class="kw2">aptitude</span> <span class="kw2">install</span> unixodbc unixodbc-bin unixodbc-dev libstdc++<span class="nu0">5</span></div>
<p>Because of a bug within the Sybase ODBC install, we need to change /opt/sybase/DataAccess/ODBC/samples/drivertemplate.txt.</p>
<p>/opt/sybase/DataAccess/ODBC/samples/drivertemplate.txt:</p>
<div class="bash dean_ch"><span class="br0">&#91;</span>Adaptive Server Enterprise<span class="br0">&#93;</span><br />
Description = Sybase ODBC Driver<br />
Driver = <span class="sy0">/</span>opt<span class="sy0">/</span>sybase<span class="sy0">/</span>ODBC-<span class="nu0">12</span>_5<span class="sy0">/</span>lib<span class="sy0">/</span>libsybdrvodb.so<br />
FileUsage = <span class="re5">-1</span></div>
<p>Change to:</p>
<div class="bash dean_ch"><span class="br0">&#91;</span>Adaptive Server Enterprise<span class="br0">&#93;</span><br />
Description = Sybase ODBC Driver<br />
Driver = <span class="sy0">/</span>opt<span class="sy0">/</span>sybase<span class="sy0">/</span>DataAccess<span class="sy0">/</span>ODBC<span class="sy0">/</span>lib<span class="sy0">/</span>libsybdrvodb.so<br />
FileUsage = <span class="re5">-1</span></div>
<p>This template file is used to install the ODBC driver with unixODBC:</p>
<div class="bash dean_ch">odbcinst <span class="re5">-i</span> <span class="re5">-d</span> <span class="re5">-f</span> <span class="sy0">/</span>opt<span class="sy0">/</span>sybase<span class="sy0">/</span>DataAccess<span class="sy0">/</span>ODBC<span class="sy0">/</span>samples<span class="sy0">/</span>drivertemplate.txt</div>
<p>Currently Sybase&#8217;s ODBC driver does not have a GUI component for unixODBC.  I&#8217;m waiting on the bug #.  Once I have it, I&#8217;ll update this post.</p>
<p>Now we are ready to define an ODBC dsn.  We will need to create a template file to do so:</p>
<p>dbadev1.dsn</p>
<div class="bash dean_ch"><span class="br0">&#91;</span>dbadev1<span class="br0">&#93;</span><br />
<span class="re2">Description</span>=Sybase ODBC Data Source<br />
<span class="re2">UserID</span>=sa<br />
<span class="re2">Password</span>=password<br />
<span class="re2">Driver</span>=Adaptive Server Enterprise<br />
<span class="re2">Server</span>=dba-dev1<br />
<span class="re2">Port</span>=<span class="nu0">5000</span><br />
<span class="re2">Database</span>=sybase_dba<br />
<span class="re2">UseCursor</span>=<span class="nu0">1</span></div>
<p>To add it to unixODBC we need to run:</p>
<div class="bash dean_ch">odbcinst <span class="re5">-i</span> <span class="re5">-s</span> <span class="re5">-f</span> dbadev1.dsn</div>
<p>If you wanted a system wide dsn:</p>
<div class="bash dean_ch"><span class="kw2">sudo</span> odbcinst <span class="re5">-i</span> <span class="re5">-s</span> <span class="re5">-l</span> <span class="re5">-f</span> dbadev1.dsn</div>
<div class="bash dean_ch">Updated to include libstdc++<span class="nu0">5</span> <span class="kw1">for</span> the newer releases of Ubuntu</div>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2009/01/13/how-to-install-sybases-odbc-driver-on-ubuntu-linux-810-for-aseiqreplication-serversql-anywhereetc/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>VPNWiz &#8211; Cisco VPN GNOME GUI for PCF files</title>
		<link>http://froebe.net/blog/2009/01/10/vpnwiz-cisco-vpn-gnome-gui-for-pcf-files/</link>
		<comments>http://froebe.net/blog/2009/01/10/vpnwiz-cisco-vpn-gnome-gui-for-pcf-files/#comments</comments>
		<pubDate>Sun, 11 Jan 2009 00:33:58 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[cisco vpn]]></category>
		<category><![CDATA[decrypt]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[pcf]]></category>
		<category><![CDATA[pcf file]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtual private network]]></category>
		<category><![CDATA[vpn]]></category>
		<category><![CDATA[vpnc]]></category>
		<category><![CDATA[vpnwiz]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=803</guid>
		<description><![CDATA[The fine folks over at PhrankDaChicken@Ubuntu have come up with an excellent and simple GUI for the open source Cisco VPN client (vpnc).  The nice thing is that you won&#8217;t have to decrypt the group password in your cisco PCF file as VPNWiz will read the PCF files directly! I don&#8217;t know about you, but [...]]]></description>
			<content:encoded><![CDATA[<p>The fine folks over at <a title="PhrankDaChicken@Ubuntu" href="http://ubuntu.online02.com">PhrankDaChicken@Ubuntu</a> have come up with an excellent and simple GUI for the <a href="http://www.unix-ag.uni-kl.de/~massar/vpnc/">open source Cisco VPN client (vpnc)</a>.  The nice thing is that you won&#8217;t have to <a href="http://www.unix-ag.uni-kl.de/~massar/bin/cisco-decode">decrypt the group password</a> in your <a href="http://www.cisco.com">cisco</a> PCF file as VPNWiz will read the PCF files directly!</p>
<p>I don&#8217;t know about you, but I&#8217;ve never had much luck with the vpnc plugin for NetworkManager when connecting to my office&#8217;s VPN.</p>
<div id="node-13" class="node">
<div class="content">
<div id="attachment_802" class="wp-caption alignright" style="width: 310px"><a href="http://ubuntu.online02.com/node/13"><img class="size-medium wp-image-802" title="VPNWiz - Cisco VPN GUI for Gnome" src="http://froebe.net/blog/wp-content/uploads/2009/01/vpnwiz-300x109.jpg" alt="VPNWiz - Cisco VPN GUI for Gnome" width="300" height="109" /></a><p class="wp-caption-text">VPNWiz - Cisco VPN GUI for Gnome</p></div>
<blockquote><p><em>VPNWiz uses cisco PCF files to connect a GNOME linux desktop to a cisco vpn server.</em></p>
<p><em><a href="http://ubuntu.online02.com/files/vpnwiz.zip">Download</a> the VPNWiz zip file, and run the install.sh file.</em></p>
<p><em>Go to &#8220;Apps -&gt; Internet -&gt; VPNWiz&#8221; to start it &#8211; follow the wizard to connect.</em></p>
<p><em>Click on the VPNWiz icon in the system tray to disconnect.</em></p>
<p><em>Get <a href="http://ubuntu.online02.com/node/13">VPNWiz here</a>.</em></p></blockquote>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2009/01/10/vpnwiz-cisco-vpn-gnome-gui-for-pcf-files/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Defragmenting XFS file systems on Ubuntu 8.10</title>
		<link>http://froebe.net/blog/2008/12/31/defragmenting-xfs-file-systems-on-ubuntu-810/</link>
		<comments>http://froebe.net/blog/2008/12/31/defragmenting-xfs-file-systems-on-ubuntu-810/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 21:36:56 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[aptitude]]></category>
		<category><![CDATA[defrag]]></category>
		<category><![CDATA[defragment]]></category>
		<category><![CDATA[file system]]></category>
		<category><![CDATA[fragmentation]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntu 8.10]]></category>
		<category><![CDATA[xfs]]></category>
		<category><![CDATA[xfs file system]]></category>
		<category><![CDATA[xfsdump]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=789</guid>
		<description><![CDATA[After using the XFS file system for a while, you might see it slow down a bit.  If so, you may need to defragment the file system.  Doing so is very easy but does require root access and the xfsdump package: sudo aptitude install xfsdump Now that we have the xfsdump package, we can use [...]]]></description>
			<content:encoded><![CDATA[<p>After using the XFS file system for a while, you might see it slow down a bit.  If so, you may need to defragment the file system.  Doing so is very easy but does require root access and the xfsdump package:</p>
<div class="bash dean_ch"><span class="kw2">sudo</span> <span class="kw2">aptitude</span> <span class="kw2">install</span> xfsdump</div>
<p>Now that we have the xfsdump package, we can use the xfs_db utility to determine the current fragmentation percentage:</p>
<div class="bash dean_ch">$ <span class="kw2">sudo</span> xfs_db <span class="re5">-r</span> <span class="sy0">/</span>dev<span class="sy0">/</span>sda6<br />
xfs_db<span class="sy0">&gt;</span> frag<br />
actual <span class="nu0">95343</span>, ideal <span class="nu0">85809</span>, fragmentation factor <span class="nu0">10.00</span><span class="sy0">%</span><br />
xfs_db<span class="sy0">&gt;</span> quit</div>
<p>As you can see, the estimated fragmentation percentage is 10%.  Not bad but let&#8217;s get that down:</p>
<div class="bash dean_ch">$ <span class="kw2">sudo</span> xfs_fsr <span class="re5">-v</span> <span class="sy0">/</span>dev<span class="sy0">/</span>sda6<br />
<span class="sy0">/</span>home start <span class="re2">inode</span>=<span class="nu0">0</span><br />
<span class="re2">ino</span>=<span class="nu0">138</span><br />
extents before:<span class="nu0">2</span> after:<span class="nu0">1</span> DONE <span class="re2">ino</span>=<span class="nu0">138</span><br />
<span class="re2">ino</span>=<span class="nu0">100725</span><br />
extents before:<span class="nu0">19</span> after:<span class="nu0">1</span> DONE <span class="re2">ino</span>=<span class="nu0">100725</span><br />
<span class="re2">ino</span>=<span class="nu0">103896</span><br />
extents before:<span class="nu0">17</span> after:<span class="nu0">1</span> DONE <span class="re2">ino</span>=<span class="nu0">103896</span><br />
<span class="re2">ino</span>=<span class="nu0">474184</span><br />
extents before:<span class="nu0">3</span> after:<span class="nu0">1</span> DONE <span class="re2">ino</span>=<span class="nu0">474184</span><br />
<span class="re2">ino</span>=<span class="nu0">474183</span><br />
extents before:<span class="nu0">2</span> after:<span class="nu0">1</span> DONE <span class="re2">ino</span>=<span class="nu0">474183</span><br />
<span class="re2">ino</span>=<span class="nu0">474185</span><br />
&#8230;.</div>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2008/12/31/defragmenting-xfs-file-systems-on-ubuntu-810/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Oops!  I spoke too soon!  Exchange Plugin 2.24.2 still broken for Evolution</title>
		<link>http://froebe.net/blog/2008/12/12/oops-i-spoke-too-soon-exchange-plugin-2242-still-broken-for-evolution/</link>
		<comments>http://froebe.net/blog/2008/12/12/oops-i-spoke-too-soon-exchange-plugin-2242-still-broken-for-evolution/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 03:32:44 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[bug 306975]]></category>
		<category><![CDATA[bugzilla]]></category>
		<category><![CDATA[evolution]]></category>
		<category><![CDATA[exchange]]></category>
		<category><![CDATA[exchange connector]]></category>
		<category><![CDATA[exchange plugin for evolution]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=773</guid>
		<description><![CDATA[Back on November 5th, I reported that in my blog post Woohoo! Looks like Evolution will be able to connect to Microsoft Exchange again! that the Exchange plugin for Evolution was fixed.  Well, they fixed one part but many of us still aren&#8217;t able to use the plugin. Bug 306975:  Evolution: Exchange-Connector-setup 2.24.2 unable to [...]]]></description>
			<content:encoded><![CDATA[<p>Back on November 5th, I reported that in my blog<a href="http://www.ubuntu.com"><img class="alignright size-medium wp-image-714" title="Ubuntu 8.10" src="http://froebe.net/blog/wp-content/uploads/2008/09/ubuntulogo.png" alt="" width="202" height="55" /></a> post <a title="Permanent Link to Woohoo!  Looks like Evolution will be able to connect to Microsoft Exchange again!" rel="bookmark" href="../2008/11/05/woohoo-looks-like-evolution-will-be-able-to-connect-to-microsoft-exchange-again/">Woohoo!  Looks like Evolution will be able to connect to Microsoft Exchange again!</a> that the Exchange plugin for <a href="http://projects.gnome.org/evolution/">Evolution</a> was fixed.  Well, they fixed one part but many of us still aren&#8217;t able to use the plugin. <img src='http://froebe.net/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p><a href="https://bugs.launchpad.net/ubuntu/+source/evolution-exchange/+bug/306975">Bug 306975:  Evolution: Exchange-Connector-setup 2.24.2 unable to log in to exchange</a></p>
<p>If you are running into this problem, please let it be known on the bug page!</p>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2008/12/12/oops-i-spoke-too-soon-exchange-plugin-2242-still-broken-for-evolution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 8.10, a tethered Windows Mobile 6 cell phone via USB, Firefox and Pidgin Messenger</title>
		<link>http://froebe.net/blog/2008/12/10/ubuntu-810-a-tethered-windows-mobile-6-cell-phone-via-usb-firefox-and-pidgin-messenger/</link>
		<comments>http://froebe.net/blog/2008/12/10/ubuntu-810-a-tethered-windows-mobile-6-cell-phone-via-usb-firefox-and-pidgin-messenger/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 19:22:17 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[internet connection sharing]]></category>
		<category><![CDATA[internet sharing]]></category>
		<category><![CDATA[intrepid]]></category>
		<category><![CDATA[networkmanager]]></category>
		<category><![CDATA[pidgin]]></category>
		<category><![CDATA[rndis0]]></category>
		<category><![CDATA[synce]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntu 8.10]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[windows mobile 6]]></category>
		<category><![CDATA[wm6]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=770</guid>
		<description><![CDATA[To tether a Windows Mobile 6 cell phone (make sure you have a data plan that allows tethering), you will need to install a few things: sudo aptitude install subversion build-essential linux-headers-`uname -r` Once those are installed, we need to download and build the latest usb-rndis-lite code: svn co http://synce.svn.sourceforge.net/svnroot/synce/trunk/usb-rndis-lite cd usb-rndis-lite/ make ## &#160;remove [...]]]></description>
			<content:encoded><![CDATA[<p>To tether a Windows Mobile 6 cell phone (make sure you have a data plan that allows tethering), you will need to install a few things:</p>
<div class="bash dean_ch"><span class="kw2">sudo</span> <span class="kw2">aptitude</span> <span class="kw2">install</span> subversion build-essential linux-headers-<span class="sy0">`</span><span class="kw2">uname</span> -r<span class="sy0">`</span></div>
<p>Once those are installed, we need to download and build the latest usb-rndis-lite code:</p>
<div class="bash dean_ch"><span class="kw2">svn</span> <span class="kw2">co</span> http:<span class="sy0">//</span>synce.svn.sourceforge.net<span class="sy0">/</span>svnroot<span class="sy0">/</span>synce<span class="sy0">/</span>trunk<span class="sy0">/</span>usb-rndis-lite<br />
<span class="kw3">cd</span> usb-rndis-lite<span class="sy0">/</span><br />
<span class="kw2">make</span><br />
<span class="co0">## &nbsp;remove the existing usb-rndis drivers with clean.sh</span><br />
<span class="kw2">sudo</span> .<span class="sy0">/</span>clean.sh<br />
<span class="kw2">sudo</span> <span class="kw2">make</span> <span class="kw2">install</span></div>
<p>Before you plug in the cell phone, you will need to blacklist the rndis_wlan kernel module:</p>
<div class="bash dean_ch"><span class="kw2">sudo</span> <span class="kw3">echo</span> <span class="st0">&quot;blacklist rndis_wlan&quot;</span> <span class="sy0">&gt;&gt;</span> <span class="sy0">/</span>etc<span class="sy0">/</span>modprobe.d<span class="sy0">/</span>blacklist<br />
<span class="kw2">sudo</span> rmmod rndis_wlan</div>
<p>Plug in your cell phone.  If you type &#8220;dmesg&#8221;, you will see something like the following:</p>
<div class="bash dean_ch"><span class="br0">&#91;</span> &nbsp;<span class="nu0">152.312099</span><span class="br0">&#93;</span> usb <span class="nu0">4</span>-<span class="nu0">1</span>: new full speed USB device using uhci_hcd and address <span class="nu0">3</span><br />
<span class="br0">&#91;</span> &nbsp;<span class="nu0">152.500604</span><span class="br0">&#93;</span> usb <span class="nu0">4</span>-<span class="nu0">1</span>: configuration <span class="co0">#1 chosen from 1 choice</span><br />
<span class="br0">&#91;</span> &nbsp;<span class="nu0">154.138352</span><span class="br0">&#93;</span> rndis0: register <span class="st_h">&#8216;rndis_host&#8217;</span> at usb-0000:00:1d.3-<span class="nu0">1</span>, RNDIS device <span class="br0">&#40;</span>SynCE patched<span class="br0">&#41;</span>, <span class="nu0">80</span>:00:<span class="nu0">60</span>:0f:e8:00<br />
<span class="br0">&#91;</span> &nbsp;<span class="nu0">164.441074</span><span class="br0">&#93;</span> rndis0: no IPv6 routers present</div>
<p>This is showing that the phone was found.  Let&#8217;s take a look at the list of interfaces using ifconfig:</p>
<div class="bash dean_ch">&#8230;.<br />
rndis0 &nbsp; &nbsp;Link encap:Ethernet &nbsp;HWaddr <span class="nu0">80</span>:00:<span class="nu0">60</span>:0f:e8:00 &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; inet addr:169.254.2.2 &nbsp;Bcast:169.254.2.255 &nbsp;Mask:255.255.255.0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; inet6 addr: fe80::<span class="nu0">8200</span>:60ff:fe0f:e800<span class="sy0">/</span><span class="nu0">64</span> Scope:Link<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UP BROADCAST RUNNING MULTICAST &nbsp;MTU:<span class="nu0">8050</span> &nbsp;Metric:<span class="nu0">1</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RX packets:<span class="nu0">29</span> errors:<span class="nu0">46</span> dropped:<span class="nu0">0</span> overruns:<span class="nu0">0</span> frame:<span class="nu0">23</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TX packets:<span class="nu0">51</span> errors:<span class="nu0">0</span> dropped:<span class="nu0">0</span> overruns:<span class="nu0">0</span> carrier:<span class="nu0">0</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; collisions:<span class="nu0">0</span> txqueuelen:<span class="nu0">1000</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RX bytes:<span class="nu0">2097</span> <span class="br0">&#40;</span><span class="nu0">2.0</span> KB<span class="br0">&#41;</span> &nbsp;TX bytes:<span class="nu0">9146</span> <span class="br0">&#40;</span><span class="nu0">9.1</span> KB<span class="br0">&#41;</span></div>
<p>On the phone, turn on Internet Connection Sharing and connect via USB.  Wait a few seconds (obtaining an ip address can take up to a minute or so) then issue the ifconfig command again:</p>
<div class="bash dean_ch">&#8230;.<br />
rndis0 &nbsp; &nbsp;Link encap:Ethernet &nbsp;HWaddr <span class="nu0">80</span>:00:<span class="nu0">60</span>:0f:e8:00 &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; inet addr:192.168.0.102 &nbsp;Bcast:192.168.0.255 &nbsp;Mask:255.255.255.0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; inet6 addr: fe80::<span class="nu0">8200</span>:60ff:fe0f:e800<span class="sy0">/</span><span class="nu0">64</span> Scope:Link<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UP BROADCAST RUNNING MULTICAST &nbsp;MTU:<span class="nu0">8050</span> &nbsp;Metric:<span class="nu0">1</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RX packets:<span class="nu0">8113</span> errors:<span class="nu0">13535</span> dropped:<span class="nu0">0</span> overruns:<span class="nu0">0</span> frame:<span class="nu0">6766</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TX packets:<span class="nu0">8643</span> errors:<span class="nu0">0</span> dropped:<span class="nu0">0</span> overruns:<span class="nu0">0</span> carrier:<span class="nu0">0</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; collisions:<span class="nu0">0</span> txqueuelen:<span class="nu0">1000</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RX bytes:<span class="nu0">6063101</span> <span class="br0">&#40;</span><span class="nu0">6.0</span> MB<span class="br0">&#41;</span> &nbsp;TX bytes:<span class="nu0">1890604</span> <span class="br0">&#40;</span><span class="nu0">1.8</span> MB<span class="br0">&#41;</span></div>
<p>Yay!  We are connected.</p>
<p>In order to use Firefox, Pidgin or any other software that uses Network Manager, you need to stop the Network Manager daemon:</p>
<div class="bash dean_ch"><span class="kw2">sudo</span> <span class="sy0">/</span>etc<span class="sy0">/</span>init.d<span class="sy0">/</span>NetworkManager stop</div>
<p>You will be able to use your applications again <img src='http://froebe.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2008/12/10/ubuntu-810-a-tethered-windows-mobile-6-cell-phone-via-usb-firefox-and-pidgin-messenger/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Woohoo!  Looks like Evolution will be able to connect to Microsoft Exchange again!</title>
		<link>http://froebe.net/blog/2008/11/05/woohoo-looks-like-evolution-will-be-able-to-connect-to-microsoft-exchange-again/</link>
		<comments>http://froebe.net/blog/2008/11/05/woohoo-looks-like-evolution-will-be-able-to-connect-to-microsoft-exchange-again/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 16:30:01 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[connectivity]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[evolution]]></category>
		<category><![CDATA[exchange]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[owa]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=748</guid>
		<description><![CDATA[Pedro Villavicencio over at Ubuntu says: upstream said the bug is fixed with evolution 2.24, could you please comment on http://bugzilla.gnome.org/show_bug.cgi?id=375727 if you still get the issue or confirm that it&#8217;s fixed? thanks in advance. ** Changed in: evolution-exchange (Ubuntu) Status: Triaged =&#62; Incomplete &#8211; evolution-exchange: unable to setup exchange account: e2k_properties_get_prop: assertion `props != [...]]]></description>
			<content:encoded><![CDATA[<p><strong style="cursor: pointer;" title="View all messages from this sender">Pedro Villavicencio over at <a href="http://www.ubuntu.com">Ubuntu</a> says:</strong><a href="http://www.ubuntu.com"><img class="alignright size-medium wp-image-714" title="Ubuntu 8.10" src="http://froebe.net/blog/wp-content/uploads/2008/09/ubuntulogo.png" alt="" width="202" height="55" /></a></p>
<blockquote><p>upstream said the bug is fixed with evolution 2.24, could you please<br />
comment on http://bugzilla.gnome.org/show_bug.cgi?id=375727 if you still get the issue or confirm that it&#8217;s fixed? thanks in advance.</p>
<p>** Changed in: evolution-exchange (Ubuntu)<br />
Status: Triaged =&gt; Incomplete</p></blockquote>
<p>&#8211;<br />
<a href="https://bugs.launchpad.net/ubuntu/+source/evolution-exchange/+bug/25106">evolution-exchange: unable to setup exchange account: e2k_properties_get_prop: assertion `props != NULL&#8217; failed</a> https://bugs.launchpad.net/bugs/25106</p>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2008/11/05/woohoo-looks-like-evolution-will-be-able-to-connect-to-microsoft-exchange-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Oracle Instant Client and DBD::Oracle on Ubuntu Linux 8.04 Server JEOS</title>
		<link>http://froebe.net/blog/2008/10/22/installing-oracle-instant-client-and-dbdoracle-on-ubuntu-linux-804-server-jeos/</link>
		<comments>http://froebe.net/blog/2008/10/22/installing-oracle-instant-client-and-dbdoracle-on-ubuntu-linux-804-server-jeos/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 16:49:27 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[DBI]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[10g]]></category>
		<category><![CDATA[11g]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[dbd::oracle]]></category>
		<category><![CDATA[hardy heron]]></category>
		<category><![CDATA[instant client]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=729</guid>
		<description><![CDATA[Ever want to just install the minimal amount of Oracle client software for client applications on Linux? Well, Oracle has provided Oracle Instant Client to do this but they have neglected to make it intuitive to install. I&#8217;ve written a couple scripts that make it easy on Linux. I&#8217;ve tested this on Ubuntu Linux 8.04 [...]]]></description>
			<content:encoded><![CDATA[<p>Ever want to just install the minimal amount of Oracle client software for client applications on Linux?  Well, <a href="http://www.oracle.com">Oracle</a> has provided <a href="http://www.oracle.com/technology/tech/oci/instantclient/index.html">Oracle Instant Client</a> to do this but they have neglected to make it intuitive to install.  I&#8217;ve written a couple scripts that make it easy on Linux.  I&#8217;ve tested this on <a href="http://www.ubuntu.com/products/whatisubuntu/serveredition/jeos">Ubuntu Linux 8.04 Server JEOS</a>.</p>
<h3>Download the files you need</h3>
</p>
<p><strong>Download Oracle Instant Client</strong></p>
<p>Retrieve the <a href="http://www.oracle.com/technology/tech/oci/instantclient/index.html">Instant Client</a> packages and save them to a directory (e.g. &#8220;linux 32bit&#8221;).</p>
<ul>
<li>Instant Client Package &#8211; Basic</li>
<li>Instant Client Package &#8211; JDBC Supplement</li>
<li>Instant Client Package &#8211; SQL*Plus</li>
<li>Instant Client Package &#8211; SDK</li>
<li>Instant Client Package &#8211; ODBC</li>
</ul>
<p><strong>Download <a href="http://search.cpan.org/~pythian/DBD-Oracle/Oracle.pm">DBD::Oracle</a> and place it in the build-cfg directory</strong></p>
<p><strong>Copy your tnsnames.ora file into the build-cfg directory</strong></p>
<p><strong>Download build_oracle_instantclient.sh into the directory above build-cfg directory</strong></p>
<p><strong>Save root.sh  into the build-cfg directory</strong></p>
<h3>Build a tar ball containing everything we need in the directory format we need.</h3>
<div class="bash dean_ch">build_oracle_instantclient.sh <span class="st0">&quot;../linux 32bit&quot;</span></div>
<h3>Script1:  build_oracle_instantclient.sh</h3>
<div class="bash dean_ch"><span class="re2">SOURCE_DIR</span>=<span class="st0">&quot;$1&quot;</span><br />
<span class="re2">BUILD_DIR</span>=builddir<br />
<span class="re2">CFG_DIR</span>=build-cfg</p>
<p><span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-z</span> <span class="re4">$1</span> <span class="br0">&#93;</span><span class="br0">&#93;</span><br />
<span class="kw1">then</span><br />
&nbsp; <span class="kw3">echo</span> <span class="st0">&quot;Usage: build_oracle_instantclient.sh &lt;directory containing oracle instant client zip files&gt;&quot;</span><br />
&nbsp; <span class="kw3">exit</span> <span class="nu0">1</span><br />
<span class="kw1">fi</span></p>
<p><span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="sy0">!</span> <span class="re5">-d</span> <span class="st0">&quot;<span class="es3">${SOURCE_DIR}</span>&quot;</span> <span class="br0">&#93;</span><span class="br0">&#93;</span><br />
<span class="kw1">then</span><br />
&nbsp; &nbsp;<span class="kw3">echo</span> <span class="st0">&quot;<span class="es3">${SOURCE_DIR}</span> is not a directory&quot;</span><br />
&nbsp; &nbsp;<span class="kw3">exit</span> <span class="nu0">1</span><br />
<span class="kw1">fi</span></p>
<p><span class="kw2">find</span> <span class="st0">&quot;<span class="es3">${SOURCE_DIR}</span>&quot;</span> <span class="re5">-name</span> <span class="st0">&quot;*.zip&quot;</span> <span class="re5">-type</span> f <span class="re5">-exec</span> <span class="kw2">unzip</span> <span class="br0">&#123;</span><span class="br0">&#125;</span> \;</p>
<p><span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-d</span> instantclient_11_1 <span class="br0">&#93;</span><span class="br0">&#93;</span><br />
<span class="kw1">then</span><br />
&nbsp; <span class="re2">TMP_DIR</span>=instantclient_11_1<br />
<span class="kw1">elif</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-d</span> instantclient_10_2 <span class="br0">&#93;</span><span class="br0">&#93;</span><br />
<span class="kw1">then</span><br />
&nbsp; <span class="re2">TMP_DIR</span>=instantclient_10_2<br />
<span class="kw1">else</span><br />
&nbsp; <span class="kw3">echo</span> <span class="st0">&quot;unable to determine extraction dir&quot;</span><br />
&nbsp; <span class="kw3">exit</span> <span class="nu0">1</span><br />
<span class="kw1">fi</span></p>
<p><span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-d</span> <span class="co1">${BUILD_DIR}</span> <span class="br0">&#93;</span><span class="br0">&#93;</span><br />
<span class="kw1">then</span><br />
&nbsp; <span class="kw2">rm</span> <span class="re5">-rf</span> <span class="co1">${BUILD_DIR}</span><br />
<span class="kw1">fi</span></p>
<p><span class="kw2">mkdir</span> <span class="re5">-p</span> <span class="co1">${BUILD_DIR}</span><br />
<span class="kw2">mkdir</span> <span class="re5">-p</span> <span class="co1">${BUILD_DIR}</span><span class="sy0">/</span>bin<br />
<span class="kw2">mkdir</span> <span class="re5">-p</span> <span class="co1">${BUILD_DIR}</span><span class="sy0">/</span>doc<br />
<span class="kw2">mkdir</span> <span class="re5">-p</span> <span class="co1">${BUILD_DIR}</span><span class="sy0">/</span>java<br />
<span class="kw2">mkdir</span> <span class="re5">-p</span> <span class="co1">${BUILD_DIR}</span><span class="sy0">/</span>lib</p>
<p><span class="kw2">cp</span> <span class="co1">${CFG_DIR}</span><span class="sy0">/*</span> <span class="co1">${BUILD_DIR}</span><br />
<span class="kw2">mv</span> <span class="co1">${TMP_DIR}</span><span class="sy0">/*</span>README<span class="sy0">*</span> <span class="co1">${BUILD_DIR}</span><span class="sy0">/</span>doc<br />
<span class="kw2">mv</span> <span class="co1">${TMP_DIR}</span><span class="sy0">/*</span>.html <span class="co1">${BUILD_DIR}</span><span class="sy0">/</span>doc<br />
<span class="kw2">mv</span> <span class="co1">${TMP_DIR}</span><span class="sy0">/*</span>.htm <span class="co1">${BUILD_DIR}</span><span class="sy0">/</span>doc<br />
<span class="kw2">mv</span> <span class="co1">${TMP_DIR}</span><span class="sy0">/</span>lib<span class="sy0">*</span> <span class="co1">${BUILD_DIR}</span><span class="sy0">/</span>lib<br />
<span class="kw2">mv</span> <span class="co1">${TMP_DIR}</span><span class="sy0">/*</span>.jar <span class="co1">${BUILD_DIR}</span><span class="sy0">/</span>java<br />
<span class="kw2">mv</span> <span class="co1">${TMP_DIR}</span><span class="sy0">/</span>sdk <span class="co1">${BUILD_DIR}</span><br />
<span class="kw2">mv</span> <span class="co1">${TMP_DIR}</span><span class="sy0">/*</span> <span class="co1">${BUILD_DIR}</span><span class="sy0">/</span>bin</p>
<p><span class="kw3">cd</span> <span class="co1">${BUILD_DIR}</span><span class="sy0">/</span>lib<br />
<span class="kw2">ln</span> <span class="re5">-s</span> libclntsh.so.<span class="sy0">*</span> libclntsh.so<br />
<span class="kw2">ln</span> <span class="re5">-s</span> libocci.so.<span class="sy0">*</span> libocci.so<br />
<span class="kw2">ln</span> <span class="re5">-s</span> libsqora.so.<span class="sy0">*</span> libsqora.so</p>
<p><span class="kw3">cd</span> ..<br />
<span class="re2">tarball</span>=<span class="sy0">`</span><span class="kw3">echo</span> <span class="co1">${SOURCE_DIR}</span> <span class="sy0">|</span> <span class="kw2">tr</span> <span class="st_h">&#8216; &#8216;</span> <span class="st_h">&#8216;-&#8217;</span><span class="sy0">`</span><br />
<span class="re2">tarball</span>=<span class="sy0">`</span><span class="kw2">basename</span> <span class="co1">${tarball}</span><span class="sy0">`</span><br />
<span class="re2">tarball</span>=Oracle-<span class="co1">${TMP_DIR}</span>-<span class="co1">${tarball}</span><br />
<span class="kw2">tar</span> cvf &#8211; <span class="sy0">*</span> <span class="sy0">|</span> <span class="kw2">gzip</span> <span class="re5">-9c</span> <span class="sy0">&gt;</span> <span class="st0">&quot;../<span class="es3">${tarball}</span>.tgz&quot;</span></p>
<p><span class="kw3">cd</span> ..<br />
<span class="kw2">rm</span> <span class="re5">-rf</span> <span class="co1">${BUILD_DIR}</span> <span class="co1">${TMP_DIR}</span><span class="sy0">&lt;/</span>directory<span class="sy0">&gt;</span></div>
<p>Once we have the tar ball, we can copy that file to any compatible Linux system, extract it and run the <i>root.sh</i> file which will copy the install to /usr/local/oracle/InstantClient, set up the system variables and build DBD::Oracle for you.</p>
<h3>Script2:  root.sh</h3>
<div class="bash dean_ch"><span class="co0">#!/bin/bash</span></p>
<p><span class="co0">############################################</span><br />
<span class="kw1">function</span> copy_instantclient <span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="sy0">`</span><span class="kw3">pwd</span><span class="sy0">`</span> <span class="sy0">!</span>= <span class="st0">&quot;/usr/local/oracle/InstantClient&quot;</span> <span class="br0">&#93;</span><span class="br0">&#93;</span><br />
&nbsp; <span class="kw1">then</span><br />
&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="sy0">!</span> <span class="re5">-d</span> <span class="sy0">/</span>usr<span class="sy0">/</span>local<span class="sy0">/</span>oracle<span class="sy0">/</span>InstantClient <span class="br0">&#93;</span><span class="br0">&#93;</span><br />
&nbsp; &nbsp; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw3">echo</span> <span class="st0">&quot;Creating /usr/local/oracle/InstantClient directory&quot;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw2">mkdir</span> <span class="re5">-p</span> <span class="sy0">/</span>usr<span class="sy0">/</span>local<span class="sy0">/</span>oracle<span class="sy0">/</span>InstantClient<br />
&nbsp; &nbsp; <span class="kw1">fi</span></p>
<p>&nbsp; &nbsp; <span class="kw3">echo</span> <span class="st0">&quot;Copying Oracle Instant Client to /usr/local/oracle/InstantClient&quot;</span> <br />
&nbsp; &nbsp; <span class="kw2">cp</span> <span class="re5">-Ra</span> <span class="sy0">*</span> <span class="sy0">/</span>usr<span class="sy0">/</span>local<span class="sy0">/</span>oracle<span class="sy0">/</span>InstantClient<br />
&nbsp; <span class="kw1">fi</span><br />
<span class="br0">&#125;</span></p>
<p><span class="co0">#&#8212;&#8212;&#8212;</span><br />
<span class="kw1">function</span> update_etc_profile <span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-f</span> <span class="sy0">/</span>etc<span class="sy0">/</span>profile <span class="br0">&#93;</span><span class="br0">&#93;</span><br />
&nbsp; <span class="kw1">then</span><br />
&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="sy0">`</span><span class="kw2">grep</span> <span class="re5">-c</span> <span class="st0">&quot;ORACLE_HOME&quot;</span> <span class="sy0">/</span>etc<span class="sy0">/</span>profile<span class="sy0">`</span> = <span class="nu0">0</span> <span class="br0">&#93;</span><span class="br0">&#93;</span><br />
&nbsp; &nbsp; <span class="kw1">then</span> <br />
&nbsp; &nbsp; &nbsp; <span class="kw3">echo</span> <span class="st0">&quot;Updating /etc/profile&quot;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw2">cat</span> <span class="sy0">&gt;&gt;</span> <span class="sy0">/</span>etc<span class="sy0">/</span>profile <span class="sy0">&lt;</span> <span class="sy0">&lt;</span> EOF<br />
&nbsp; <span class="kw3">export</span> <span class="re2">ORACLE_HOME</span>=<span class="sy0">/</span>usr<span class="sy0">/</span>local<span class="sy0">/</span>oracle<span class="sy0">/</span>InstantClient<br />
&nbsp; <span class="kw3">export</span> <span class="re2">TNS_ADMIN</span>=\<span class="co1">${ORACLE_HOME}</span><br />
&nbsp; <span class="kw3">export</span> <span class="re2">PATH</span>=\<span class="co1">${ORACLE_HOME}</span><span class="sy0">/</span>bin:\<span class="co1">${PATH}</span><br />
&nbsp; <span class="kw3">export</span> <span class="re2">CLASSPATH</span>=\<span class="co1">${ORACLE_HOME}</span><span class="sy0">/</span>classes:\<span class="co1">${CLASSPATH}</span><br />
&nbsp; <span class="kw3">export</span> <span class="re2">LD_LIBRARY_PATH</span>=\<span class="co1">${ORACLE_HOME}</span><span class="sy0">/</span>lib:\<span class="co1">${LD_LIBRARY_PATH}</span><br />
&nbsp; <span class="kw3">export</span> <span class="re2">SQLPATH</span>=\<span class="co1">${ORACLE_HOME}</span><span class="sy0">/</span>bin<br />
EOF<br />
&nbsp; &nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw3">echo</span> <span class="st0">&quot;Updates to /etc/profile already applied&quot;</span><br />
&nbsp; &nbsp; <span class="kw1">fi</span><br />
&nbsp; <span class="kw1">fi</span><br />
<span class="br0">&#125;</span></p>
<p><span class="co0">#&#8212;&#8212;&#8212;</span><br />
<span class="kw1">function</span> update_library_cache <span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-d</span> <span class="sy0">/</span>etc<span class="sy0">/</span>ld.so.conf.d <span class="br0">&#93;</span><span class="br0">&#93;</span><br />
&nbsp; <span class="kw1">then</span><br />
&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-f</span> <span class="sy0">/</span>etc<span class="sy0">/</span>ld.so.conf.d<span class="sy0">/</span>oracle_instant_client.conf <br />
&nbsp; &nbsp; &nbsp; &nbsp;<span class="sy0">&amp;&amp;</span> &nbsp;<span class="sy0">`</span><span class="kw2">grep</span> <span class="re5">-c</span> <span class="st0">&quot;/usr/local/oracle/InstantClient&quot;</span> <span class="sy0">/</span>etc<span class="sy0">/</span>ld.so.conf.d<span class="sy0">/</span>oracle_instant_client.conf<span class="sy0">`</span> <span class="sy0">!</span>= <span class="nu0">0</span> <span class="br0">&#93;</span><span class="br0">&#93;</span><br />
&nbsp; &nbsp; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span class="kw3">echo</span> <span class="st0">&quot;Updates to /etc/ld.so.conf.d/oracle_instant_client.conf already applied&quot;</span><br />
&nbsp; &nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw3">echo</span> <span class="st0">&quot;Updating /etc/ld.so.conf.d/oracle_instant_client.conf&quot;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw3">echo</span> <span class="st0">&quot;/usr/local/oracle/InstantClient&quot;</span> <span class="sy0">&gt;</span> <span class="sy0">/</span>etc<span class="sy0">/</span>ld.so.conf.d<span class="sy0">/</span>oracle_instant_client.conf<br />
&nbsp; &nbsp; &nbsp; <span class="sy0">/</span>sbin<span class="sy0">/</span>ldconfig<br />
&nbsp; &nbsp; <span class="kw1">fi</span><br />
&nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="sy0">`</span><span class="kw2">grep</span> <span class="re5">-c</span> <span class="st0">&quot;/usr/local/oracle/InstantClient&quot;</span> <span class="sy0">/</span>etc<span class="sy0">/</span>ld.so.conf<span class="sy0">`</span> == <span class="nu0">0</span> <span class="br0">&#93;</span><span class="br0">&#93;</span><br />
&nbsp; &nbsp; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw3">echo</span> <span class="st0">&quot;Updating /etc/ld.so.conf&quot;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw3">echo</span> <span class="st0">&quot;/usr/local/oracle/InstantClient&quot;</span> <span class="sy0">&gt;</span> <span class="sy0">/</span>etc<span class="sy0">/</span>ld.so.conf<br />
&nbsp; &nbsp; &nbsp; <span class="sy0">/</span>sbin<span class="sy0">/</span>ldconfig<br />
&nbsp; &nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw3">echo</span> <span class="st0">&quot;Updates to /etc/ld.so.conf already applied&quot;</span><br />
&nbsp; &nbsp; <span class="kw1">fi</span> <br />
&nbsp; <span class="kw1">fi</span></p>
<p><span class="br0">&#125;</span></p>
<p><span class="co0">#&#8212;&#8212;&#8212;</span><br />
<span class="kw1">function</span> print_env <span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; <span class="kw3">echo</span> <span class="st0">&quot;Add the following to the rc.d script for any daemon processes that need to access Oracle. &nbsp;For example, apache&quot;</span><br />
&nbsp; <span class="kw3">echo</span> <span class="st_h">&#8216; &nbsp;export ORACLE_HOME=/usr/local/oracle/InstantClient<br />
&nbsp; export TNS_ADMIN=${ORACLE_HOME}<br />
&nbsp; export PATH=${ORACLE_HOME}/bin:${PATH}<br />
&nbsp; export CLASSPATH=${ORACLE_HOME}/classes:${CLASSPATH}<br />
&nbsp; export LD_LIBRARY_PATH=${ORACLE_HOME}/lib:${LD_LIBRARY_PATH}<br />
&nbsp; export SQLPATH=${ORACLE_HOME}/bin&#8217;</span><br />
<span class="br0">&#125;</span></p>
<p><span class="co0">#&#8212;&#8212;&#8212;</span><br />
<span class="kw1">function</span> install_DBD-Oracle <span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; <span class="kw3">echo</span> <span class="st0">&quot;Building DBD::Oracle&quot;</span><br />
&nbsp; <span class="re2">DBDORA</span>=<span class="sy0">`</span><span class="kw2">ls</span> DBD-Oracle-<span class="sy0">*`</span></p>
<p>&nbsp; <span class="kw1">if</span> <span class="br0">&#91;</span><span class="br0">&#91;</span> <span class="re5">-f</span> <span class="co1">${DBDORA}</span> <span class="br0">&#93;</span><span class="br0">&#93;</span><br />
&nbsp; <span class="kw1">then</span><br />
&nbsp; &nbsp; <span class="kw2">tar</span> zxf <span class="co1">${DBDORA}</span> <br />
&nbsp; &nbsp; <span class="kw3">cd</span> DBD-Oracle<span class="sy0">*</span> <br />
&nbsp; &nbsp; <span class="re2">TMP_DBDORA</span>=<span class="sy0">`</span><span class="kw3">pwd</span><span class="sy0">`</span><br />
&nbsp; &nbsp; <span class="re2">TMP_DBDORA</span>=<span class="sy0">`</span><span class="kw2">basename</span> <span class="co1">${TMP_DBDORA}</span><span class="sy0">`</span><br />
&nbsp; &nbsp; <span class="kw2">perl</span> Makefile.PL <span class="re5">-m</span> <span class="re1">$ORACLE_HOME</span><span class="sy0">/</span>sdk<span class="sy0">/</span>demo<span class="sy0">/</span>demo.mk<br />
&nbsp; &nbsp; <span class="kw2">make</span> <span class="sy0">&amp;&amp;</span> <span class="kw2">make</span> <span class="kw2">install</span><br />
&nbsp; &nbsp; <span class="kw3">cd</span> ..<br />
&nbsp; &nbsp; <span class="kw2">rm</span> <span class="re5">-rf</span> <span class="co1">${TMP_DBDORA}</span><br />
&nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; <span class="kw3">echo</span> <span class="st0">&quot;Unable to find DBD-Oracle file&quot;</span><br />
&nbsp; <span class="kw1">fi</span><br />
<span class="br0">&#125;</span></p>
<p><span class="co0">############################################</span></p>
<p><span class="kw3">export</span> <span class="re2">ORACLE_HOME</span>=<span class="sy0">/</span>usr<span class="sy0">/</span>local<span class="sy0">/</span>oracle<span class="sy0">/</span>InstantClient<br />
<span class="kw3">export</span> <span class="re2">TNS_ADMIN</span>=<span class="co1">${ORACLE_HOME}</span><br />
<span class="kw3">export</span> <span class="re2">PATH</span>=<span class="co1">${ORACLE_HOME}</span><span class="sy0">/</span>bin:<span class="co1">${PATH}</span><br />
<span class="kw3">export</span> <span class="re2">CLASSPATH</span>=<span class="co1">${ORACLE_HOME}</span><span class="sy0">/</span>classes:<span class="co1">${CLASSPATH}</span><br />
<span class="kw3">export</span> <span class="re2">LD_LIBRARY_PATH</span>=<span class="co1">${ORACLE_HOME}</span><span class="sy0">/</span>lib:<span class="co1">${LD_LIBRARY_PATH}</span><br />
<span class="kw3">export</span> <span class="re2">SQLPATH</span>=<span class="co1">${ORACLE_HOME}</span><span class="sy0">/</span>bin</p>
<p>copy_instantclient<br />
update_etc_profile<br />
update_library_cache<br />
print_env<br />
install_DBD-Oracle</div>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2008/10/22/installing-oracle-instant-client-and-dbdoracle-on-ubuntu-linux-804-server-jeos/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

