<?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>Rob Golding &#187; Technology</title>
	<atom:link href="http://www.robgolding.com/blog/category/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.robgolding.com</link>
	<description>Technology Consultant</description>
	<lastBuildDate>Mon, 07 Jun 2010 22:04:06 +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>Fixing Google Chrome&#8217;s 100% CPU Usage on Ubuntu</title>
		<link>http://www.robgolding.com/blog/2010/06/07/fixing-google-chromes-100-cpu-usage-on-ubuntu/</link>
		<comments>http://www.robgolding.com/blog/2010/06/07/fixing-google-chromes-100-cpu-usage-on-ubuntu/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 22:04:06 +0000</pubDate>
		<dc:creator>Rob Golding</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[google-chrome]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.robgolding.com/?p=406</guid>
		<description><![CDATA[I've been battling with this issue for a couple of months now, ever since I upgraded to Ubuntu 10.04 on my main desktop machine. Google Chrome would constantly max out one core, with no indication of what it was doing, or why.
Today, I finally solved the issue. It turns out that something to do with [...]]]></description>
			<content:encoded><![CDATA[<p>I've been battling with this issue for a couple of months now, ever since I upgraded to Ubuntu 10.04 on my main desktop machine. Google Chrome would constantly max out one core, with no indication of what it was doing, or why.</p>
<p>Today, I finally solved the issue. It turns out that something to do with the <code>m4</code> package was causing the error, with the following output:</p>
<pre>MozPlugger: Error: Failed to execute m4.
Mozplugger: M4 parsing of config generated error</pre>
<p>So, I checked out the package in question, and found that it wasn't installed. To my great relief (and some frustration), a simple</p>
<pre>sudo apt-get install m4</pre>
<p>fixed the problem instantly.</p>
<p>I only hope that this post solves this extremely annoying issue for someone else.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-center">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.robgolding.com/blog/2010/06/07/fixing-google-chromes-100-cpu-usage-on-ubuntu/&amp;title=Fixing+Google+Chrome%27s+100%25+CPU+Usage+on+Ubuntu" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.robgolding.com/blog/2010/06/07/fixing-google-chromes-100-cpu-usage-on-ubuntu/&amp;title=Fixing+Google+Chrome%27s+100%25+CPU+Usage+on+Ubuntu" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.robgolding.com/blog/2010/06/07/fixing-google-chromes-100-cpu-usage-on-ubuntu/&amp;title=Fixing+Google+Chrome%27s+100%25+CPU+Usage+on+Ubuntu" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.robgolding.com/blog/2010/06/07/fixing-google-chromes-100-cpu-usage-on-ubuntu/&amp;title=Fixing+Google+Chrome%27s+100%25+CPU+Usage+on+Ubuntu" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.robgolding.com/blog/2010/06/07/fixing-google-chromes-100-cpu-usage-on-ubuntu/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.robgolding.com/blog/2010/06/07/fixing-google-chromes-100-cpu-usage-on-ubuntu/&amp;t=Fixing+Google+Chrome%27s+100%25+CPU+Usage+on+Ubuntu" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Fixing+Google+Chrome%27s+100%25+CPU+Usage+on+Ubuntu+-+http://tinyurl.com/23733ku+&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.robgolding.com/blog/2010/06/07/fixing-google-chromes-100-cpu-usage-on-ubuntu/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.robgolding.com/blog/2010/06/07/fixing-google-chromes-100-cpu-usage-on-ubuntu/&amp;n=Fixing+Google+Chrome%27s+100%25+CPU+Usage+on+Ubuntu&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://www.robgolding.com/?ak_action=api_record_view&id=406&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.robgolding.com/blog/2010/06/07/fixing-google-chromes-100-cpu-usage-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Backtrac Implementation &#8211; The Major Decisions</title>
		<link>http://www.robgolding.com/blog/2010/06/03/backtrac-implementation-the-major-decisions/</link>
		<comments>http://www.robgolding.com/blog/2010/06/03/backtrac-implementation-the-major-decisions/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 09:09:50 +0000</pubDate>
		<dc:creator>Rob Golding</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[amqp]]></category>
		<category><![CDATA[backtrac]]></category>
		<category><![CDATA[piston]]></category>
		<category><![CDATA[university]]></category>

		<guid isPermaLink="false">http://www.robgolding.com/?p=393</guid>
		<description><![CDATA[Thinking a lot about my 3rd year project, I've been considering how to implement a backup system based around a Django server. So far, I have reached the conclusion that the system will consist of three main parts:

The Django server (yet to be named)
The client daemon (backtracd)
The backup library itself (backuplib)

As I mentioned in the [...]]]></description>
			<content:encoded><![CDATA[<p>Thinking a lot about my <a title="3rd Year Project: Back to Backtrac" href="http://www.robgolding.com/blog/2010/05/25/3rd-year-project-back-to-backtrac/">3rd year project</a>, I've been considering how to implement a backup system based around a Django server. So far, I have reached the conclusion that the system will consist of three main parts:</p>
<ul>
<li>The Django server (yet to be named)</li>
<li>The client daemon (<em>backtracd</em>)</li>
<li>The backup library itself (<em>backuplib</em>)</li>
</ul>
<p><span id="more-393"></span>As I mentioned in the previous post, the Django server will be based around <a title="Celery Project" href="http://celeryproject.org/" target="_blank">Celery</a>. This will offer me the ability to schedule a task for a certain date and time in the future, which is a huge part of the implementation taken care of.</p>
<p>One thing I am yet to figure out, however, is how the server will communicate with the client daemons. At the moment I'm thinking <a title="XML-RPC" href="http://www.xmlrpc.com/" target="_blank">XML-RPC</a>, but it seems to me that it will end up a sort of mish-mash of different technologies - as the Django server will be exposing a JSON API (probably via <a title="django-piston" href="http://bitbucket.org/jespern/django-piston/" target="_blank">Piston</a>). I have also considered running Django on the clients too, so everything can use JSON/Piston, but this seems at the moment like an unnecessary burden.</p>
<p>Another thing to consider is the <em>data</em> that is to be transmitted between the nodes. Should I use a bunch of fields in a JSON object to represent the success/failure of a job, and how much data was backed up, etc.? Another option is to pickle a Result object of some sort - representing a result as a Python instance to be interpreted by the server. These are the things I love to think about when designing a system, and I'll certainly have plenty to write about in the inevitable report.</p>
<p>Something I <em>can</em> work on in the meantime, however, is <strong><a title="backuplib" href="http://github.com/robgolding63/backuplib" target="_blank">backuplib</a></strong> - the client library that will actually copy the data. At the moment, it's just a wrapper around rsync/tar. That probably won't change, but it will need to get a bit smarter in the way it handles failures (and restores, of course) if it's going to make for the basis a decent backup system.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-center">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.robgolding.com/blog/2010/06/03/backtrac-implementation-the-major-decisions/&amp;title=Backtrac+Implementation+-+The+Major+Decisions" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.robgolding.com/blog/2010/06/03/backtrac-implementation-the-major-decisions/&amp;title=Backtrac+Implementation+-+The+Major+Decisions" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.robgolding.com/blog/2010/06/03/backtrac-implementation-the-major-decisions/&amp;title=Backtrac+Implementation+-+The+Major+Decisions" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.robgolding.com/blog/2010/06/03/backtrac-implementation-the-major-decisions/&amp;title=Backtrac+Implementation+-+The+Major+Decisions" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.robgolding.com/blog/2010/06/03/backtrac-implementation-the-major-decisions/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.robgolding.com/blog/2010/06/03/backtrac-implementation-the-major-decisions/&amp;t=Backtrac+Implementation+-+The+Major+Decisions" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Backtrac+Implementation+-+The+Major+Decisions+-+http://tinyurl.com/3xlchle+&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.robgolding.com/blog/2010/06/03/backtrac-implementation-the-major-decisions/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.robgolding.com/blog/2010/06/03/backtrac-implementation-the-major-decisions/&amp;n=Backtrac+Implementation+-+The+Major+Decisions&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://www.robgolding.com/?ak_action=api_record_view&id=393&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.robgolding.com/blog/2010/06/03/backtrac-implementation-the-major-decisions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django Staging Server: Apache Configuration</title>
		<link>http://www.robgolding.com/blog/2010/05/07/django-staging-server-apache-configuration/</link>
		<comments>http://www.robgolding.com/blog/2010/05/07/django-staging-server-apache-configuration/#comments</comments>
		<pubDate>Fri, 07 May 2010 20:10:44 +0000</pubDate>
		<dc:creator>Rob Golding</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[wsgi]]></category>

		<guid isPermaLink="false">http://www.robgolding.com/?p=331</guid>
		<description><![CDATA[In this post, I'd like to talk a little about how my staging server (called Kaylee, after the character from Firefly), is configured to run the multiple Django projects that I have on the go. A lot of the other articles I have read on this subject use mod_python but my server is configured to [...]]]></description>
			<content:encoded><![CDATA[<p>In this post, I'd like to talk a little about how my staging server (called Kaylee, after the <a title="Kaylee" href="http://en.wikipedia.org/wiki/List_of_Firefly_characters#Kaylee_Frye" target="_blank">character</a> from <a title="Firefly" href="http://en.wikipedia.org/wiki/Firefly_(TV_series)" target="_blank">Firefly</a>), is configured to run the multiple <a title="Django Project" href="http://www.djangoproject.com/" target="_blank">Django</a> projects that I have on the go. A lot of the other articles I have read on this subject use <code>mod_python</code> but my server is configured to use <a title="WSGI" href="http://wsgi.org/wsgi/" target="_blank">WSGI</a>, so that's what I will be going over in this post.</p>
<p><span id="more-331"></span></p>
<h3>Beginnings</h3>
<p>Firstly, I use <a title="virtualenv" href="http://virtualenv.openplans.org" target="_blank">virtualenv</a> to keep the Python environments for the different projects separate, but that's a topic in itself. This isn't a requirement, but it helps if you have dependencies that you don't want installed system-wide, or projects that use different versions of a particular package.</p>
<p>You can read more about virtualenv and Django <a title="Notes on using pip and virtualenv with Django" href="http://www.saltycrane.com/blog/2009/05/notes-using-pip-and-virtualenv-django/" target="_blank">here</a>.</p>
<p>The directory structure for my <code>webapps</code> directory (which lives inside <code>/home/</code>) looks something like this:</p>
<pre>webapps/
|-- apache
|   |-- coral.conf
|   |-- coral.wsgi
|   |-- myuni.conf
|   `-- myuni.wsgi
|-- coral
|   |-- env
|   `-- repository
|-- myuni
|   |-- env
|   `-- repository</pre>
<p>The two projects shown here are <a title="Coral Issue Tracker" href="http://bitbucket.org/robgolding63/coral" target="_blank">Coral Issue Tracker</a> and <a title="MyUni" href="http://bitbucket.org/robgolding63/myuni" target="_blank">MyUni</a>. The directory for each project contains the virtual env for that project, and the repository. Alongside the project folders is a directory called <code>apache</code>, which holds two files for each project: the WSGI file (<code>&lt;project-name&gt;.wsgi</code>) and the Apache configuration file (<code>&lt;project-name&gt;.conf</code>).</p>
<h3>Apache Configuration</h3>
<p>Then, in the main Apache configuration, I use a directive that includes all these files automatically:</p>
<pre class="apache"><span style="color: #00007f;">Include</span>    /home/webapps/apache/*.conf</pre>
<p>The individual project configuration files then contain a set of simple directives almost straight from the Django <a title="Using Django with Apache and mod_wsgi" href="http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/" target="_blank">deployment documentation</a>. For example, the MyUni configuration looks like this:</p>
<pre class="apache">WSGIScriptAlias  /myuni        /home/webapps/apache/myuni.wsgi
<span style="color: #00007f;">Alias</span>            /myuni/docs   /home/webapps/myuni/repository/docs/_build/html
<span style="color: #00007f;">Alias</span>            /myuni/media  /home/webapps/myuni/repository/myuni/static</pre>
<h3>WSGI Files</h3>
<p>The WSGI files are also pretty simple, though there are a couple of things worth explaining. Here is the WSGI file for the MyUni project:</p>
<pre class="python"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">site</span>
&nbsp;
<span style="color: #dc143c;">os</span>.<span style="color: black;">environ</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'PYTHON_EGG_CACHE'</span><span style="color: black;">&#93;</span> = <span style="color: #483d8b;">'/tmp/myuni/egg_cache'</span>
&nbsp;
root_dir = <span style="color: #483d8b;">'/home/webapps/myuni/env'</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># with mod_wsgi &amp;gt;= 2.4, this line will add this path in front of the python path</span>
<span style="color: #dc143c;">site</span>.<span style="color: black;">addsitedir</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>root_dir, <span style="color: #483d8b;">'lib/python2.6/site-packages'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #dc143c;">sys</span>.<span style="color: black;">path</span>.<span style="color: black;">append</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'/home/webapps/myuni/repository'</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #dc143c;">os</span>.<span style="color: black;">environ</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'DJANGO_SETTINGS_MODULE'</span><span style="color: black;">&#93;</span> = <span style="color: #483d8b;">'myuni.settings'</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> django.<span style="color: black;">core</span>.<span style="color: black;">handlers</span>.<span style="color: black;">wsgi</span>
&nbsp;
application = django.<span style="color: black;">core</span>.<span style="color: black;">handlers</span>.<span style="color: black;">wsgi</span>.<span style="color: black;">WSGIHandler</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre>
<p>The <code>site.addsitedir()</code> call in the WSGI file adds the library path in the virtual environment to the python path, by inspecting it to find all the packages that are installed. I then append the path to the project's repository to the path also, as is standard practice in this type of deployment.</p>
<p>The only other thing worth mentioning here, is the <code>PYTHON_EGG_CACHE</code> variable that I add to the environment. This is required if you are using Python modules that are packaged up as eggs, so that Apache can uncompress them in a directory to which it can write (<code>/tmp/</code> on Ubuntu is 777 by default). If you are not using eggs, you can skip this line out altogether. Alternatively, you can uncompress the eggs first:</p>
<pre class="bash">$ <span style="color: #c20cb9; font-weight: bold;">unzip</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>package<span style="color: #7a0874; font-weight: bold;">&#93;</span>.egg</pre>
<p>You can read more about this issue, and the workaround, <a title="Django: PYTHON_EGG_CACHE, access denied error" href="http://stackoverflow.com/questions/1855219/django-python-egg-cache-access-denied-error" target="_blank">here</a>.</p>
<h3>Summary</h3>
<p>That's pretty much all there is to it. This setup also makes it pretty easy to deploy new versions of my projects, for which I have started using <a title="Fabric v0.9" href="http://docs.fabfile.org/0.9.0/" target="_blank">Fabric</a>. I'll save that for another post though.</p>
<p>If you do things differently, then I'd love to hear about how - so please leave a comment!</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-center">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.robgolding.com/blog/2010/05/07/django-staging-server-apache-configuration/&amp;title=Django+Staging+Server%3A+Apache+Configuration" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.robgolding.com/blog/2010/05/07/django-staging-server-apache-configuration/&amp;title=Django+Staging+Server%3A+Apache+Configuration" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.robgolding.com/blog/2010/05/07/django-staging-server-apache-configuration/&amp;title=Django+Staging+Server%3A+Apache+Configuration" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.robgolding.com/blog/2010/05/07/django-staging-server-apache-configuration/&amp;title=Django+Staging+Server%3A+Apache+Configuration" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.robgolding.com/blog/2010/05/07/django-staging-server-apache-configuration/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.robgolding.com/blog/2010/05/07/django-staging-server-apache-configuration/&amp;t=Django+Staging+Server%3A+Apache+Configuration" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Django+Staging+Server%3A+Apache+Configuration+-+http://tinyurl.com/2wcoueu+&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.robgolding.com/blog/2010/05/07/django-staging-server-apache-configuration/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.robgolding.com/blog/2010/05/07/django-staging-server-apache-configuration/&amp;n=Django+Staging+Server%3A+Apache+Configuration&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://www.robgolding.com/?ak_action=api_record_view&id=331&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.robgolding.com/blog/2010/05/07/django-staging-server-apache-configuration/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Extending Settings Variables with local_settings.py in Django</title>
		<link>http://www.robgolding.com/blog/2010/05/03/extending-settings-variables-with-local_settings-py-in-django/</link>
		<comments>http://www.robgolding.com/blog/2010/05/03/extending-settings-variables-with-local_settings-py-in-django/#comments</comments>
		<pubDate>Mon, 03 May 2010 14:33:33 +0000</pubDate>
		<dc:creator>Rob Golding</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.robgolding.com/?p=317</guid>
		<description><![CDATA[I discovered this hacky way to use the local_settings trick to extend and/or override values in the main Django settings file today. Some projects use a "reverse" version of the local_settings trick (which is explained below), whereby the main settings file becomes settings_local.py or something similar, which first imports settings.py, and then extends or overrides [...]]]></description>
			<content:encoded><![CDATA[<p>I discovered this hacky way to use the local_settings trick to extend and/or override values in the main Django settings file today. Some projects use a "reverse" version of the local_settings trick (which is explained below), whereby the <strong>main</strong> settings file becomes <em>settings_local.py</em> or something similar, which first imports <em>settings.py</em>, and then extends or overrides the values as required.<span id="more-317"></span></p>
<p>I didn't want to change the name of the project settings file to <em>settings_local</em>, however, as it would mean changing the WSGI file on every server that the project runs on.</p>
<h3>The local_settings Trick</h3>
<p>It's a well-known trick to use a file called <em>local_settings.py</em> or something similar, with a piece of code at the bottom of the main settings file:</p>
<pre class="python"><span style="color: #ff7700;font-weight:bold;">try</span>:
    <span style="color: #ff7700;font-weight:bold;">from</span> local_settings <span style="color: #ff7700;font-weight:bold;">import</span> *
<span style="color: #ff7700;font-weight:bold;">except</span>:
    <span style="color: #ff7700;font-weight:bold;">pass</span></pre>
<p>to override the value of settings variables. This will not work, however, if you wish to <em>extend</em> a settings variable (for example, adding an app to INSTALLED_APPS). For this, I have found that the following ugly hack seems to do the job.</p>
<h3>The Ugly Hack</h3>
<p>Replace the snippet at the bottom of the main settings file with the following code</p>
<pre class="python"><span style="color: #ff7700;font-weight:bold;">try</span>:
    LOCAL_SETTINGS
<span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">NameError</span>:
    <span style="color: #ff7700;font-weight:bold;">try</span>:
        <span style="color: #ff7700;font-weight:bold;">from</span> local_settings <span style="color: #ff7700;font-weight:bold;">import</span> *
    <span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">ImportError</span>:
        <span style="color: #ff7700;font-weight:bold;">pass</span></pre>
<p>What this is doing is effectively checking for the presence of a variable called LOCAL_SETTINGS. The local_settings file then contains this code:</p>
<pre class="python">LOCAL_SETTINGS = <span style="color: #008000;">True</span>
<span style="color: #ff7700;font-weight:bold;">from</span> settings <span style="color: #ff7700;font-weight:bold;">import</span> *</pre>
<p>This means that the local_settings file will only be imported once, and it has all the variables in the main settings file available to extend at will. For example, to enable the Django debug toolbar:</p>
<pre class="python">MIDDLEWARE_CLASSES += <span style="color: black;">&#40;</span><span style="color: #483d8b;">'debug_toolbar.middleware.DebugToolbarMiddleware'</span>,<span style="color: black;">&#41;</span>
INTERNAL_IPS = <span style="color: black;">&#40;</span><span style="color: #483d8b;">'127.0.0.1'</span>,<span style="color: black;">&#41;</span>
INSTALLED_APPS += <span style="color: black;">&#40;</span><span style="color: #483d8b;">'debug_toolbar'</span>,<span style="color: black;">&#41;</span></pre>
<p>The code is ugly (and results in the main settings file being parsed <em>twice</em>) but it works!</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-center">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.robgolding.com/blog/2010/05/03/extending-settings-variables-with-local_settings-py-in-django/&amp;title=Extending+Settings+Variables+with+local_settings.py+in+Django" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.robgolding.com/blog/2010/05/03/extending-settings-variables-with-local_settings-py-in-django/&amp;title=Extending+Settings+Variables+with+local_settings.py+in+Django" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.robgolding.com/blog/2010/05/03/extending-settings-variables-with-local_settings-py-in-django/&amp;title=Extending+Settings+Variables+with+local_settings.py+in+Django" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.robgolding.com/blog/2010/05/03/extending-settings-variables-with-local_settings-py-in-django/&amp;title=Extending+Settings+Variables+with+local_settings.py+in+Django" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.robgolding.com/blog/2010/05/03/extending-settings-variables-with-local_settings-py-in-django/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.robgolding.com/blog/2010/05/03/extending-settings-variables-with-local_settings-py-in-django/&amp;t=Extending+Settings+Variables+with+local_settings.py+in+Django" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Extending+Settings+Variables+with+local_settings.py+in+Django+-+http://tinyurl.com/339kgcy+&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.robgolding.com/blog/2010/05/03/extending-settings-variables-with-local_settings-py-in-django/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.robgolding.com/blog/2010/05/03/extending-settings-variables-with-local_settings-py-in-django/&amp;n=Extending+Settings+Variables+with+local_settings.py+in+Django&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://www.robgolding.com/?ak_action=api_record_view&id=317&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.robgolding.com/blog/2010/05/03/extending-settings-variables-with-local_settings-py-in-django/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>MyUni and Django 1.2</title>
		<link>http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/</link>
		<comments>http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 12:59:36 +0000</pubDate>
		<dc:creator>Rob Golding</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[university]]></category>
		<category><![CDATA[mercurial]]></category>
		<category><![CDATA[myuni]]></category>

		<guid isPermaLink="false">http://www.robgolding.com/?p=294</guid>
		<description><![CDATA[MyUni is hailed as my "latest venture" on the front page of my website. In fact, it was conceived early last year, when I was in my first year at Nottingham University, by Rob Miles and Ben Jenkinson. We were only just starting to get to grips with this new fad, called Django.
The project has [...]]]></description>
			<content:encoded><![CDATA[<p><a title="MyUni" href="http://bitbucket.org/robgolding63/myuni/wiki" target="_blank">MyUni</a> is hailed as my "latest venture" on the front page of my website. In fact, it was conceived early last year, when I was in my first year at Nottingham University, by <a title="Robert S. K. Miles" href="http://robertskmiles.com" target="_blank">Rob Miles</a> and <a title="Ben Jenkinson" href="http://benjenkinson.com" target="_blank">Ben Jenkinson</a>. We were only just starting to get to grips with this new fad, called <a title="Django Project" href="http://djangoproject.com" target="_blank">Django</a>.<span id="more-294"></span></p>
<p>The project has gone through several iterations since then, never really reaching any form of completeness. This time round, we are using proper version control (thanks to <a title="Mercurial SCM" href="http://selenic.com/mercurial" target="_blank">Mercurial</a> and <a title="BitBucket" href="http://bitbucket.org" target="_blank">BitBucket</a>), and trying to adhere to Django best practices as much as possible.</p>
<p>Straight from the repository website:</p>
<blockquote><p>MyUni is a portal-style web application for Universities, offering students a central location to access all the relevant information about their course, modules, assignments, and staff members.</p></blockquote>
<p>The project came about because of a passionate hatred for the WebCT system that our university is using, and a general feeling that things could be (and should be) better.</p>
<p>Django 1.2 will bring some really exciting <a title="Django 1.2 Release Notes" href="http://docs.djangoproject.com/en/dev/releases/1.2/" target="_blank">new features</a>, which I am sure would make developing and using MyUni a better experience. One of the things I'm most looking forward to using is the messages framework. I plan to use it for a bunch of things, possibly including form error messages...maybe.</p>
<p>Now, if only the release date would stay in the same place for more than a week!</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-center">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/&amp;title=MyUni+and+Django+1.2" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/&amp;title=MyUni+and+Django+1.2" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/&amp;title=MyUni+and+Django+1.2" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/&amp;title=MyUni+and+Django+1.2" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/&amp;t=MyUni+and+Django+1.2" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=MyUni+and+Django+1.2+-+http://tinyurl.com/2drhnmo+&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/&amp;n=MyUni+and+Django+1.2&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://www.robgolding.com/?ak_action=api_record_view&id=294&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Section Numbering in LaTeX</title>
		<link>http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/</link>
		<comments>http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 22:54:16 +0000</pubDate>
		<dc:creator>Rob Golding</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[university]]></category>

		<guid isPermaLink="false">http://www.robgolding.com/?p=183</guid>
		<description><![CDATA[For our last coursework (which was for a really interesting compilers module), I chose to present my answers in LaTeX. It's been a very steep learning curve, but I'm extremely happy with the results. I don't even mind the slight drop in productivity that's caused by my uncontrollable urge to stop and admire my document [...]]]></description>
			<content:encoded><![CDATA[<p>For our last coursework (which was for a really interesting <a title="G52CMP" href="http://www.cs.nott.ac.uk/~nhn/G52CMP/" target="_blank">compilers</a> module), I chose to present my answers in <a title="LaTeX" href="http://www.latex-project.org/" target="_blank">LaTeX</a>. It's been a very steep learning curve, but I'm extremely happy with the results. I don't even mind the slight drop in productivity that's caused by my uncontrollable urge to stop and admire my document every so often! One thing that had me stuck for a while, however, was the automatic section numbering system.</p>
<p>To answer the questions for the compilers coursework, I wanted my <em>section</em>s to be numbered (1, 2, 3), my <em>subsection</em>s to be numbered (a, b, c), and my <em>subsubsection</em>s to be numbered (i, ii, iii). This numbering pattern matches that which is given in the question paper, whereby a number of nested <em>enumerate</em>s were used. The default LaTeX section numbering however is (1, 1.1, 1.1.1). I finally found a way to alter this default behaviour by using the following code in the preamble:</p>
<pre class="latex"> <span style="color: #800000; font-weight: normal;">\renewcommand</span>{<span style="color: #2222D0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\thesubsection</span>}{(<span style="color: #800000; font-weight: normal;">\alph</span>{subsection})</span>}
&nbsp;
<span style="color: #800000; font-weight: normal;">\renewcommand</span>{<span style="color: #2222D0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\thesubsubsection</span>}{<span style="color: #800000; font-weight: normal;">\roman</span>{subsection}.</span>}</pre>
<p>This code modifies the way that the counters for subsections and subsubsections are printed (section counters are correct when left at the default).</p>
<p>I hope this saves someone even the few minutes it took me to work this out, once I'd applied some logic! It's very useful to know that LaTeX has a counter for <strong>everything</strong>. <a title="Counters in LaTeX" href="http://texblog.wordpress.com/2007/07/25/counters-in-latex/">This particular post</a> was very helpful in working out which ones to alter, and how.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-center">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/&amp;title=Custom+Section+Numbering+in+LaTeX" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/&amp;title=Custom+Section+Numbering+in+LaTeX" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/&amp;title=Custom+Section+Numbering+in+LaTeX" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/&amp;title=Custom+Section+Numbering+in+LaTeX" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/&amp;t=Custom+Section+Numbering+in+LaTeX" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Custom+Section+Numbering+in+LaTeX+-+http://tinyurl.com/yc26pbq+&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/&amp;n=Custom+Section+Numbering+in+LaTeX&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://www.robgolding.com/?ak_action=api_record_view&id=183&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Linux-Windows Integration (à la Likewise-Open &amp; Winbind)</title>
		<link>http://www.robgolding.com/blog/2009/12/24/linux-windows-integration-a-la-likewise-open-winbind/</link>
		<comments>http://www.robgolding.com/blog/2009/12/24/linux-windows-integration-a-la-likewise-open-winbind/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 16:12:47 +0000</pubDate>
		<dc:creator>Rob Golding</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Home Network]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://www.robgolding.com/?p=165</guid>
		<description><![CDATA[Recently, I've been doing a lot of work trying to integrate Linux &#38; Windows machines on a single network. The project begun with a need to allow windows users access to file shares using Samba, and Linux users access to the same data using NFS. As you may know, Samba (or more specifically the SMB [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I've been doing a lot of work trying to integrate Linux &amp; Windows machines on a single network. The project begun with a need to allow windows users access to file shares using Samba, and Linux users access to the same data using NFS. As you may know, Samba (or more specifically the SMB protocol) uses a username/password combination to authenticate users, while NFS uses user IDs and group IDs (UIDs &amp; GIDs) on the local machines to achieve the same end. Therefore, I needed a way to consistently authenticate Windows domain users on Linux machines, whilst maintaining a consistent conversion from SID -&gt; UID, and vice-versa.</p>
<p>Domain authentication can be achieved relatively simply, by using either <a title="Winbind" href="http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/winbind.html">Winbind</a> (part of the Samba project) or the new kid on the block, <a title="Likewise Open" href="http://www.likewise.com/products/likewise_open/">Likewise</a>. Likewise-Open offers a simple procedure for joining domains, and the new version comes packaged with it's own version of Kerberos. It also hashes the Windows SID into a UNIX UID in a consistent manner - so the UIDs are always the same across your entire environment. Sounds perfect, right? Well, no. Not quite. The problem with Likewise-Open, is that it's difficult to integrate with Samba. Though it does ship with a "compatibility module" called <strong>lwi_compat</strong>, which allows Samba to hook into Likewise's authentication module, I found this quite difficult to get working, and I only achieved partial success through guesswork - as the documentation didn't actually help much, given they only officially support Samba 3.0.x (while Ubuntu now uses 3.3.x). When I did get it going, however, it only recognised the Windows users' <strong>primary</strong> group, not any of the other groups they were members of. This meant that my (possibly overly) complex system of ACLs and user directories just didn't work at all. So, on to Plan B...</p>
<p>When I read through the short (but sweet) Ubuntu Wiki article entitled <a title="ActiveDirectoryWinbindHowto" href="https://help.ubuntu.com/community/ActiveDirectoryWinbindHowto" target="_blank">ActiveDirectoryWinbindHowto</a>, I felt like somewhat of a fool after reading a small, illusive section called <em>Adding more than one Linux machine to a Windows network.</em> Bingo! This section described a problem whereby the traditional Winbind domain authentication method would lead to inconsistent UIDs across the network, and thus cause headaches when trying to achieve anything like what I was aiming for. It suggested using a method of mapping SIDs to UIDs called <em>RID</em>. I assume this stands for <em>Relative ID</em>, which is another kind of ID Active Directory uses to track users within a domain. These <strong>can</strong> possibly clash from domain to domain, so it is advised not to use this method when your network contains a trust between multiple Windows domains, but for the simpler setup (like my own) it's a godsend.</p>
<p>This meant that I could use RID mapping within Winbind, which is part of Samba itself (so no troubles integrating those two), and achieve a consistent SID-UID mapping scheme across the network, allowing me to finally enable access to the file shares via. NFS. Amazingly, NFS "Just Worked" straight away, and I've written some nice wrapper programs around <strong>chown</strong>,<strong> getfacl</strong> and <strong>setfacl</strong> to set the correct owner and permissions on entire directory trees, which saves a lot of time when your UIDs are changing as often as mine were! I'm also using <strong>autofs</strong> to automatically map user's home directories on the Linux machines, which has proven itself to be very useful. I just used static <em>fstab</em> entries to map the other "general" file shares, like <em>software</em> and <em>media</em> - as I couldn't seem to get autofs direct maps working (apparently they are only partially working in Ubuntu anyway, but it seems as though they are completely broken to me).</p>
<p>On a side note, I've also just finished developing a Python-based rsync backup program, which allows me to write a _very_ small script to backup remote servers using rsync over SSH, and tar up the contents of all the servers into one archive. This is really useful, as I have a lot of disparate locations on different servers that all need to be pulled onto the backup drive every night. Now though, I should really concentrate on some revision for the exams I have after Christmas!</p>
<p>Happy holidays, everyone! (That's Merry Christmas and a happy new year, but just between you and me).</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-center">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.robgolding.com/blog/2009/12/24/linux-windows-integration-a-la-likewise-open-winbind/&amp;title=Linux-Windows+Integration+%28%C3%A0+la+Likewise-Open+%26+Winbind%29" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.robgolding.com/blog/2009/12/24/linux-windows-integration-a-la-likewise-open-winbind/&amp;title=Linux-Windows+Integration+%28%C3%A0+la+Likewise-Open+%26+Winbind%29" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.robgolding.com/blog/2009/12/24/linux-windows-integration-a-la-likewise-open-winbind/&amp;title=Linux-Windows+Integration+%28%C3%A0+la+Likewise-Open+%26+Winbind%29" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.robgolding.com/blog/2009/12/24/linux-windows-integration-a-la-likewise-open-winbind/&amp;title=Linux-Windows+Integration+%28%C3%A0+la+Likewise-Open+%26+Winbind%29" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.robgolding.com/blog/2009/12/24/linux-windows-integration-a-la-likewise-open-winbind/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.robgolding.com/blog/2009/12/24/linux-windows-integration-a-la-likewise-open-winbind/&amp;t=Linux-Windows+Integration+%28%C3%A0+la+Likewise-Open+%26+Winbind%29" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Linux-Windows+Integration+%28%C3%A0+la+Likewise-Open+%26+Winbind%29+-+http://tinyurl.com/yf9a4ue+&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.robgolding.com/blog/2009/12/24/linux-windows-integration-a-la-likewise-open-winbind/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.robgolding.com/blog/2009/12/24/linux-windows-integration-a-la-likewise-open-winbind/&amp;n=Linux-Windows+Integration+%28%C3%A0+la+Likewise-Open+%26+Winbind%29&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://www.robgolding.com/?ak_action=api_record_view&id=165&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.robgolding.com/blog/2009/12/24/linux-windows-integration-a-la-likewise-open-winbind/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exchange 2007 Autodiscover Issues</title>
		<link>http://www.robgolding.com/blog/2009/07/07/exchange-2007-autodiscover-issues/</link>
		<comments>http://www.robgolding.com/blog/2009/07/07/exchange-2007-autodiscover-issues/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 20:06:57 +0000</pubDate>
		<dc:creator>Rob Golding</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Home Network]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://www.robgolding.com/?p=150</guid>
		<description><![CDATA[Over the past week, I've been upgrading my e-mail system to Exchange 2007 (I was previously using Exchange '03). For me, it's very useful to have the systems that I write about, and consult for, installed at home in a "semi-production" manner. It means that I have a system to work on, and I am [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-154" style="margin: 0px 10px;" title="Exchange 2007 Logo" src="http://www.robgolding.com/wp-content/uploads/2009/07/exchange2007logo.jpg" alt="Exchange 2007 Logo" width="144" height="168" />Over the past week, I've been upgrading my e-mail system to Exchange 2007 (I was previously using Exchange '03). For me, it's very useful to have the systems that I write about, and consult for, installed at home in a "semi-production" manner. It means that I have a system to work on, and I am concerned with keeping it up and running as smoothly as possible - which introduces me to intricacies that I would not otherwise encounter, if I were just running a little test lab.</p>
<p>For example, when setting up Outlook Anywhere (the rebranded RPC/HTTP feature of Exchange, allowing Outlook users to connect from outside the organisation) I discovered a lot of "Sync Issues" appearing in my Inbox. The messages all had a common theme:</p>
<pre>11:19:07 Synchronizer Version 12.0.6315
11:19:07 Synchronizing Mailbox 'User'
11:19:07 Synchronizing Hierarchy
11:19:07 Done
11:19:09 Microsoft Exchange offline address book
11:19:09              Not downloading Offline address book files.  A server (URL) could not be located.
11:19:09       0X8004010F</pre>
<p>Clearly, something was wrong with the Offline Address Book. I was only getting these messages when using Outlook Anywhere, however, so this issue was obviously specific to RPC/HTTP.</p>
<p>Looking up the error code, I found that the problem I was experiencing was <strong>very</strong> common, but that nowhere seemed to have the ultimate repair. The information available was sparse, and I had to put together my own solution - which I will document below.</p>
<p>First, I registered an extra DNS (A) record for my email domain, called "autodiscover". I must be clear here, that this is for the mail domain, not for the domain used to access your OWA site. For example (and we'll go with the Microsoft classic here), if your users have addresses such as<em> user1@contoso.com</em>, <em>user2@contoso.com</em> and you access your OWA via <em>https://mail.contoso.com/owa</em>, then you need to register an A record for <strong>autodiscover.contoso.com</strong>.</p>
<p>Next, I prepared a new certificate request, that would hopefully end up with me obtaining a certificate that I could use to replace the current one, which would be valid for both <em>mail.contoso.com</em> and <em>autodiscover.contoso.com</em> (to continue with our example) - so that my Outlook clients could successfully access the autodiscover service, and download the OAB. To do this, I used the following EMS command:</p>
<pre class="dos">New-ExchangeCertificate -domainname mail.contoso.com, exchange.contoso.local, autodiscover.contoso.com -Friendlyname &quot;Contoso Exchange CAS SAN Certificate&quot; -generaterequest:$true -keysize <span style="">1024</span> -path c:\certrequest.req -privatekeyexportable:$true –subjectname &quot;c=GB o=contoso inc, CN=mail.contoso.com&quot;</pre>
<p>This command requires a little explanation. The<em> -domainname </em>switch is used to specify a list of addresses for which this server is valid. This is called a <strong>SAN </strong>(Subject Alternative Name). Not all CA's support SANs, but Windows Server 2008's CA Services does, which I will come back to later. Next, we give the certificate a "Friendly Name", which is just a reference for you, the administrator. Then we specify that we are looking to generate and save a request, and that we want to be able to export the private key. The <strong>Subject Name</strong> is important, but also slightly confusing. You must specify your country code (US, GB, ES), your organisation name, and Common Name (<strong>CN</strong>) - which is the most important one. This must be the URL used to access the SSL service using a web browser, so mine was <em>mail.contoso.com</em>.</p>
<p>Once this request is saved, I passed it on to my CA to get the certificate issued. If you're using a 3rd party CA (like VeriSign), then you'll have to check first whether they support SANs. I use self-signed certificates, and my CA is running Windows Server 2008, which does support SANs, so I issued the request internally. This is done by accessing the CertSrv website, at http://servername/certsrv, and clicking the "Request a Certificate" link. Then, I chose "Advanced Request", and pasted the reqest file's contents into the box, and picked the "Web Server" template.</p>
<p>This presented me with a downloadable certificate, which I saved locally in CER format on the exchange server. Then I used the following command to import the certificate:</p>
<pre class="dos">Import-ExchangeCertificate –path &lt;certificate&gt;</pre>
<p>Once the certificate was imported, I enabled it for use with exchange. A similar command is used for this:</p>
<pre class="dos">Enable-ExchangeCertificate</pre>
<p>This prompted for a list of services, where I entered <em>IMAP, IIS, SMTP</em> as these are the default installed services. Only IIS actually gets used here, so I shouldn't worry too much about this one. If you're not sure, then just enter the same as me. Lastly, it asked for a thumbprint, which I copied and pasted from the output of the import command. Finally, after accepting the confirmation, the certificate was enabled.</p>
<p>And that was it. Both OWA and Outlook Anywhere are now working perfectly, and hopefully this post will help at least one other lost soul with the same problem!</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-center">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.robgolding.com/blog/2009/07/07/exchange-2007-autodiscover-issues/&amp;title=Exchange+2007+Autodiscover+Issues" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.robgolding.com/blog/2009/07/07/exchange-2007-autodiscover-issues/&amp;title=Exchange+2007+Autodiscover+Issues" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.robgolding.com/blog/2009/07/07/exchange-2007-autodiscover-issues/&amp;title=Exchange+2007+Autodiscover+Issues" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.robgolding.com/blog/2009/07/07/exchange-2007-autodiscover-issues/&amp;title=Exchange+2007+Autodiscover+Issues" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.robgolding.com/blog/2009/07/07/exchange-2007-autodiscover-issues/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.robgolding.com/blog/2009/07/07/exchange-2007-autodiscover-issues/&amp;t=Exchange+2007+Autodiscover+Issues" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Exchange+2007+Autodiscover+Issues+-+http://tinyurl.com/yz9b3er+&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.robgolding.com/blog/2009/07/07/exchange-2007-autodiscover-issues/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.robgolding.com/blog/2009/07/07/exchange-2007-autodiscover-issues/&amp;n=Exchange+2007+Autodiscover+Issues&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://www.robgolding.com/?ak_action=api_record_view&id=150&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.robgolding.com/blog/2009/07/07/exchange-2007-autodiscover-issues/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Trials and Tribulations of Django + Git</title>
		<link>http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/</link>
		<comments>http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 21:23:10 +0000</pubDate>
		<dc:creator>Rob Golding</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[university]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.robgolding.com/?p=144</guid>
		<description><![CDATA[I just finished my last exam today - Web Programming and Scripting - which explains the distinct lack of activity around here in recent times. Thankfully I could end my exam season on a high, as web programming is, well, what I do - so it wasn't too much of a challenge!
Something strange happens to [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished my last exam today - Web Programming and Scripting - which explains the distinct lack of activity around here in recent times. Thankfully I could end my exam season on a high, as web programming is, well, what I do - so it wasn't too much of a challenge!</p>
<p>Something strange happens to me every time exams come around. I seem to pick up new projects, and just run with them. This time, I've become involved with a small group of people at university, writing a portal-style information system for universities. I suppose most people call this behavior procrastination, but I'm quite deeply in denial about that.</p>
<p><img class="alignleft" style="margin: 5px 10px;" title="Django Badge" src="http://media.djangoproject.com/img/badges/djangowish126x70.gif" alt="" width="126" height="70" />Ever since my post about the <a href="http://www.robgolding.com/index.php/2009/03/06/my-latest-project-backtrac-backup-system/">Backtrac Backup System</a>, I've been really enjoying using <a href="http://www.djangoproject.com/">Django</a>. Something about it just makes developing for the web, well, exciting. That can only be good, right? I am the designated server administrator for this latest project, mostly due to the fact that I am the only one with a server to administer, and some of the things I've learned so far seem worthy of a mention here.  Firstly, we as developers were - how can I put it - stepping on each other toes somewhat. The project at this point had no version control, so we were just editing a bunch of files over SFTP. Obviously, some sort of Source Control Management was in order. I did some research, and decided that Git was a nice, modern alternative to the ever-popular SVN. It also meant that my server was constantly backed up by everyone on the team - but that's just a bonus!</p>
<p>So, I installed Git, and started a repository. A lot of effort went into learning how the system works, and more importantly, how to make it work for us. Directed Acyclic Graphs thankfully made some sense to me, so I could just about understance the documentation. I wrote some custom hooks, and a C Program to syncronise the web-server. I was happy, and absolutely certain that this was the solution to all our woes. I was mistaken. Git just didn't work the way I had hoped. The custom hooks were throwing permission errors all over the place, and my development team (read: my friend Rob Miles) was locked out of the repository. We made the decision yesterday to scrap Git, and go back to the previous system of editing the files over SFTP. We are always in constant communication when developing for the project, so it's not too big a deal, but I feel that I failed as an adminisrator. You see, as an admin your job isn't just to play with cool toys and loud servers - your primary purpose is to give the users what they need to work, and that is most certainly not what I achieved.</p>
<p>I'm glad I took the time to learn Git - and I'm sure it will help me later in life, in some way or another. It's just unfortunate that it didn't work out the way I had hoped for our project.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-center">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/&amp;title=The+Trials+and+Tribulations+of+Django+%2B+Git" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/&amp;title=The+Trials+and+Tribulations+of+Django+%2B+Git" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/&amp;title=The+Trials+and+Tribulations+of+Django+%2B+Git" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/&amp;title=The+Trials+and+Tribulations+of+Django+%2B+Git" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/&amp;t=The+Trials+and+Tribulations+of+Django+%2B+Git" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=The+Trials+and+Tribulations+of+Django+%2B+Git+-+http://tinyurl.com/yc5ofsu+&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/&amp;n=The+Trials+and+Tribulations+of+Django+%2B+Git&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://www.robgolding.com/?ak_action=api_record_view&id=144&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Roaming Firefox Profiles</title>
		<link>http://www.robgolding.com/blog/2009/04/13/roaming-firefox-profiles/</link>
		<comments>http://www.robgolding.com/blog/2009/04/13/roaming-firefox-profiles/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 15:22:22 +0000</pubDate>
		<dc:creator>Rob Golding</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Home Network]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://www.robgolding.com/?p=130</guid>
		<description><![CDATA[As a sort of follow-on from my last post, I thought I'd write a little about the latest little addition to my system - roaming Firefox profiles. This is something I had always considered to be almost impossible to achieve, without complicated logon and logoff scripts that syncronise the correct folder(s) to give the same [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-132" title="firefox-logo" src="http://www.robgolding.com/wp-content/uploads/2009/04/firefox-logo.png" alt="firefox-logo" width="195" height="100" />As a sort of follow-on from my last post, I thought I'd write a little about the latest little addition to my system - roaming Firefox profiles. This is something I had always considered to be almost impossible to achieve, without complicated logon and logoff scripts that syncronise the correct folder(s) to give the same effect as a 'redirected' profile. Well I discovered a much easier way to achieve actual *real* profile redirection, when browsing around the features offered by Group Policy Client Side Extensions.</p>
<p>The basic idea is that Firefox has a file called <strong>profiles.ini</strong>, which takes care of all the configured profiles, and where they are stored. I used this file to change the default profile location to within the user's home directory on the file server. I had to use a home drive, mapped to the root of my users' folder redirection directory on the server, as I presumed UNC paths were unsupported in the .ini file. I did this with a GP Preference drive map using the <strong>%USERNAME%</strong> variable, and an amazing feature of GP Preferences - parsing and even <em>altering </em>ini files. You can specify which section of the ini file you are interested in, and which key you want changing. How useful! My policy looks like this:</p>
<p><img class="alignleft size-full wp-image-131" style="margin: 5px 10px 5px 0px;" title="firefox-gp-policy" src="http://www.robgolding.com/wp-content/uploads/2009/04/firefox-gp-policy.png" alt="firefox-gp-policy" width="489" height="66" /></p>
<p>You can probably work out what's going on here, but I'll give a quick overview. Basically, you specify the ini file to edit - in this case it's <strong>%APPDATA%\Mozilla\Firefox\profiles.ini</strong>. Using the <strong>%APPDATA%</strong> variable means that it will always resolve to the correct location in the user's local profile, whether they are on XP or Vista. Then we specify the section of the ini file - I'm interested in <strong>Profile0</strong>. This is the only profile present by default, but allows users to have multiple profiles if they wish without overwiting their settings when they log off. Finally, you specify the key to change, and what to change it to. I rename the default profile to Firefox, and change it's location to <strong>H:\Firefox</strong>. Also, this path is not relative, so I have to change <strong>IsRelative </strong>to <strong>0</strong>.</p>
<p>OK, so now we have the Firefox profile location sorted, we need to make sure that folder exists - or Firefox will just overwrite our changes and make it's own folder in the default location. It's easy to use GP Preferences for this as well - as there's a <strong>Folders</strong> preference category. So I just made a new folders preference for <strong>\\zeus\UserData\%USERNAME%\Firefox</strong>, with the action of <strong>create</strong> (zeus is my main DC and File Server). I used the UNC path to be sure that the folder is created, even if the drive map hadn't come into effect when this preference was applied. Also, a little trick I had to pull here was ticking the checkbox titled <strong>Run in logged-on user's security context</strong> on the <strong>common </strong>tab. This is because only the user has permissions on their home directory, so this preference needed to run in the context of that user for it to work successfully (without access denied errors).</p>
<p>Once this was finished, the system started to work flawlessly. I copied the contents of existing Firefox profiles to the newly created directories, and they were picked up by Firefox with no problems. New users get blank profiles as expected, but they are stored on the file server instead of the local machine. One little issue I have encountered is that a user can't logon at more than one machine, and start Firefox - as the program can't lock particular files in the profile. This just results in a message saying this Firefox is already running though, which is pretty much correct (and I can't see why this would ever cause problems for the user).</p>
<p>The last trick I employed, to make things a little speedier and to reduce uneccesary file server traffic, was to disable disk caching on the roaming Firefox profiles. To do this, I used a file policy in GP Preferences to copy a tiny user.js (Firefox's preference file override) which contained only one line:</p>
<p><span class="note">user_pref("browser.cache.disk.enable", false);</span></p>
<p>This turns off disk caching completely, which will not only save space on the file server, but should speed things up as well. I hosted this file elsewhere on the file server, and told the file policy to simply copy it into place, within the user's Firefox profile. Here's the preference:</p>
<p><img class="alignleft size-full wp-image-139" title="firefox-userjs-gp-pref" src="http://www.robgolding.com/wp-content/uploads/2009/04/firefox-userjs-gp-pref.png" alt="firefox-userjs-gp-pref" width="502" height="35" /></p>
<p>So there you have it, my technique for enabling roaming Firefox profiles. If you've achieved the same through a different method, or have any ideas on this this could be improved, then I'd love to hear how - feel free to comment on this post.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-center">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.robgolding.com/blog/2009/04/13/roaming-firefox-profiles/&amp;title=Roaming+Firefox+Profiles" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.robgolding.com/blog/2009/04/13/roaming-firefox-profiles/&amp;title=Roaming+Firefox+Profiles" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.robgolding.com/blog/2009/04/13/roaming-firefox-profiles/&amp;title=Roaming+Firefox+Profiles" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.robgolding.com/blog/2009/04/13/roaming-firefox-profiles/&amp;title=Roaming+Firefox+Profiles" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.robgolding.com/blog/2009/04/13/roaming-firefox-profiles/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.robgolding.com/blog/2009/04/13/roaming-firefox-profiles/&amp;t=Roaming+Firefox+Profiles" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Roaming+Firefox+Profiles+-+http://tinyurl.com/yjabrkr+&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.robgolding.com/blog/2009/04/13/roaming-firefox-profiles/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.robgolding.com/blog/2009/04/13/roaming-firefox-profiles/&amp;n=Roaming+Firefox+Profiles&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://www.robgolding.com/?ak_action=api_record_view&id=130&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.robgolding.com/blog/2009/04/13/roaming-firefox-profiles/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
