<?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>Chris Jean&#039;s Blog &#187; Linux</title>
	<atom:link href="http://gaarai.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://gaarai.com</link>
	<description>Linux, WordPress, programming, anime, and other stuff</description>
	<lastBuildDate>Fri, 29 Jan 2010 18:21:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Upgrade to Firefox 3.6 on Ubuntu 9.10</title>
		<link>http://gaarai.com/2010/01/21/upgrade-to-firefox-3-6-on-ubuntu-9-10/</link>
		<comments>http://gaarai.com/2010/01/21/upgrade-to-firefox-3-6-on-ubuntu-9-10/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 18:00:11 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Upgrade]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1743</guid>
		<description><![CDATA[
One of my all-time most popular posts was how to upgrade to Firefox 3.5 in Ubuntu 9.04. Now it&#8217;s Firefox 3.6&#8217;s turn to be installed on my system that is now running Ubuntu 9.10.
The team working on Firefox have put a ton of effort into this release and, in order to make our browsing lives [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>One of my all-time most popular posts was how to <a href="http://gaarai.com/2009/07/01/upgrade-to-firefox-3-5-on-ubuntu-9-04-jaunty-jackalope/" target="_blank">upgrade to Firefox 3.5</a> in Ubuntu 9.04. Now it&#8217;s Firefox 3.6&#8217;s turn to be installed on my system that is now running Ubuntu 9.10.</p>
<p>The team working on Firefox have put a ton of effort into this release and, in order to make our browsing lives safer and faster, rolled a number of features scheduled for 3.7 into this release. Thanks for all the hard work guys.</p>
<p>Read the <a href="http://hacks.mozilla.org/2010/01/firefox-3-6-is-here/" target="_blank">3.6 release announcement</a> for details about what is new with this release.</p>
<p>So now onto the installation. Here are the commands that I ran in terminal to install 3.6.</p>
<pre class="terminal"><span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">~</span>]$</span> <span style="color:#FFF;">cd /tmp/</span>
<span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">/tmp</span>]$</span> <span style="color:#FFF;">wget "http://download.mozilla.org/?product=firefox-3.6&amp;os=linux〈=en-US"</span>
--2010-01-21 11:41:08--  http://download.mozilla.org/?product=firefox-3.6&amp;os=linux〈=en-US
Resolving download.mozilla.org... 63.245.209.58
Connecting to download.mozilla.org|63.245.209.58|:80... connected.
...

100%[=============================&gt;] 10,161,471   924K/s   in 11s     

2010-01-21 11:41:20 (899 KB/s) - `firefox-3.6.tar.bz2' saved [10161471/10161471]

<span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">/tmp</span>]$</span> <span style="color:#FFF;">tar xvjf firefox-*.bz2</span>
tar: Record size = 8 blocks
firefox/
firefox/update.locale
firefox/plugins/
firefox/plugins/libnullplugin.so
...
firefox/defaults/autoconfig/platform.js
firefox/defaults/autoconfig/prefcalls.js
firefox/libmozjs.so
<span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">/tmp</span>]$</span> <span style="color:#FFF;">sudo cp -r firefox /usr/lib/firefox-3.6</span>
[sudo] password for chris:
<span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">/tmp</span>]$</span> <span style="color:#FFF;">sudo mv /usr/bin/firefox /usr/bin/firefox.old</span>
<span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">/tmp</span>]$</span> <span style="color:#FFF;">sudo ln -s /usr/lib/firefox-3.6/firefox /usr/bin/firefox-3.6</span>
<span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">/tmp</span>]$</span> <span style="color:#FFF;">sudo ln -s /usr/bin/firefox-3.6 /usr/bin/firefox</span></pre>
<p>Simply run each command listed in white in your terminal to upgrade your system with the latest release version of Firefox.</p>
<p>After running these commands, close out Firefox, wait a few seconds to let everything shut down properly, and run Firefox again. If all the steps were executed properly and without error, you should be running 3.6. You can click Help &gt; About Mozilla Firefox to confirm.</p>
<p>Happy browsing.</p>
]]></content:encoded>
			<wfw:commentRss>http://gaarai.com/2010/01/21/upgrade-to-firefox-3-6-on-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Move Gnome Panels to a Different Monitor in Ubuntu</title>
		<link>http://gaarai.com/2009/11/03/move-gnome-panels-to-a-different-monitor-in-ubuntu/</link>
		<comments>http://gaarai.com/2009/11/03/move-gnome-panels-to-a-different-monitor-in-ubuntu/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 17:37:05 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[Dual Monitors]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Panels]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1709</guid>
		<description><![CDATA[
My dual monitor setup didn&#8217;t work properly in Ubuntu 9.04, Jaunty Jackalope. Fortunately, it does work properly in 9.10, Karmic Kaola. However, this newfound dual monitor setup has given me a new problem: how do I move my panels to the secondary monitor?
My office machine is a laptop. When I get in the office, I [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>My dual monitor setup didn&#8217;t work properly in Ubuntu 9.04, Jaunty Jackalope. Fortunately, it does work properly in 9.10, Karmic Kaola. However, this newfound dual monitor setup has given me a new problem: how do I move my panels to the secondary monitor?</p>
<p>My office machine is a laptop. When I get in the office, I hook it up to a 24&#8243; LCD. I&#8217;d like to use this external monitor as the primary, which means that I definitely want to have my panels display on it. However, as much as I tried to drag the panels around or play around with settings, there just didn&#8217;t seem to be a way to get them over there. However, I just figured it out.</p>
<p>By default, panels are set to expand. This means that the panels will span the entire width or height of the section of the window they occupy. If the expand option is disabled, they turn into self-sizing bar that can be dragged to different edges or centered.</p>
<p>Having the expand option disabled also allows you to grab and edge of the panel and drag it to another screen. Once on the screen you want it on, simply re-enable the expand option and you now have the panel on another screen.</p>
<p>Here&#8217;s a step-by-step way of moving a panel to another screen:</p>
<ol>
<li>Right-click the panel you wish to move and select &#8220;Properties&#8221;.</li>
<li>Uncheck the &#8220;Expand&#8221; option under the &#8220;General&#8221; tab.</li>
<li>Grab one of the edges of the panel by clicking on the left or right end (top or bottom end for vertical panels).</li>
<li>Drag the bar to the desired screen and position.</li>
<li>Check the &#8220;Expand&#8221; option in the &#8220;Panel Properties&#8221; window and click &#8220;Close&#8221;.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://gaarai.com/2009/11/03/move-gnome-panels-to-a-different-monitor-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Use PHP Pear with Ubuntu</title>
		<link>http://gaarai.com/2009/11/02/use-php-pear-with-ubuntu/</link>
		<comments>http://gaarai.com/2009/11/02/use-php-pear-with-ubuntu/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 21:16:48 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[Karmic Kaola]]></category>
		<category><![CDATA[PEAR]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1700</guid>
		<description><![CDATA[
PEAR is PHP&#8217;s equivalent of Perl&#8217;s CPAN. It offers hundreds of ready-to-use code modules that can make projects go much more quickly than having to hand code everything. However, it never seems like PEAR is easy to get running.
Installing the Needed Software
In Ubuntu, installing the following packages will quickly get you started with PEAR: php5-cli, [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p><a href="http://pear.php.net/" target="_blank">PEAR</a> is PHP&#8217;s equivalent of <a href="http://cpan.org/" target="_blank">Perl&#8217;s CPAN</a>. It offers hundreds of ready-to-use code modules that can make projects go much more quickly than having to hand code everything. However, it never seems like PEAR is easy to get running.</p>
<h3>Installing the Needed Software</h3>
<p>In Ubuntu, installing the following packages will quickly get you started with PEAR: php5-cli, php5-dev, and php-pear.</p>
<p>Make sure that you read the next section about problems with using PEAR to install PEAR packages if you are running 9.10, Karmic Kaola.</p>
<p>Here&#8217;s an example of how to quickly install those packages from the terminal.</p>
<pre class="terminal"><span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">~</span>]$</span> <span style="color:#FFF;">sudo apt-get install php5-cli php5-dev php-pear</span>
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
autoconf autoconf2.13 automake automake1.4 autotools-dev libltdl-dev libssl-dev libtool m4 php5-common shtool zlib1g-dev
Suggested packages:
autobook autoconf-archive gnu-standards autoconf-doc gettext libtool-doc automaken gfortran fortran95-compiler gcj php5-suhosin
The following NEW packages will be installed:
autoconf autoconf2.13 automake automake1.4 autotools-dev libltdl-dev libssl-dev libtool m4 php-pear php5-cli php5-common php5-dev shtool zlib1g-dev
0 upgraded, 15 newly installed, 0 to remove and 5 not upgraded.
Need to get 0B/8,690kB of archives.
After this operation, 27.7MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Selecting previously deselected package m4.
(Reading database ... 127272 files and directories currently installed.)
Unpacking m4 (from .../archives/m4_1.4.13-2_i386.deb) ...
...</pre>
<p>With these packages, you are ready to roll with PHP and PEAR in Ubuntu.</p>
<h3>Problem with Ubuntu 9.10 Karmic Kaola</h3>
<p>A great thing about PEAR is that you can quickly install packages with a simple command. For example, &#8220;sudo pear install PHP_Parser-0.2.1&#8243; will install the <a href="http://pear.php.net/package/PHP_Parser/" target="_blank">PHP_Parser</a> package. However, this doesn&#8217;t work properly in Ubuntu 9.10, Karmic Kaola.</p>
<p>Output of the standard PEAR install command can be seen below:</p>
<pre class="terminal"><span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">~</span>]$</span> <span style="color:#FFF;">sudo pear install PHP_Parser-0.2.1</span>
downloading PHP_Parser-0.2.1.tgz ...
Starting to download PHP_Parser-0.2.1.tgz (70,782 bytes)
.................done: 70,782 bytes</pre>
<p>While this doesn&#8217;t look wrong, it has actually failed. Rather than installing the package, it has simply downloaded the archive, encountered an unchecked error, and crashed. A successful installation has a message saying that the installation is successful.</p>
<p>This problem can be easily fixed by giving the install command the &#8220;-Z&#8221; option. For example:</p>
<pre class="terminal"><span style="color:#8FED99;">[<span style="color:#BBFF33;">chris@rommie</span> <span style="color:#729FCF;">~</span>]$</span> <span style="color:#FFF;">sudo pear install -Z PHP_Parser-0.2.1</span>
downloading PHP_Parser-0.2.1.tar ...
Starting to download PHP_Parser-0.2.1.tar (Unknown size)
.............................................................................done: 533,504 bytes
install ok: channel://pear.php.net/PHP_Parser-0.2.1</pre>
<p>Notice the &#8220;install ok: &#8230;&#8221; portion of the message. That&#8217;s what you should see at the end of a successful installation.</p>
<p>For more details on this bug, please check out <a href="https://bugs.launchpad.net/ubuntu/+source/php5/+bug/451314" target="_blank">Bug #451314</a> on the Ubuntu bug tracker.</p>
]]></content:encoded>
			<wfw:commentRss>http://gaarai.com/2009/11/02/use-php-pear-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix Volume not Working in Ubuntu 9.10 Karmic Kaola</title>
		<link>http://gaarai.com/2009/11/02/fix-volume-not-working-in-ubuntu-9-10-karmic-kaola/</link>
		<comments>http://gaarai.com/2009/11/02/fix-volume-not-working-in-ubuntu-9-10-karmic-kaola/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 15:17:37 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[Karmic Kaola]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1691</guid>
		<description><![CDATA[
I just encountered an odd issue with Ubuntu 9.10, Karmic Kaola. I had music playing in the background, I adjusted the volume, and I noticed that there wasn&#8217;t any change in the volume level. Even maxing out the volume and muting it had no effect.
After wondering if the problem was that I went insane, I [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>I just encountered an odd issue with Ubuntu 9.10, Karmic Kaola. I had music playing in the background, I adjusted the volume, and I noticed that there wasn&#8217;t any change in the volume level. Even maxing out the volume and muting it had no effect.</p>
<p>After wondering if the problem was that I went insane, I looked in Sound Preferences (right-click the volume icon and select Sound Preferences) and found that &#8220;RV635 Audio device [Radeon HD 3600 Series] Digital Stereo (HDMI)&#8221;  was selected under the device output. This means that Ubuntu was trying to send audio over my HDMI connection rather than through my headphone jacks.</p>
<p>This wasn&#8217;t a problem last night, so it might be due to the fact that my external monitor at the office runs over the HDMI connection, so it automatically switched to the HDMI audio output. In one way, this is nice, in another way, it will frustrate me to no end if it does this every time I&#8217;m at the office. If I&#8217;m right that it automatically switched upon detecting an active HDMI connection, then wouldn&#8217;t it be better to make it easier to provide a notification on where to switch the audio output rather than just switching it and causing confusion?</p>
<p><img class="alignnone size-full wp-image-1693" title="HDMI selected in sound output in Ubuntu Karmic Kaola" src="http://gaarai.com/wp-content/uploads/2009/11/screenshot_017.png" alt="HDMI selected in sound output in Ubuntu Karmic Kaola" width="544" height="525" /></p>
<p>Switching the option to &#8220;Internal Audio Analog Stereo&#8221; instantly fixed the problem.</p>
<p>Oddly enough, when I manually selected the HDMI output again, it muted the analog output. So, it seems that it may not be a complete switchover or possibly just a bug. I&#8217;ll continue to see how the situation plays out and make a Ubuntu bug report if necessary.</p>
]]></content:encoded>
			<wfw:commentRss>http://gaarai.com/2009/11/02/fix-volume-not-working-in-ubuntu-9-10-karmic-kaola/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Rough Launch for Ubuntu One on Ubuntu 9.10 &#8211; Karmic Kaola</title>
		<link>http://gaarai.com/2009/10/31/a-rough-launch-for-ubuntu-one/</link>
		<comments>http://gaarai.com/2009/10/31/a-rough-launch-for-ubuntu-one/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 15:33:55 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Random Ramblings]]></category>
		<category><![CDATA[Karmic Kaola]]></category>
		<category><![CDATA[Launch]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu One]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1686</guid>
		<description><![CDATA[
Ubuntu 9.10, Karmic Kaola, launched earlier this week. One of the key new features in this  release is Ubuntu One. Unfortunately, from what I&#8217;ve seen, this new feature/product launch has been anything but smooth.
Ubuntu One is one of the new ways that Canonical, the creators of Ubuntu, is trying to generate some revenue based [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>Ubuntu 9.10, Karmic Kaola, launched earlier this week. One of the key new features in this  release is <a href="https://one.ubuntu.com/" target="_blank">Ubuntu One</a>. Unfortunately, from what I&#8217;ve seen, this new feature/product launch has been anything but smooth.</p>
<p>Ubuntu One is one of the new ways that <a href="http://www.canonical.com/" target="_blank">Canonical</a>, the creators of Ubuntu, is trying to generate some revenue based on their distro. Ubuntu One is a hosted file storage solution that allows users to keep a folder and all of its content synced between multiple computers. All users get 2GB of storage for free with the option of increasing the store to 50GB for $10/month.</p>
<p>Since this new offering has many Ubuntu users very excited, I thought I&#8217;d give it a try as soon as I installed the new release. However, I was instantly met with a very big message telling me that something was wrong.</p>

<h3>Launch Day: Problem 1</h3>
<p>When I first started Ubuntu One, the following notification appeared:</p>
<blockquote><p><strong>Capabilities Mismatch</strong><br />
There was a capabilities mismatch while attempting to connect to the Ubuntu One server. You may have installed a newer version of the client, for which the server does not yet provide support. A new version of the server should be accessible soon. Please be patient while we update.</p></blockquote>
<p>Ubuntu is supposed to be a Linux distro designed for the average computer user. Since this large message appears for a short period of time and it isn&#8217;t easily understood, I think that this message could very easily give users a very bad first experience. I believe it would be much more simple to simply say the following:</p>
<blockquote><p><strong>Server Connection Failed</strong><br />
Please ensure that you have installed all software updates and try again at a later time.</p></blockquote>
<p>The reason why I believe the software update portion should be included is because the problem wasn&#8217;t the server, it was the client. This morning my system told me some updates were available, and a few of these updates got rid of the &#8220;Capabilities Mismatch&#8221; problem and allowed the software to connect properly.</p>
<p>The packages that fixed this are the following:</p>
<ul>
<li>python-ubuntuone-client</li>
<li>ubuntuone-client</li>
<li>ubuntuone-client-gnome</li>
</ul>
<p>Each of these were updated to version 1.0.2-0ubuntu2. After the update, I closed the Ubuntu One software, restarted it, and the folder sync worked as expected. However, this is when another problem became clear.</p>
<h3>Houston, We Have a Problem&#8230; Again</h3>
<p>There are two parts to the Ubuntu One system. The first is the server/client connection that actively syncs the Ubuntu One folder between the computer and the Ubuntu One server. The second is an online system you can access through the browser. This online system allows you to manage folders and files from inside your browser.</p>
<p>When I first started to play with Ubuntu One, even though the folder sync didn&#8217;t function, the web access system did. Using this method allowed me to get a feel for what Canonical was aiming to offer its users. As soon as the server/client issue was fixed, I decided to play around with syncing files and then looking at them on the online system. This is when I found Ubuntu One&#8217;s second problem.</p>
<p>Disappointingly, as soon as Ubuntu One&#8217;s client started to work properly, their online system failed. So, is this out of the kettle and into the fire?</p>
<p>Again, this failed in a manner that is difficult to understand. You set up a Ubuntu One account by using a <a href="https://launchpad.net/" target="_blank">Launchpad</a> account. I went to <a href="http://one.ubuntu.com/" target="_blank">one.ubuntu.com</a>, the Ubuntu One  site, clicked &#8220;Sign In&#8221;, input my login details, and was redirected to the home page again with no feedback message. So, I clicked &#8220;Sign In&#8221; again, and I was once again redirected back to the homepage. Seems like some authentication issues were going on between the Ubuntu One and Launchpad systems.</p>
<p>As with the previous issue, my problem isn&#8217;t how the system failed &#8212; I&#8217;m a programmer, I know how things can go wrong &#8212; it&#8217;s with the fact that no feedback was given to the user. It simply didn&#8217;t work.</p>
<h3>Conclusion</h3>
<p>As I finish up this post, I see that Ubuntu One&#8217;s online system is functional again. However, as I&#8217;ve tested this throughout the day, it seems like it was down for at least a few hours. Overall, this is not a bad downtime, but it does tarnish the launch.</p>
<p>To be frank, I feel a bit bad being so harsh to software and services that I am getting access to for free; however, as per <a href="http://www.ubuntu.com/news/ubuntu-910" target="_blank">Canonical&#8217;s own press release</a>, they are extremely-focused on the user experience. As a user, I have to say that my experience with the new Ubuntu One service was less than good.</p>
<p>I know that <a href="http://en.wikipedia.org/wiki/Mark_Shuttleworth" target="_blank">Mark Shuttleworth</a>, founder of Canonical, believes that Ubuntu can take on <a href="http://www.microsoft.com/windows/" target="_blank">Microsoft&#8217;s Windows</a> head on. I also believe that Ubuntu has this potential; however, launch experiences like this aren&#8217;t going to win any new fans. One of the biggest disappointments that many people have with Microsoft is that many of their products, Windows included, feel like they were rushed out of development just to get a release.</p>
<p>Considering that Ubuntu One and Ubuntu are both Canonical creations, it looks really bad when Canonical can&#8217;t even get their own products to work together properly.</p>
]]></content:encoded>
			<wfw:commentRss>http://gaarai.com/2009/10/31/a-rough-launch-for-ubuntu-one/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>man Pages for C Development in Ubuntu</title>
		<link>http://gaarai.com/2009/09/26/man-pages-for-c-development-in-ubuntu/</link>
		<comments>http://gaarai.com/2009/09/26/man-pages-for-c-development-in-ubuntu/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 05:00:23 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Mastering The Command Line]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1493</guid>
		<description><![CDATA[
I recently tutored a friend in C coding. Since I hadn&#8217;t worked with C in at least 8 years, I really needed to have some references to rely on for syntax and other specifics. Fortunately, there are some easy man pages that can be installed in Ubuntu that offer helpful information that I was able [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>I recently tutored a friend in C coding. Since I hadn&#8217;t worked with C in at least 8 years, I really needed to have some references to rely on for syntax and other specifics. Fortunately, there are some easy man pages that can be installed in Ubuntu that offer helpful information that I was able to use to help refresh my memory.</p>
<p>These man pages are easily installed by installing the <code>manpages-dev</code> package. You can install this package via Synaptic or directly on the command line. I like the command line method personally, so I ran <code>sudo apt-get install manpages-dev</code> from the command line to quickly install the package.</p>
<p>After installing the package, I&#8217;m able to access man pages for functions such as <code>printf</code>, <code>opendir</code>, and <code>putc</code>. For each function, it shows the valid syntax as well as what library is required to make use of the function.</p>
<p>The information isn&#8217;t limited to functions as you can also access information on the libraries, such as <code>stdio</code> or <code>string</code>.</p>
<p>To access any of this information, simply run <code>man [function or library name]</code> such as <code>man stdio</code>.</p>
<p>This package isn&#8217;t limited to C functions/libraries. It is a general use Linux development suite of man pages. For a full list of what is installed, check out the <a href="http://packages.ubuntu.com/hardy/all/manpages-dev/filelist" target="_blank">file list</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gaarai.com/2009/09/26/man-pages-for-c-development-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recursively Updating Git Submodules</title>
		<link>http://gaarai.com/2009/09/16/recursively-updating-git-submodules/</link>
		<comments>http://gaarai.com/2009/09/16/recursively-updating-git-submodules/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 18:30:20 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[submodules]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1528</guid>
		<description><![CDATA[
I had fun writing about how I work with Git yesterday. I thought I&#8217;d continue on that thread.
I have a solid set of code libraries that I&#8217;ve written that latch into the WordPress themes we produce at iThemes. Each time code is duplicated across different repositories, I break that code out and make it into [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>I had fun writing about how I work with Git yesterday. I thought I&#8217;d continue on that thread.</p>
<p>I have a solid set of code libraries that I&#8217;ve written that latch into the WordPress themes we produce at <a href="http://ithemes.com/" target="_blank">iThemes</a>. Each time code is duplicated across different repositories, I break that code out and make it into a separate repository. I then link it back into the project as a submodule. This makes it extremely-easy to keep duplicated code across numerous repositories updated with little or no fuss.</p>
<p>After cloning a repository, simply run <code>git submodule init</code> followed by <code>git submodule update</code> in order to initialize all the submodules and update their container folder with the content of the submodule&#8217;s repository. For a long time, this is exactly what I did when I would clone a theme repository to start working on it. However, this quickly wasn&#8217;t enough.</p>
<p>The problem happened as soon as I added a submodule to a repository that was also a submodule of other repositories. Doing the submodule init and update process wouldn&#8217;t do everything I needed in this case as there would be submodules in some subfolder that haven&#8217;t been set up.</p>
<p>I didn&#8217;t want to get into a habit of always switching to other directories and doing the submodule processes there as well since I 1) knew that I would forget all-too-often, thus wasting my time, and 2) knew that this would not be the last time that a submodule had submodules. Heck, there is even the possibility that I&#8217;ll have a submodule that has a submodule that has a submodule. It was immediately clear that I needed a script to do all this dirty work for me. The rest of this post will be about the script I created.</p>

<h3>The Script</h3>
<p>First, I&#8217;ll share the script itself. If you are interested in how it works, continue reading.</p>
<p><a href="/git-submodule-recursive-update" target="_blank">git-submodule-recursive-update</a> (right-click &gt; &#8220;Save Link As&#8230;&#8221; to download)</p>
<p>The script is written in Perl and should work on most systems. I&#8217;ve only tested it on Linux and OS X, so please let me know your results if you try out on Windows.</p>
<pre class="code" style="padding:20px 0 20px;">#!/usr/bin/perl

use strict;
use Cwd;

init_and_update();

exit;

sub init_and_update
{
    my $start_path = cwd();

    my %paths;
    my $updated;

    do
    {
        my $data = `find . -name '.gitmodules'`;
        chomp($data);

        $data =~ s/\/\.gitmodules//g;

        foreach my $path (split(/\n/, $data))
        {
            $paths{$path} = '' if($paths{$path} eq '');
        }

        $updated = 0;

        foreach my $path (sort keys %paths)
        {
            if($paths{$path} eq '')
            {
                chdir($path);
                `git submodule init 2&gt;&amp;1`;
                `git submodule update 2&gt;&amp;1`;
                chdir($start_path);

                if($ARGV[0] eq '--remove-gitmodules')
                {
                    unlink("$path/.gitmodules");
                }

                $paths{$path} = 1;

                $updated++;
            }
        }
    } while($updated);
}</pre>
<h3>The Description</h3>
<p>The functionality should look very straight-forward to anyone that knows Perl.</p>
<ol>
<li>I store the current directory in the <code>$start_path</code> variable in order to always know where home is.</li>
<li>I start a wrapper loop that keeps running until all the possible submodules are initialized and updated.</li>
<li>Using the find command, I look for all the instances of <code>.gitmodules</code> and store the results in <code>$data</code>. The <code>.gitmodules</code> file exists if a repo has submodules.</li>
<li>I remove all the <code>.gitmodules</code> file references from the <code>$data</code> to leave just the paths.</li>
<li>I split the paths into an array and initialize the <code>%paths</code> hash to have a blank value for new paths (stored in the key). Setting this value to blank will flag the following loop that the submodules in that path have not been set up yet.</li>
<li>I create a tracker variable, <code>$updated</code>, to check if anything happened in the loop.</li>
<li>I then loop through the <code>%paths</code> hash to work on each path. If the path&#8217;s hash value is blank, I process that path.</li>
<li>I <code>cd</code> into the repo path, init and update the submodules, and switch back to the starting folder.</li>
<li>If the script is called with the optional <code>--remove-gitmodules</code> argument, I remove the <code>.gitmodules</code> folder while I&#8217;m focused on that folder. I use this for other automation scripts, so it may or may not be of value to you.</li>
<li>I then set the path&#8217;s hash value to <code>1</code> to flag it as done.</li>
<li>Closing out the loop, I update the <code>$updated</code> variable to show that something was updated in this pass.</li>
<li>Finishing up the <code>do</code> loop towards the top, I have <code>while($updated)</code>. Basically, as long as something was updated in the core update loop, I&#8217;ll run everything again. This means that the loop will keep running until it didn&#8217;t find anything else that needed to be updated. When that point is reached, the main loop ends, and the script is finished.</li>
</ol>
<p>I know that there are a number of things I could have done to make for a much more brief, compact script, but I was going to quick production with solid functionality, not brevity. In addition, there are unnecessary elements such as incrementing the <code>$updated</code> variable rather than just setting it to some value. I thought might want to know how many things were updated at some point, so I left it as a counter.</p>
<p>If you found this script helpful, please leave a comment. The more interest these Git-related posts receive, the more motivated I&#8217;ll be to share other processes, developments I&#8217;ve made to make working Git easier.</p>
]]></content:encoded>
			<wfw:commentRss>http://gaarai.com/2009/09/16/recursively-updating-git-submodules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating Multiple Git Repositories Easily Using Bash for Loop</title>
		<link>http://gaarai.com/2009/09/15/updating-multiple-git-repositories-easily-using-bash-for-loop/</link>
		<comments>http://gaarai.com/2009/09/15/updating-multiple-git-repositories-easily-using-bash-for-loop/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 16:42:14 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[Mastering The Command Line]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1508</guid>
		<description><![CDATA[
All of the WordPress themes that I work on for iThemes are managed as Git repositories. Recently, we moved past the 100 repositories mark. That&#8217;s a lot of repositories to manage, and unfortunately, too many of those repositories contain duplicated information.
Later on, I might delve into how we use Git to manage our theme repos. [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>All of the <a href="http://wordpress.org/" target="_blank">WordPress</a> themes that I work on for <a href="http://ithemes.com/" target="_blank">iThemes</a> are managed as Git repositories. Recently, we moved past the 100 repositories mark. That&#8217;s a lot of repositories to manage, and unfortunately, too many of those repositories contain duplicated information.</p>
<p>Later on, I might delve into how we use Git to manage our theme repos. For today, however, I&#8217;d like to focus on how I quickly and easily pushed up changes to more than a dozen repos in a single, albeit long, Bash command.</p>
<p>I had finished making updates to 16 <a href="http://ithemes.com/purchase/flexx-theme-wordpress-blog-themes/" target="_blank">Flexx</a> repos, and I needed to push all of those changes up. Since I had multiple working repos in that folder, I was lucky that each of these repos began with the text &#8220;Flexx&#8221;. Also, since they are all part of the same series and need to keep the same version number, that simplified the tagging as all could be tagged as 2.5.0.</p>
<p>Given this information, I simply ran the following command from the directory that contained all the repository directories:</p>
<div class="code">for i in `ls|grep Flexx`; do echo &#8220;&#8212; Pushing $i&#8221;; cd $i; git commit -am &#8216;2.5.0&#8242; &amp;&amp; git push &amp;&amp; git tag 2.5.0 &amp;&amp; git push &#8211;tags; cd ..; echo &#8220;&#8212; Finished $i&#8221;; done</div>
<p>There&#8217;s a lot going on here, so I&#8217;ll break it up and explain what I&#8217;m doing.</p>

<div class="code">for i in `ls|grep Flexx`</div>
<p>This is basically a compound command. Bash&#8217;s <code>for</code> command is being used to step through the results of <code>ls|grep Flexx</code>. Each result will be stored to the variable <code>i</code> which can be referred to with <code>$i</code>.</p>
<p>In other words, I&#8217;m going to loop through each directory that contains the text &#8220;Flexx&#8221; (technically, it isn&#8217;t limited to just directories, but I don&#8217;t have any files containing &#8220;Flexx&#8221;, so I&#8217;m safe). For each iteration of the loop, the variable <code>$i</code> will contain the name of the folder I&#8217;m interested in.</p>
<div class="code">do echo &#8220;&#8212; Pushing $i&#8221;</div>
<p>The most important bit here is <code>do</code>. <code>do</code> simply begins the functional part of the loop and could be followed by any command that I wanted to start the loop with.</p>
<p>The <code>echo</code> command isn&#8217;t technically necessary. I simply have it there so that I can better determine what output belongs to which repository.</p>
<div class="code">cd $i</div>
<p>This is a very important command. It changes the directory to the repository I wish to run commands on.</p>
<div class="code">git commit -am &#8216;2.5.0&#8242; &amp;&amp; git push &amp;&amp; git tag 2.5.0 &amp;&amp; git push &#8211;tags</div>
<p>This is the command that actually does what I want to do in each repo directory. This adds all the modified files, commits them with a message of &#8220;2.5.0&#8243;, pushes the changes to the remote repository, creates a new tag of 2.5.0, and pushes up the new tag.</p>
<p>I have all of these commands chained together with <code>&amp;&amp;</code> so that if one command fails, the other ones won&#8217;t run. This prevents tagging in the event that the repository couldn&#8217;t be committed or pushed.</p>
<div class="code">cd ..</div>
<p>It&#8217;s a small command but necessary. This switches back to the main directory that holds all the repos, thus returning us back to a state that the next loop iteration can work with.</p>
<div class="code">echo &#8220;&#8212; Finished $i&#8221;</div>
<p>As with the other <code>echo</code> command, this simply allows me to keep track of what is going on more easily.</p>
<div class="code">done</div>
<p>The <code>done</code> command finishes out the loop iteration.</p>
<p>I hope that by sharing this you can gain a bit of insight into how I work with repositories while also learning more about how you can do things with Bash.</p>
]]></content:encoded>
			<wfw:commentRss>http://gaarai.com/2009/09/15/updating-multiple-git-repositories-easily-using-bash-for-loop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix &#8220;The URL is not valid and cannot be loaded&#8221; in Firefox on Ubuntu</title>
		<link>http://gaarai.com/2009/09/09/fix-the-url-is-not-valid-and-cannot-be-loaded-in-firefox-on-ubuntu/</link>
		<comments>http://gaarai.com/2009/09/09/fix-the-url-is-not-valid-and-cannot-be-loaded-in-firefox-on-ubuntu/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 13:21:08 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[annoyances]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1503</guid>
		<description><![CDATA[
In Linux, clicking the middle mouse button (or mouse wheel) pastes the most recently highlighted text from any application. This is useful; however, it has an extremely-annoying side-effect in Firefox. Whenever I middle-click outside of entry fields, I get an annoying pop-up that says: &#8220;The URL is not valid and cannot be loaded.&#8221; This frustrates [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>In Linux, clicking the middle mouse button (or mouse wheel) pastes the most recently highlighted text from any application. This is useful; however, it has an extremely-annoying side-effect in Firefox. Whenever I middle-click outside of entry fields, I get an annoying pop-up that says: &#8220;The URL is not valid and cannot be loaded.&#8221; This frustrates me to no end. It usually happens when I accidentally nudge my mouse and miss middle-clicking a link in order to open it in a new tab.</p>
<p>So, why is it doing this? Turns out that, by default, Firefox for Linux allows you to use this middle-click to paste functionality to allow you to navigate to a highlighted URL simply by middle-clicking non-editable portions of the page. When an invalid URL is the result of the paste, the annoying popup appears.</p>
<p>Today, I found out how to get rid of this annoyance.</p>
<p>Open a new tab in Firefox and navigate to &#8220;about:config&#8221;. This will take you to an interface that allows you to tweak and configure very specific functionality of Firefox.</p>
<p>In the &#8220;Filter:&#8221; text box, enter &#8220;middlemouse.contentLoadURL&#8221;. This should present a single entry that lists the option as having a value of &#8220;true&#8221;. Simply double-click the listing to change the value to &#8220;false&#8221;. The effect is instantaneous.</p>
<p>Now when you middle-click outside of editable areas in Firefox, it will no longer try to navigate to a URL. This change only modifies the navigation to URL functionality; the middle-click to paste in editable areas still functions.</p>
<p>If you like the middle-click to scroll functionality found in other browsers/operating systems, then search for &#8220;general.autoScroll&#8221; and double-click the listing to change it to true. Now you can middle-click to initiate scrolling.</p>
]]></content:encoded>
			<wfw:commentRss>http://gaarai.com/2009/09/09/fix-the-url-is-not-valid-and-cannot-be-loaded-in-firefox-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Upgrade to Firefox 3.5 on Ubuntu 9.04 &#8211; Jaunty Jackalope</title>
		<link>http://gaarai.com/2009/07/01/upgrade-to-firefox-3-5-on-ubuntu-9-04-jaunty-jackalope/</link>
		<comments>http://gaarai.com/2009/07/01/upgrade-to-firefox-3-5-on-ubuntu-9-04-jaunty-jackalope/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 00:25:52 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1473</guid>
		<description><![CDATA[
Updated for Firefox release 3.5.5
Firefox 3.5 was released yesterday. This is an exciting new release complete with features such as support for HTML 5, video and audio that works in the browser without the need for plugins, a much faster Javascript engine, a native JSON parser, private browsing mode, support for SVG transformations, and other [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<div class="post-notice">Updated for Firefox release 3.5.5</div>
<p><a href="http://www.mozilla.com/en-US/firefox/3.5/releasenotes/" target="_blank">Firefox 3.5</a> was released yesterday. This is an exciting new release complete with features such as support for HTML 5, video and audio that works in the browser without the need for plugins, a much faster Javascript engine, a native <a href="http://en.wikipedia.org/wiki/JSON" target="_blank">JSON</a> parser, private browsing mode, support for SVG transformations, and other great enhancements.</p>
<p>I&#8217;m sure that you&#8217;re just as excited to get started with Firefox 3.5 as I was yesterday when I heard the news. But wait! We&#8217;re on Ubuntu, we can&#8217;t just install whatever we want, we need to wait for a package. Right? Wrong.</p>
<p>Here&#8217;s a really quick way to get 3.5.5 running on your Ubuntu 9.04 system.</p>

<p>Open up Terminal (Applications &gt; Accessories &gt; Terminal) and run the following commands:</p>
<ol>
<li><code>cd /tmp</code></li>
<li><code>wget "http://download.mozilla.org/?product=firefox-3.5.5&amp;os=linux&amp;lang=en-US"</code><br />
Note: Your download link may be different depending on your country and language. I got the link by clicking the download link, canceling  the automatic download, right-clicking the &#8220;Your download should automatically begin in a few seconds, but if not, click here&#8221; link, and selecting Copy Link Location.</li>
<li><code>tar xvjf firefox-*.bz2</code></li>
<li><code>sudo cp -r firefox /usr/lib/firefox-3.5.5</code></li>
<li><code>sudo mv /usr/bin/firefox /usr/bin/firefox.old</code></li>
<li><code>sudo ln -s /usr/lib/firefox-3.5.5/firefox /usr/bin/firefox-3.5.5</code></li>
<li><code>sudo ln -s /usr/bin/firefox-3.5.5 /usr/bin/firefox</code></li>
</ol>
<p>Close Firefox and then reopen. You should now be running Firefox 3.5.5.</p>
<p>If for whatever reason you&#8217;d like to switch back to your previous version of Firefox, simply run the following commands from Terminal:</p>
<ol>
<li><code>sudo mv /usr/bin/firefox /usr/bin/firefox.bak</code></li>
<li><code>sudo mv /usr/bin/firefox.old /usr/bin/firefox</code></li>
</ol>
<p>Notice how I even create a backup of the original firefox before replacing it. It is always a good idea to do this if you replace programs yourself. This way you won&#8217;t be likely to remove a binary or script that you won&#8217;t be able to get back easily.</p>
<p>Now that you are on Firefox 3.5.5, check out some awesome sites that show off some of the new capabilities.</p>
<ul>
<li><a href="http://hacks.mozilla.org/2009/06/3d-transforms-isocube/" target="_blank">3-D cubes</a> built with standard HTML content, including the new native video component.</li>
<li><a href="http://hyper-metrix.com/misc/jai/" target="_blank">Audio player</a> built entirely with HTML, CSS, and Javascript. It doesn&#8217;t even use what we commonly think of as images, simply the new Canvas element.</li>
<li><a href="http://people.mozilla.com/~prouget/demos/round/index.xhtml" target="_blank">Video Washing Machine</a> &#8211; Add a video to your site, crop it to fit in a circle, put a border around it, have rollover effects that change the filter on the video, and spin the whole thing as it plays. All of this with just the &lt;video&gt; element, CSS 3, SVG, and a bit of JavaScript.</li>
<li>Add <a href="http://hacks.mozilla.org/2009/06/xhr-progress-and-richer-file-uploading-feedback/" target="_blank">upload progress bars</a> without the use of Flash or insane amounts of scripting.</li>
<li>Create the illusion of a <a href="http://www.tapper-ware.net/stable/web.filter.voxels/index.xhtml" target="_blank">3D voxel engine</a> with an image and some creative SVG, scripting, and CSS.</li>
<li>Apply <a href="http://www.tapper-ware.net/stable/web.filter.apng.dynamicTexture/index.xhtml" target="_blank">textures</a> to an animated model.</li>
<li>Create a text shadow <a href="http://hacks.mozilla.org/2009/06/text-shadow-spotlight/" target="_blank">spotlight effect</a> using Javascript and CSS.</li>
<li>Web developers can now take advantage of <a href="http://craigmod.com/journal/font-face/" target="_blank">custom typography</a> using the new CSS rules.</li>
<li><a href="http://people.mozilla.com/~blizzard/launch/" target="_blank">Sync page elements</a> with the position in the video. Note that the graphs are canvas elements that are being drawn on.</li>
<li>Use HTML elements to <a href="http://apm.ircam.fr/media/tmp/audio-tag/" target="_blank">jump to different positions in audio</a>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://gaarai.com/2009/07/01/upgrade-to-firefox-3-5-on-ubuntu-9-04-jaunty-jackalope/feed/</wfw:commentRss>
		<slash:comments>66</slash:comments>
		</item>
	</channel>
</rss>
