<?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>Monday By Noon &#187; How-To</title>
	<atom:link href="http://mondaybynoon.com/tag/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://mondaybynoon.com</link>
	<description>A resource for Web designers and developers to read about and discuss their craft.</description>
	<lastBuildDate>Wed, 08 Feb 2012 13:49:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>&#8226; Installing and Running WebKit in Linux Using Qt</title>
		<link>http://mondaybynoon.com/feeder/?FeederAction=clicked&#038;feed=Posts+%28RSS2%29&#038;seed=http%3A%2F%2Fmondaybynoon.com%2F20070423%2Finstalling-and-running-webkit-in-linux-using-qt%2F&#038;seed_title=%26%238226%3B+Installing+and+Running+WebKit+in+Linux+Using+Qt</link>
		<comments>http://mondaybynoon.com/20070423/installing-and-running-webkit-in-linux-using-qt/#comments</comments>
		<pubDate>Mon, 23 Apr 2007 09:38:46 +0000</pubDate>
		<dc:creator>Jonathan Christopher</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Workbench]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[rendering-engine]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://mondaybynoon.com/2007/04/23/installing-and-running-webkit-in-linux-using-qt/</guid>
		<description><![CDATA[Running WebKit in Linux is quite easy now that it has been ported to Qt.  This article is a walk through on installing WebKit in Ubuntu Feisty 7.04.<br /><p><a href='http://rss.buysellads.com/click.php?z=1269068&k=2ee344414ac81fbb0f9de6ab08e9831e&a=76&c=591350731' target='_blank' rel='nofollow'>
				<img src='http://rss.buysellads.com/img.php?z=1269068&k=2ee344414ac81fbb0f9de6ab08e9831e&a=76&c=591350731' border='0' alt='' /></a></p><p><a href='http://buysellads.com/buy/sitedetails/pubkey/2ee344414ac81fbb0f9de6ab08e9831e/zone/1269068' target='_blank'>Advertise here with BSA</a></p>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m coming to appreciate more and more all of the hard work software developers perform.  I wouldn&#8217;t consider myself an open source <a href="http://en.wikipedia.org/wiki/Elitism">elitist</a>, but there&#8217;s something special about the associated ideologies.  When a large community of people band together to work on a project, a lot of fantastic products can be created.</p>
<p>One such product is <a href="http://webkit.org/">WebKit</a>, the open source Web browser rendering engine used by <a href="http://www.apple.com/safari">Safari</a> (as well as a number of other products).  It&#8217;s very important to keep in mind that Safari and WebKit are two very different things.  Safari is a Web browser that uses WebKit as it&#8217;s <a href="http://en.wikipedia.org/wiki/Rendering_engine">rendering engine</a>.</p>
<p>The WebKit developers put forth the effort to port WebKit to <a href="http://www.trolltech.com/products/qt">Qt</a>, which is, as stated by the developers:</p>
<blockquote cite="http://www.trolltech.com/products/qt/features/index"><p>Qt is a comprehensive development framework that includes an extensive array of features, capabilities and tools that enable development of high-performance, cross-platform rich-client and server-side applications.</p>
</blockquote>
<p>Qt is truly cross-platform and allows deployment on a wide range of hardware configurations, as opposed to other &#8220;cross-platform&#8221; products that are restricted to <a href="http://www.microsoft.com/windows/">Windows</a> and <a href="http://www.apple.com/macosx/">Mac OS X</a>.  The fact that the WebKit developers put forth the effort of porting to <a href="http://www.trolltech.com/products/qt/whatsnew">Qt4</a> gives users the ability to run their rendering engine on any platform.  Thanks to their hard work, it&#8217;s quite easy to run a WebKit-based browser in Linux.</p>
<h2>Preparing your Linux system for WebKit</h2>
<p>I&#8217;d like to be explicit in saying that the following instructions are geared towards a fresh install of <a href="http://www.ubuntu.com">Ubuntu</a> 7.04, but should be applicable to a wide variety of Linux distributions. First and foremost you&#8217;ll need to <a href="http://ubuntuguide.org/wiki/Ubuntu:Feisty#How_to_add_extra_repositories">add extra repositories</a>.  After you have followed those steps we can begin.</p>
<p>There are a number of packages you&#8217;ll need to successfully build a Qt4 Web browser that uses WebKit.</p>
<pre><kbd>sudo apt-get install libqt4-dev libxslt-dev gperf bison libsqlite3-dev flex build-essential subversion</kbd></pre>
<p>There will be a lot of additional packages to install, so don&#8217;t be surprised if the list of packages for installation is significantly large.</p>
<h2>Obtaining a nightly build of WebKit</h2>
<p>Next, we&#8217;ll need to use <a href="http://subversion.tigris.org/">Subversion</a> to check out the WebKit source.  The following command will check out files to a folder titled <code>WebKit</code> within your working directory, so be sure your working directory is appropriate (I used my <code>home</code> directory).</p>
<pre><kbd>svn checkout http://svn.webkit.org/repository/webkit/trunk WebKit</kbd></pre>
<p>You will be able to monitor the checkout process as each file is listed in your terminal.</p>
<p><span id="more-76"></span></p>
<p class="screenshot"><img src="/images/webkit/01-svn-checkout.jpg" alt="Screenshot of Subversion checking out WebKit" /></p>
<p>The checkout will take some time, as there are quite a few files to download.  When the checkout is complete, you&#8217;ll see the following message:</p>
<p class="screenshot"><img src="/images/webkit/02-svn-checkout-complete.jpg" alt="Screenshot of a completed Subversion checkout" /></p>
<h2>Building your Qt4 WebKit browser</h2>
<p>When the checkout is complete, you can initiate the build of your Qt4 WebKit browser using the following command:</p>
<pre><kbd>QTDIR=/usr/share/qt4/ WebKit/WebKitTools/Scripts/build-webkit</kbd></pre>
<p>The script will take a minute to prepare the build, and then the process will begin.</p>
<p class="screenshot"><img src="/images/webkit/03-build-read.jpg" alt="Screenshot of building a WebKit browser" /></p>
<p>This step can take quite a bit of time depending on your hardware configuration, so take a few minutes to have a cup of coffee and relax while your browser is being built.  Your terminal will scroll with hundreds of lines of build commands and more, so don&#8217;t feel the need to sit and watch it build (unless you&#8217;re interested &#8212; I was).</p>
<p class="screenshot"><img src="/images/webkit/04-build.jpg" alt="Screenshot of building a WebKit browser" /></p>
<p>When your build is complete, you&#8217;ll see the following message:</p>
<p class="screenshot"><img src="/images/webkit/05-build-complete.jpg" alt="Screenshot of a successful build of a Qt4 Web browser using WebKit" /></p>
<h2>Running the browser</h2>
<p>A successful build means you can run your Qt4 WebKit browser using the following command:</p>
<pre><kbd>WebKit/WebKitBuild/Release/WebKitQt/QtLauncher/QtLauncher about:blank</kbd></pre>
<p>A very basic browser window will appear with limited controls and an address bar.  There will be some information scrolling in your terminal, but it can generally be disregarded.</p>
<p class="screenshot"><img src="/images/webkit/06-qt4-webkit.jpg" alt="Screenshot of a Qt4 Web browser using WebKit" /></p>
<p>You&#8217;ve now got a native WebKit browser to play around with in Linux.  I took a second to attach the launch command to an entry in an panel using the WebKit icon.  It&#8217;s more convenient than keeping the command saved somewhere to copy and paste when I&#8217;d like to test in WebKit.</p>
<p class="icon"><img src="/images/webkit/webkit-icon.png" alt="WebKit Icon" /></p>
<p>You can also add your WebKit browser as an entry in your Applications menu using the menu editor if you prefer.</p>
<h3>Some quirks I&#8217;ve come across so far</h3>
<p>There are a few things that will appear out of place.  First and foremost, you&#8217;ll notice that form inputs will have, what seem to be, a random <code>background-color</code>.  I may be completely mistaken, but I haven&#8217;t looked into things deep enough to find the rhyme or reason behind the discrepancy.  From what I can tell, if the <code>input</code> is styled with <abbr title="Cascading Style Sheets">CSS</abbr>, the style takes precedence over any &#8216;default&#8217; colorization.</p>
<p>The next issue I&#8217;ve come across is that you&#8217;re not able to work with <code>xHttpRequest</code>.  This is another issue I have not researched in enough detail, but if anyone has any insight regarding an inability to make use of <abbr title="xHttpRequest">XHR</abbr>, I&#8217;d be interested in reading about it.</p>
<p>Finally, the only other quirk I&#8217;ve come across so far is that you&#8217;ll need to include <code>http://</code> in any <abbr title="Uniform Resource Locator">URL</abbr> you enter in the address bar.  While this may seem like a small detail to write about, after my first successful build I spent a few minutes thinking that something went wrong.</p>
<h4>Things to keep in mind</h4>
<p>Perhaps the most important thing to keep in mind is that you&#8217;re running a nightly build of WebKit, not the build Safari is using.  The nightly versions are much more advanced than Safari&#8217;s WebKit, so some of the quirks that appear in Safari may be handled in your Qt4 browser.</p>
<p>Due to the version discrepancy, you can&#8217;t depend on a nightly build of WebKit sufficing for a legitimate test in Safari.  It is useful, however, to take a quick look at overall structural elements of your designs before making the effort of moving to an OS X machine.</p>
<h5>Footnotes and inspiration</h5>
<p>I was originally drawn to working with WebKit on Linux by <a href="http://kryogenix.org/days/2007/04/08/webkit-browser-on-linux" title="Running WebKit on Linux">a post on the same subject</a> at <a href="http://www.kryogenix.org/days/">as days pass by</a>.  I had followed his instructions and ran into a few issues.  Going on his advice, I joined <code>#webkit</code> on <code>irc.freenode.net</code> and started discussing a few issues with one of the developers there.  He (or she) was <em>extremely helpful</em> in assisting me to successfully build WebKit.  I was also directed to a <a href="http://trac.webkit.org/projects/webkit/wiki/BuildingQtOnLinux" title="Building Qt on Linux">Wiki page</a> which included similar instructions to the post on <cite>as days pass by</cite>.  I felt compelled to write this post based on specific instructions surrounding Ubuntu Feisty but would like to give much credit to the hard work of others.</p>
<br /><p><a href='http://rss.buysellads.com/click.php?z=1269068&k=2ee344414ac81fbb0f9de6ab08e9831e&a=76&c=1544592489' target='_blank' rel='nofollow'>
				<img src='http://rss.buysellads.com/img.php?z=1269068&k=2ee344414ac81fbb0f9de6ab08e9831e&a=76&c=1544592489' border='0' alt='' /></a></p><p><a href='http://buysellads.com/buy/sitedetails/pubkey/2ee344414ac81fbb0f9de6ab08e9831e/zone/1269068' target='_blank'>Advertise here with BSA</a></p>]]></content:encoded>
			<wfw:commentRss>http://mondaybynoon.com/20070423/installing-and-running-webkit-in-linux-using-qt/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Database Caching 1/47 queries in 0.046 seconds using apc
Object Caching 482/528 objects using apc

Served from: www.mondaybynoon.com @ 2012-02-11 08:34:42 -->
