<?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>Stanley Shilov - Web Development, SEO and SEM &#187; Software</title>
	<atom:link href="http://www.stanleyshilov.com/blog/category/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stanleyshilov.com</link>
	<description>Web Development with a twist of Affiliate Marketing</description>
	<lastBuildDate>Sun, 06 Jun 2010 21:11:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to build Firefox 3.5+ with JSSH on Ubuntu 9.10 64bit</title>
		<link>http://www.stanleyshilov.com/blog/compile-firefox-jssh-ubuntu-9-10-64bit-ruby-watir/</link>
		<comments>http://www.stanleyshilov.com/blog/compile-firefox-jssh-ubuntu-9-10-64bit-ruby-watir/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 00:11:15 +0000</pubDate>
		<dc:creator>Stanley</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.stanleyshilov.com/?p=318</guid>
		<description><![CDATA[A brief guide on how to compile Firefox 3.5 and later with JSSH support on Ubuntu ]]></description>
			<content:encoded><![CDATA[<p>I needed to run Firefox with JSSH support on <a href="http://www.ubuntu.com/getubuntu/download">Ubuntu 9.10 x64</a> in order to use it with <a href="http://watir.com/">Ruby&#8217;s Watir</a> library. Unfortunately the <abbr title="Firefox Extension">xpi</abbr> file available on the watir site does not support 64bit Ubuntu, which meant I had to compile Firefox from scratch with builtin support for JSSH.</p>
<p>The configuration file (.mozconfig) has changed slightly with the newer versions of Firefox, so the older <a href="http://www.google.com/search?q=firefox+jssh">guides</a> out there no longer work. Below is an updated step by step process which works up to Firefox 3.7a1pre (the newest version available at the time of this writing). Needless to say, this should also work with Firefox 3.5 and 3.6.</p>
<p><span id="more-318"></span>Build all the necessary packages to compile Firefox:</p>
<pre class="brush: bash;">
sudo apt-get build-dep firefox
</pre>
<p>Mozilla has switched from CVS to mercurial for source code management. Install mercurial and fetch the source:</p>
<pre class="brush: bash;">
sudo apt-get install mercurial
hg clone http://hg.mozilla.org/mozilla-central/ mozilla
</pre>
<p>The above will retrieve the latest version of Minefield. If you want use 3.6 or 3.5, check out this <a href="https://developer.mozilla.org/En/Mozilla_Source_Code_%28Mercurial%29">Mozilla wiki</a>.</p>
<p>Once the source is done downloading, <em>cd</em> into <em>mozilla</em> and create the <em>.mozconfig</em> file:</p>
<pre class="brush: bash;">
cd mozilla
vim .mozconfig
</pre>
<pre class="brush: bash;">
# .mozconfig:
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-jssh
ac_add_options --enable-extensions=default,jssh
ac_add_options --enable-application=browser
ac_add_options --enable-webservices
ac_add_options --disable-libnotify
ac_add_options --disable-necko-wifi
</pre>
<p>The last two lines are optional. It might be because I&#8217;m using <a href="http://awesome.naquadah.org/">awesome</a>, but the source wouldn&#8217;t compile for me without those last two lines.</p>
<p>Save the file and run make:</p>
<pre class="brush: bash;">
make -f client.mk build
</pre>
<p>It&#8217;ll take a few minutes but once it&#8217;s done you can launch Firefox by running:</p>
<pre class="brush: bash;">
./firefox-jssh/dist/bin/firefox -jssh
</pre>
<p>Keep in mind, this is separate from any existing Firefox installation you might have already had.<br />
I would recommend creating a <a href="http://www.stanleyshilov.com/blog/how-to-run-multiple-firefox-instances/">separate Firefox profile</a> to use for this installation.</p>
<p>If you&#8217;re doing this to get Watir running, you can test it out with this simple script:</p>
<pre class="brush: ruby;">
require 'rubygems'
require 'firewatir'

fx = FireWatir::Firefox.new
fx.goto(&quot;http://www.whatismyreferrer.com&quot;);
</pre>
<p>It should open a new window and change the URL to <a href="http://www.whatismyreferrer.com">http://www.whatismyreferrer.com</a></p>
<p>That&#8217;s about it. Hope this helps a few of you.</p>
<p><strong>Possible Errors and Solutions</strong></p>
<pre class="brush: bash;">
checking for GL/glx.h... no
configure: error: Can't find header GL/glx.h for WebGL (install mesa-common-dev (Ubuntu), mesa-libGL-devel (Fedora), or Mesa (SuSE))
*** Fix above errors and then restart with               &quot;make -f client.mk build&quot;
</pre>
<p>Install the package appropriate for your distro and you&#8217;ll be good to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stanleyshilov.com/blog/compile-firefox-jssh-ubuntu-9-10-64bit-ruby-watir/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
