<?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>Paul Goscicki &#187; ubuntu</title>
	<atom:link href="http://paulgoscicki.com/categories/linux/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://paulgoscicki.com</link>
	<description>Random pieces of code, thoughts and movie reviews</description>
	<lastBuildDate>Tue, 15 Nov 2011 18:45:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Run guard-jasmine-headless-webkit without X server</title>
		<link>http://paulgoscicki.com/archives/2011/09/run-guard-jasmine-headless-webkit-without-x-server/</link>
		<comments>http://paulgoscicki.com/archives/2011/09/run-guard-jasmine-headless-webkit-without-x-server/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 17:44:38 +0000</pubDate>
		<dc:creator>Paul Goscicki</dc:creator>
				<category><![CDATA[administration]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://paulgoscicki.com/?p=355</guid>
		<description><![CDATA[You write specs for your javascript, right? If not, you really should. jasmine-headless-webkit really helps with that. guard-jasmine-headless-webkit makes it all even more enjoyable, although there&#8217;s one caveat &#8211; it&#8217;s not so easy to set it all up. There is a great guide for that, but it lacks some important details on running guard-jasmine-headless-webkit without [...]]]></description>
			<content:encoded><![CDATA[<p>You write specs for your javascript, right? If not, you <a href="http://gilesbowkett.blogspot.com/2011/08/tdd-in-javascript-no-excuses.html">really</a> <a href="http://railscasts.com/episodes/261-testing-javascript-with-jasmine">should</a>.</p>
<p><a href="https://github.com/johnbintz/jasmine-headless-webkit">jasmine-headless-webkit</a> really helps with that. <a href="https://github.com/johnbintz/guard-jasmine-headless-webkit">guard-jasmine-headless-webkit</a> makes it all even more enjoyable, although there&#8217;s one caveat &#8211; it&#8217;s not so easy to set it all up.</p>
<p>There is a <a href="http://johnbintz.github.com/jasmine-headless-webkit/">great guide</a> for that, but it lacks some important details on running <code>guard-jasmine-headless-webkit</code> without graphical interface (X server).</p>
<p>Assuming you already have Xvfb installed, execute this command to run Xvfb in the background:</p>
<pre class="code">
Xvfb :0 -screen 0 1024x768x24 > /dev/null 2>&#038;1 &#038;
</pre>
<p>And then you need to setup the <code>DISPLAY</code> shell variable in order for <code>guard-jasmine-headless-webkit</code> to automatically connect to our virtual frame buffer. Here&#8217;s the excerpt from my <a href="https://github.com/pjg/dotfiles/blob/master/.bash_profile">.bash_profile</a> (it first checks if there is Xvfb running on display :0 and only then sets the DISPLAY variable):</p>
<pre class="code">
xdpyinfo -display :0 &#038;>/dev/null &#038;&#038; export DISPLAY=:0
</pre>
]]></content:encoded>
			<wfw:commentRss>http://paulgoscicki.com/archives/2011/09/run-guard-jasmine-headless-webkit-without-x-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading Ubuntu to 8.04 (Hardy Heron). Ugh.</title>
		<link>http://paulgoscicki.com/archives/2008/04/upgrading-ubuntu-to-804-hardy-heron-ugh/</link>
		<comments>http://paulgoscicki.com/archives/2008/04/upgrading-ubuntu-to-804-hardy-heron-ugh/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 17:46:20 +0000</pubDate>
		<dc:creator>Paul Goscicki</dc:creator>
				<category><![CDATA[administration]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://paulgoscicki.com/archives/2008/04/upgrading-ubuntu-to-804-hardy-heron-ugh/</guid>
		<description><![CDATA[Some minor problems: /etc/default/locale has been deleted (wtf?). Needed to be recreated. Both /etc/timezone and /etc/localtime have been deleted. Needed to recreate the links. /etc/updatedb.conf has been deleted. Needed to be copied from another machine. and one major one: klogd now takes 5 minutes to start, which means I have to wait 5 minutes after [...]]]></description>
			<content:encoded><![CDATA[<p>Some minor problems:</p>
<ul>
<li><code>/etc/default/locale</code> has been deleted (wtf?). Needed to be recreated.</li>
<li>Both <code>/etc/timezone</code> and <code>/etc/localtime</code> have been deleted. Needed to recreate the links.</li>
<li><code>/etc/updatedb.conf</code> has been deleted. Needed to be copied from another machine.</li>
</ul>
<p>and one major one:</p>
<ul>
<li><code>klogd</code> now takes 5 minutes to start, which means I have to wait 5 minutes after each reboot to use the machine. Adding <code>-x</code> switch in the <code>init.d</code> script solved the problem. What was the root cause? No idea. There are only <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=126616">hints</a>.</li>
</ul>
<p>Apparently there is some reasoning behind <a href="http://www.dnalounge.com/backstage/log/2006/04.html#29">not upgrading your linux policy</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://paulgoscicki.com/archives/2008/04/upgrading-ubuntu-to-804-hardy-heron-ugh/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Intel Core 2 Duo power consumption</title>
		<link>http://paulgoscicki.com/archives/2007/05/intel-core-2-duo-power-consumption/</link>
		<comments>http://paulgoscicki.com/archives/2007/05/intel-core-2-duo-power-consumption/#comments</comments>
		<pubDate>Sat, 19 May 2007 19:19:10 +0000</pubDate>
		<dc:creator>Paul Goscicki</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://paulgoscicki.com/archives/2007/05/intel-core-2-duo-power-consumption/</guid>
		<description><![CDATA[During the recent move of my development machine to the basement I&#8217;ve conducted a test telling me what is the actual power consumption of my new Core 2 Duo powered server. Basically, it is a normal PC: Core 2 Duo E6300 1.86GHz, 2 x 512MB DDR2, 2 x 250GB SATA 7200rpm (RAID 1), old PCI [...]]]></description>
			<content:encoded><![CDATA[<p>During the recent move of my development machine to the basement I&#8217;ve conducted a test telling me what is the actual power consumption of my new Core 2 Duo powered server. Basically, it is a normal PC: Core 2 Duo E6300 1.86GHz, 2 x 512MB DDR2, 2 x 250GB SATA 7200rpm (RAID 1), old PCI graphic card and a 350W power supply. All running latest <a href="http://ubuntu.com">Ubuntu</a> (currently 7.04 Feisty Fawn, server edition). Since it is a development machine, it&#8217;s idle most of the time (98% or even more). And this is the state I was making my measurements in. So what are the results? Well, I was quite surprised how <em>low</em> my power consumption actually is. I took three tests, which indicated basically the same: about <strong>77 Watts</strong>. Even taking into the account temporary power usage spikes (when I&#8217;m actually using the machine&#8230;) it shouldn&#8217;t cost me more than 4$ per month to keep it running 24/7. Isn&#8217;t that sweet? <img src='http://paulgoscicki.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://paulgoscicki.com/archives/2007/05/intel-core-2-duo-power-consumption/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubuntu&#8217;s UUID schizophrenia</title>
		<link>http://paulgoscicki.com/archives/2007/05/ubuntus-uuid-schizophrenia/</link>
		<comments>http://paulgoscicki.com/archives/2007/05/ubuntus-uuid-schizophrenia/#comments</comments>
		<pubDate>Wed, 02 May 2007 12:53:01 +0000</pubDate>
		<dc:creator>Paul Goscicki</dc:creator>
				<category><![CDATA[administration]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://paulgoscicki.com/archives/2007/05/ubuntus-uuid-schizophrenia/</guid>
		<description><![CDATA[Actually it was more like I was losing my mind, not my Ubuntu&#8230; But let&#8217;s start from the beginning&#8230; I have two identical 250GB hard disks so I&#8217;ve decided to create a RAID array out of them. Not a system (bootable) one as I had too much trouble setting it up (I&#8217;ve set it up [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ubuntu.com/" title="Ubuntu"><img src="/pictures/ubuntu-logo.gif" alt="Ubuntu Linux" class="alignright" /></a></p>
<p>Actually it was more like I was losing my mind, not my Ubuntu&#8230;</p>
<p>But let&#8217;s start from the beginning&#8230; I have two identical 250GB hard disks so I&#8217;ve decided to create a RAID array out of them. Not a system (bootable) one as I had too much trouble setting it up (I&#8217;ve set it up but <code>dist-upgrade</code> broke it all too nicely; kernel panic, etc.). I&#8217;ve set up a separate 5GB system partition on the first drive, leaving the rest for RAID. This left me with 5GB of free space to spare on the second drive. Smart as I was, I decided to clone the system partition from first drive to the second one, using <code>dd</code>, so I&#8217;d still be able to boot if either of the drives crashed. I called it <em>semi-RAID built-by-hand</em> and, well, I was quite proud of it. All seemed fine as months passed (and remember, that this was a server and as such almost did not require any reboots). But time passed and suddenly there was the new Ubuntu out, the <a href="http://releases.ubuntu.com/feisty/">Feisty</a> one, so I decided it was time to upgrade. As I had some minor troubles during the upgrade (obsolete packages, invalid config files that I ordered to keep, etc.), I was rebooting every few minutes. And this is where fun comes in&#8230;</p>
<p>After a successful upgrade to 7.04 the screen greeted me with a 6.04 prompt. Hmm&#8230; strange. Let&#8217;s see what&#8217;s going on. Okey, so this upgrade actually did go so well. No problem, let&#8217;s do it again. This time I did not reboot, but kept making other changes. At some point I had to reboot, though. Now I was scratching my head really hard. Some packages, I knew I had uninstalled previously, kept coming back. I was making changes to various config files only to see those changes not being written to the disk after rebooting. Like, WTF? Now I was rebooting like crazy&#8230; losing my mind more with every reboot. I was making directories like <strong>THIS-IS-FIRST-HARD-DISK-FOR-SURE</strong> only to see them disappear and reappear a couple of reboots later. I was almost crying with despair. I&#8217;ve came up with the idea to compare <code>/dev/sda1</code> with <code>/dev/sdb1</code>. Funny thing, they turned out to be the same. Who knew, maybe my RAID-by-hand automatically turned into a real one?</p>
<p>I had dark thoughts. I was thinking about giving up on having two identical hard disks inside one PC and maybe about downgrading to Edgy, not even knowing whether that was possible. I was even thinking about giving up on those two 250GB disks. I was really desperate. I knew, I needed a break.</p>
<p>10 minutes and one glass of cold water later I was on the mission to find out what is exactly wrong with my Ubuntu. Or my PC. Or my hard disks. Or the world around me.</p>
<p>It wasn&#8217;t easy. The <code>df</code> command reported my system being on <code>/dev/sda1</code>. Mounting <code>/dev/sdb1</code> did not help as it has been showing me the same partition. But then came the bright idea to try and mount <code>/dev/sda1</code>, despite it being <em>already mounted</em>. To my surprise it turned out to be a <em>completely another</em> partition! The <em>lost</em> one! The one I missed so much. I was in heaven, so I started <a href="http://www.google.pl/search?num=100&#038;hl=en&#038;q=checking+disk+UUID+in+ubuntu&#038;btnG=Szukaj&#038;lr=">googling</a>, because by that time I just knew it had something to do with those weird UUIDs. And I&#8217;d found out that <a href="http://ubuntuforums.org/showthread.php?t=326871">I was not alone</a>. I was so happy&#8230;</p>
<p>Now I know that my mistake was to make the exact clone of the system partition and have those two partitions (with the same UUIDs, yeah, <em>unique</em> ids my ass) available at the same time. No wonder my Ubuntu felt schizophrenic, but it still does not justify all of this weird behavior I was greeted with. Some error, some syslog entry, anything would be helpful&#8230; is that too much to ask?</p>
<p>What I was left with after I&#8217;ve figured it all out was this nice free disk space report (notice the double <code>/dev/sda1</code> entry):</p>
<pre class="code">
$ df
Filesystem  1K-blocks     Used  Available  Use% Monuted on
/dev/sda1     5162796  1650512    3250028   34% /
(..)
/dev/sda1     5162796  1558632    3341908   33% /mnt/disk-a
</pre>
<p>The root of the problem is that I base most of my core linux knowledge on the RedHat from the 90s when <code>/dev/hda1</code> was <em>saint</em> and meant <em>exactly</em> what it represented, namely the first partition of the first hard disk (presumably connected using the first cable and set as master). With UUIDs all this has changed. Apparently for the better, but leaving some folks like me scratching their heads with disbelief.</p>
<p>Yes, Ubuntu is Linux for human beings. Apparently not for all&#8230;</p>
<p>PS: For future reference, remember to set the UUID after doing any partition duplication using <code>dd</code>. You do it like this:</p>
<pre class="code">
tune2fs -U random /dev/sdb1
</pre>
]]></content:encoded>
			<wfw:commentRss>http://paulgoscicki.com/archives/2007/05/ubuntus-uuid-schizophrenia/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Installing Ruby on Rails on Ubuntu</title>
		<link>http://paulgoscicki.com/archives/2005/09/ruby-on-rails-on-ubuntu/</link>
		<comments>http://paulgoscicki.com/archives/2005/09/ruby-on-rails-on-ubuntu/#comments</comments>
		<pubDate>Tue, 20 Sep 2005 16:02:54 +0000</pubDate>
		<dc:creator>Paul Goscicki</dc:creator>
				<category><![CDATA[administration]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://paulgoscicki.com/archives/2005/09/ruby-on-rails-on-ubuntu/</guid>
		<description><![CDATA[This guide is valid for the following distributions: 5.04 (Hoary Hedgehog), 5.10 (Breezy Badger), 6.06 LTS (Dapper Drake), 6.10 (Edgy Eft). While there is a nice tutorial in the Ruby on Rails wiki, it&#8217;s by no means complete. According to it, you should only type: apt-get install rails to have the newest Rails installed on [...]]]></description>
			<content:encoded><![CDATA[<h4>This guide is valid for the following distributions:</h4>
<ul>
<li><a href="http://old-releases.ubuntu.com/releases/hoary/">5.04 (Hoary Hedgehog)</a>,</li>
<li><a href="http://old-releases.ubuntu.com/releases/breezy/">5.10 (Breezy Badger)</a>,</li>
<li><a href="http://old-releases.ubuntu.com/releases/dapper/">6.06 LTS (Dapper Drake)</a>,</li>
<li><a href="http://releases.ubuntu.com/edgy/">6.10 (Edgy Eft)</a>.</li>
</ul>
<p><a href="http://www.rubyonrails.com/" title="Ruby on Rails"><img src="/pictures/rails_logo.gif" alt="Ruby on Rails" class="alignleft" /></a></p>
<p>While there is a <a href="http://wiki.rubyonrails.com/rails/show/RailsOnUbuntuDebianTestingAndUnstable">nice tutorial</a> in the Ruby on Rails <a href="http://wiki.rubyonrails.com/rails/show/HomePage">wiki,</a> it&#8217;s by no means <em>complete</em>. According to it, you should only type: <code>apt-get install rails</code> to have the newest Rails installed on Ubuntu. It installs both Ruby and Rails, but what about rubygems? Sorry, not this time. There is also another caveat. Although commands like <code>rails test</code> and <code>ruby script/server</code> are working properly, <code>ruby/console</code> <strong>is not</strong>. If you had the misfortune of experiencing the aforementioned behavior, then this tutorial is just for you.</p>
<h3>Pre requirements:</h3>
<pre class="code">nano /etc/apt/sources.list</pre>
<p>Add the following at the end of the file (replace <strong>edgy</strong> with <em>breezy</em> if you are running Breezy, <em>dapper</em> for Dapper, etc.):</p>
<pre class="code"># All Ubuntu repositories
deb http://archive.ubuntu.com/ubuntu edgy main restricted universe multiverse</pre>
<p>Update your apt sources:</p>
<pre class="code">apt-get update</pre>
<h3>Installation:</h3>
<p>Install Ruby with developer&#8217;s libraries:</p>
<pre class="code">apt-get install ruby ri rdoc irb ri1.8 ruby1.8-dev libzlib-ruby zlib1g</pre>
<p>Download and install <a href="http://rubyforge.org/projects/rubygems/">Ruby Gems</a> (no .deb package, unfortunately):</p>
<pre class="code">wget http://rubyforge.org/frs/download.php/17190/rubygems-0.9.2.tgz
tar xfvz rubygems-0.9.2.tgz
cd rubygems-0.9.2
ruby setup.rb</pre>
<p>Update your RubyGems (also updates the gems cache):</p>
<pre class="code">gem update --system</pre>
<p>If you get <code>Could not find rubygems-update (&gt; 0) in the repository</code> or a similar error, you need to <a href="http://onestepback.org/index.cgi/Tech/Ruby/DeleteYourCache.red">delete your RubyGems cache</a>:</p>
<pre class="code">$ gem env gemdir
PATH_TO_DEFAULT_GEM_REPOSITORY
$ rm PATH_TO_DEFAULT_GEM_REPOSITORY/souce_cache</pre>
<p>and</p>
<pre class="code">rm $HOME/.gem/source_cache</pre>
<p>In the next step install the OpenSSL bindings for Ruby (needed to install signed gems). They are required if you get the following error: <em>SSL is not installed on this system</em>, while installing signed gems like <code>rake</code>:</p>
<pre class="code">apt-get install libopenssl-ruby</pre>
<p>And the last one:</p>
<pre class="code">gem install rails -y</pre>
<p>And this is basically it. There are, however, depending on your needs, some&#8230;</p>
<h3>Additional steps:</h3>
<p>One of them is setting up the Rails to connect to the MySQL database in a proper way. We will be using the MySQL C bindings, which, for one, support the MySQL old style passwords (which is set as default for Ubuntu 5.04), but are also significantly faster (in the 2-3x range) than the native Ruby MySQL bindings. First, we will need to install the <code>gcc</code> compiler (and <code>libc6-dev</code> if you don&#8217;t have it already installed). Although strange it may seem, as a default it is not installed on a clean Ubuntu installation.</p>
<pre class="code">apt-get install gcc libc6-dev</pre>
<p>MySQL development libraries are also required (mysql_config plus mysql/include):</p>
<pre class="code">apt-get install libmysqlclient14-dev</pre>
<p>(for MySQL 5.0 you might be better of with <code>libmysqlclient15-dev</code>).</p>
<p>And now we can install C MySQL bindings:</p>
<pre class="code">gem install mysql</pre>
<p>If you get <code>"sh: make: not found"</code> do:</p>
<pre class="code">apt-get install make</pre>
<p>or if you have it already installed, add it to your path:</p>
<pre class="code">export PATH=/usr/bin:"${PATH}"</pre>
<p>And, of course, in the end install <a href="http://mongrel.rubyforge.org/">Mongrel</a>:</p>
<pre class="code">gem install mongrel -y</pre>
<p>And that&#8217;s it. Rails installation is complete. Complicated? Not really <img src='http://paulgoscicki.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://paulgoscicki.com/archives/2005/09/ruby-on-rails-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>75</slash:comments>
		</item>
		<item>
		<title>The magic of Ubuntu</title>
		<link>http://paulgoscicki.com/archives/2005/09/magic-of-ubuntu/</link>
		<comments>http://paulgoscicki.com/archives/2005/09/magic-of-ubuntu/#comments</comments>
		<pubDate>Sat, 17 Sep 2005 15:14:30 +0000</pubDate>
		<dc:creator>Paul Goscicki</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://paulgoscicki.com/?p=34</guid>
		<description><![CDATA[After three years (has it been that long?) the time has finally come to replace my very much beloved RedHat 8.0 with something more up-to-date. The choice was fairly simple. Yes, Ubuntu. Praised by everyone, loved by many aka the most popular linux distro around. I got to know a little bit of Debian magic, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ubuntu.com/" title="Ubuntu"><img src="/pictures/ubuntu-logo.gif" alt="Ubuntu Linux" class="alignleft" /></a></p>
<p>After three years (has it been that long?) the time has finally come to replace my very much beloved RedHat 8.0 with something more up-to-date. The choice was fairly simple. Yes, <a href="http://www.ubuntulinux.org/" title="Ubuntu">Ubuntu</a>. Praised by everyone, loved by many aka the most popular linux distro around.</p>
<p>I got to know a little bit of <em>Debian magic</em>, by installing <code>apt-get</code> for my RedHat. It had very limited use as the rpm repositories were rarely updated. Only  using Debian you can experience its full potential. And yes, Ubuntu is a Debian clone.</p>
<p>The installation was fairly simple, although I missed the &#8220;select packages&#8221; screen (I suppose there is no option to choose the installed packages before the installation). Next stop: configuration. Turning off graphical login, disabling useless services (cups, alsa, ppp and so on&#8230;) – all the usual stuff. Hour after hour my system was shaping up.</p>
<p>At some point I have noticed that I did not have identd running. Without any hesitation I executed <code>apt-get install oidentd</code>. One minute later it was up and running.</p>
<p>And now for the magic part. It has automatically discovered the non-routable IP address (in the 192.168.x.x range) assigned to the <code>eth0</code> interface (which was also the default routing target) together with the IP address of the gateway. Based on those two IP addresses it found out that my machine was sitting behind a <abbr title="Network Address Translation">NAT</abbr>, so it <strong>automatically</strong> added the <code>-A gateway_ip</code> option to the command line (needed for oidentd to work behind a NAT). That&#8217;s just pure magic.</p>
<p>I know it&#8217;s just a relatively simple installation script, but still, it&#8217;s those simple things which make all the difference. And, sometimes, also make my jaw drop.</p>
<p>10 points for Ubuntu.</p>
]]></content:encoded>
			<wfw:commentRss>http://paulgoscicki.com/archives/2005/09/magic-of-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

