<?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>Julian Rex &#187; ubuntu</title>
	<atom:link href="http://julianrex.com/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://julianrex.com</link>
	<description>iPhone and iPad Apps and Game Development</description>
	<lastBuildDate>Wed, 23 Mar 2011 22:35:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Setting up a Perforce proxy server on Ubuntu</title>
		<link>http://julianrex.com/2007/01/setting-up-a-perforce-proxy-server-on-ubuntu/</link>
		<comments>http://julianrex.com/2007/01/setting-up-a-perforce-proxy-server-on-ubuntu/#comments</comments>
		<pubDate>Mon, 15 Jan 2007 13:00:08 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[perforce]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://rexy.co.uk/wordpress/?p=13</guid>
		<description><![CDATA[One of the more important things I&#8217;ve been wanting to do, is to set up a perforce proxy to connect to the work server. That way, it can sit in the background periodically updating itself (not quite but see below), and when I want to sync, it should be nice and fast. In theory. In [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.perforce.com/perforce/products/p4p.html"><img class="aligncenter" src="/images/p4p.gif" alt="" /></a></p>
<p>One of the more important things I&#8217;ve been wanting to do, is to set up a perforce proxy to connect to the work server.</p>
<p>That way, it can sit in the background periodically updating itself (not quite but see below), and when I want to sync, it should be nice and fast. In theory. In reality I suspect it won&#8217;t be so clear cut.</p>
<p>Running a perforce proxy is easy, it&#8217;s just a case of choosing a root for the cache, telling it what port to listen on, and what the target server is:</p>
<div class="codey">
<pre>p4p -p 1667 -t workserver:1666 -r /perforce/p4p/cache -L /perforce/p4p/p4p.log</pre>
</div>
<p>That&#8217;s nice, but I want this to start automatically when I boot up, and an easy way to quickly stop and start it. I need a script in /etc/init.d. Here&#8217;s mine:</p>
<div class="codey">
<pre>#! /bin/sh
# p4pinit
# Startup script for Perforce Proxy server.
# Check out the man page for start-stop-daemon. Notice
# I use -b to run p4p in the background. p4p has a similar
# option, but I didn't have as much success.

DAEMON=/usr/local/bin/p4p
P4P_NAME=p4p
P4P_DESC="Perforce Proxy"
P4P_CACHE=/perforce/p4p/cache
P4P_PORT=1667
P4P_TARGET=workserver.somewhere.co.uk:1666
P4P_LOG=/perforce/p4p/p4p.log

# Check p4p exists
test -x $DAEMON || exit 0

case "$1" in

  start)
	echo -n "Starting $P4P_DESC: "
	start-stop-daemon --start -b -m
                --pidfile /var/run/$P4P_NAME.pid
                --exec $DAEMON
                -- -p $P4P_PORT -t $P4P_TARGET
                -r $P4P_CACHE -L $P4P_LOG
	echo "$P4P_NAME."
	;;

  stop)
	echo -n "Stopping $P4P_DESC: "
	start-stop-daemon --stop
                --pidfile /var/run/$P4P_NAME.pid
                --signal KILL
                --exec $DAEMON
                --oknodo
	echo "$P4P_NAME."
	;;

  *)
	echo "Usage: $0 {start|stop}"
	exit 1
	;;
esac

exit 0</pre>
</div>
<p>Once you&#8217;ve done this, you need to call <code>update-rc.d p4pinit defaults</code>. This will ensure that p4p is started when you boot up. This will create symlinks to p4pinit in the directories /etc/rcX.d etc&#8230;</p>
<p>Now synching is just a case of pointing the client at homeserver:1667, rather than the default <img src='http://julianrex.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  However, you need to pre-load the cache and ideally keep it synched regularly after that.</p>
<p>Unfortunately this is where Perforce falls down, as the proxy has no means to do this itself; You&#8217;re required to set up another client spec, and use that to sync and fill the proxy&#8217;s cache. This could mean double the files on your server, which isn&#8217;t great.</p>
<p>What you can do, rather cunningly, is set your client root to /dev/null. When you sync you&#8217;ll get errors that it can&#8217;t write the file/create the directory, but by that point the file has been downloaded to the cache. To quote Tim O&#8217;Mahony of Perforce support:</p>
<p><em>&#8230;The errors mean that you can&#8217;t write anything to db.have for those files, but by this time you already have downloaded them to the proxy. That means that every time you then run a p4 sync on this client it is the same as running a full &#8220;p4 sync&#8221;. Files that aren&#8217;t on the proxy will simply be got from the server&#8230;</em></p>
<p>In other words, if you sync later, p4 will want to re-grab those files. However it will take them from the proxy, so it will only download genuinely new files. If you don&#8217;t want the output in your logs (like me), then you can run p4 flush immediately after the sync, to convince the server that you really do have those files:</p>
<div class="codey">
<pre>p4 sync //depot/something/to/sync/...
p4 flush //depot/something/to/sync/...</pre>
</div>
<p>Hope this helps someone.</p>
<div class="updated">Since writing, I found that in some situations (that I&#8217;ve yet to fathom) the proxy server delivers files from the server rather than itself. To see where your files are coming from, you can use the <code>-Zproxyverbose</code> flag to your p4 command.</div>
]]></content:encoded>
			<wfw:commentRss>http://julianrex.com/2007/01/setting-up-a-perforce-proxy-server-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Firefly Media Server on Ubuntu 6.06</title>
		<link>http://julianrex.com/2006/12/installing-firefly-media-server-on-ubuntu-606/</link>
		<comments>http://julianrex.com/2006/12/installing-firefly-media-server-on-ubuntu-606/#comments</comments>
		<pubDate>Tue, 19 Dec 2006 22:20:46 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[firefly]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://rexy.co.uk/wordpress/?p=15</guid>
		<description><![CDATA[The following instructions need to be updated, though the steps are pretty similar. Installing Firefly on Dapper Drake was a breeze: Grab mt-daapd_0.9-svn-1463_dapper_i386.deb from here dpkg --install mt-daapd_0.9-svn-1463_dapper_i386.deb If it complains about dependencies, grab them: apt-get install libflac7 libid3tag0 libogg0 libsqlite0 libvorbis0a libvorbisfile3 That&#8217;ll finish the installation of mt-daapd. Check to see if it&#8217;s working by browsing to [...]]]></description>
			<content:encoded><![CDATA[<div class="updated">
<p />The following instructions need to be updated, though the steps are pretty similar.
</div>
<p>Installing <a href="http://fireflymediaserver.org/">Firefly</a> on Dapper Drake was a breeze:</p>
<ul>
<li>Grab mt-daapd_0.9-svn-1463_dapper_i386.deb from <a href="http://nightlies.mt-daapd.org/">here</a></li>
<li><code>dpkg --install mt-daapd_0.9-svn-1463_dapper_i386.deb</code></li>
<li>If it complains about dependencies, grab them:<br />
<code>apt-get install libflac7 libid3tag0 libogg0 libsqlite0 libvorbis0a libvorbisfile3</code><br />
That&#8217;ll finish the installation of mt-daapd.</li>
<li>Check to see if it&#8217;s working by browsing to http://your-machine:3689</li>
<li>The main configuration file is /etc/mt-daapd.conf. I didn&#8217;t change anything except the mp3_dir, which I set to my iTunes folder on my samba share. I might need to change the scan_type later, as I noticed it was set to &#8220;Painfully aggressive&#8221; <img src='http://julianrex.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <em>(As an aside, I manage my music with iTunes on my Mac. I simply moved the entire iTunes folder to the linux box, and created a symbolic link, so that iTunes wouldn&#8217;t think anything had changed: cd to ~/Music, and <code>ln -s /Network/Servers/ubuntu/share/iTunes</code>. I have the samba share automounting, and if you check /Network/Servers is a symlink to /automount/Servers. <a href="#itunes">See below.</a>)</em></li>
<li>The firefly server should show up in iTunes under the SHARED section.</li>
</ul>
<p>Upon rebooting my ubuntu box, I found firefly wasn&#8217;t running. <a href="http://forums.fireflymediaserver.org/viewtopic.php?t=4677">Checking the forums</a>, helped, and all I needed to do was: <code>ln -s /opt/etc/init.d/S60mt-daapd /etc/rc2.d/S60mt-daapd</code>.</p>
<p>If you need to restart the server, issue (as root) a <code>/etc/init.d/mt-daapd restart</code>. If you check the running processes, you&#8217;ll see TWO mt-daapd processes. This had me confused for a while, but is normal.</p>
<p>By default you can&#8217;t see your iTunes playlists &#8211; this is down to an inappropriately named switch in the config file. Read about it <a href="http://wiki.fireflymediaserver.org/FAQ">here</a>, under <em>Why can&#8217;t I see my iTunes playlists</em>.</p>
<p><a name="itunes"></a></p>
<div class="updated">Dec 2008: I no longer store the entire iTunes folder on the network share, as iTunes fails to start if it cannot find the folder location. Instead I&#8217;ve found it&#8217;s best to store just the iTunes Music folder, and create a symbolic link to that. By doing this it also allows multiple users to access the music, whilst retaining the ability to rate their music, etc. </p>
<p>This works better than using the &#8220;iTunes Music folder location&#8221; in the Advanced preferences, as iTunes will reset that folder if it can&#8217;t access that folder, without informing you!</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://julianrex.com/2006/12/installing-firefly-media-server-on-ubuntu-606/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bind9 DNS on Ubuntu 6.06</title>
		<link>http://julianrex.com/2006/12/bind9-dns-on-ubuntu-606/</link>
		<comments>http://julianrex.com/2006/12/bind9-dns-on-ubuntu-606/#comments</comments>
		<pubDate>Sun, 17 Dec 2006 18:27:02 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bind9]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://rexy.co.uk/wordpress/?p=16</guid>
		<description><![CDATA[Setting up a DNS proved easier than I&#8217;d first thought. I did spend a long time trying things out, which was pretty frustrating. In the end, I followed this excellent step-by-step guide. What I would say is follow the steps exactly, make sure it&#8217;s working, then go back and amend it for your network and situation. [...]]]></description>
			<content:encoded><![CDATA[<p>Setting up a DNS proved easier than I&#8217;d first thought. I did spend a long time trying things out, which was pretty frustrating.</p>
<p>In the end, I followed <a href="http://www.linux.com/howtos/DNS-HOWTO-3.shtml">this excellent step-by-step guide</a>. What I would say is follow the steps exactly, make sure it&#8217;s working, then go back and amend it for your network and situation.</p>
<p>These are the other sites I referred to.</p>
<ul>
<li><a href="http://www.aboutdebian.com/dns.htm">http://www.aboutdebian.com/dns.htm</a> - good guide, but following the example didn&#8217;t work.</li>
<li><a href="http://www.madboa.com/geek/soho-bind/">http://www.madboa.com/geek/soho-bind/</a>.</li>
<li><a href="http://www.tldp.org/HOWTO/DNS-HOWTO.html">http://www.tldp.org/HOWTO/DNS-HOWTO.html</a></li>
</ul>
<p>I use the DNS primarily to access machines on my LAN by name, forwarding requests to work machines to the VPN&#8217;s DNS. I&#8217;m hoping that I also see a performance improvement due to cached responses. I probably could have used <a href="http://thekelleys.org.uk/dnsmasq/doc.html">dnsmasq</a>, but I wanted to understand how bind9 worked.</p>
<p>A couple of gotchas;</p>
<ul>
<li>Make sure the format of the zone files is correct; I had excluded the hostmaster email address, which made everything fail horribly.</li>
<li>Check your /etc/hosts and /etc/hostname files match your DNS setup. I didn&#8217;t; ping returned some very strange results.</li>
</ul>
<p>UPDATE: After a couple of reboots it was clear something was wrong. The linux box itself wasn&#8217;t able to resolve names. Looking in /etc/resolv.conf showed that 127.0.0.1 i.e. itself wasn&#8217;t listed; Some process was rewriting it.</p>
<p>I then remembered that the linux box is set up to get its IP by DHCP (always the same as the router matches the MAC address). You need to change the dhcp client settings &#8211; take a look in /etc/dhcp3/dhclient.conf, and uncomment the line: <code>#prepend domain-name-servers 127.0.0.1</code></p>
]]></content:encoded>
			<wfw:commentRss>http://julianrex.com/2006/12/bind9-dns-on-ubuntu-606/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Samba on Ubuntu 6.06</title>
		<link>http://julianrex.com/2006/12/samba-on-ubuntu-606/</link>
		<comments>http://julianrex.com/2006/12/samba-on-ubuntu-606/#comments</comments>
		<pubDate>Tue, 12 Dec 2006 18:37:40 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://rexy.co.uk/wordpress/?p=17</guid>
		<description><![CDATA[Dec 2008: See the bottom of this post for an update. I&#8217;ve now got an old PC running Ubuntu Server (Dapper). This is partly a bit of &#8220;fun&#8221;, and also practical; Here are my rough plans: Samba server, for file and printer sharing DNS for lan names, and forwarding to VPN DNS. There are a [...]]]></description>
			<content:encoded><![CDATA[<div class="updated">
<p/>Dec 2008: See the bottom of this post for an update.</div>
<p>I&#8217;ve now got an old PC running Ubuntu Server (Dapper). This is partly a bit of &#8220;fun&#8221;, and also practical; Here are my rough plans:</p>
<ul>
<li>Samba server, for file and printer sharing</li>
<li>DNS for lan names, and forwarding to VPN DNS. There are a number of machines on the LAN.</li>
<li>Perforce proxy server for VPN work, Perforce server for personal stuff</li>
<li><a href="http://fireflymediaserver.org/">Firefly media server</a> for shared iTunes</li>
<li>Apache web serving, if I get that far</li>
<li>Anything else that I get around to <img src='http://julianrex.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
</ul>
<p>So far the experience hasn&#8217;t been particularly fun; a lot of google and a lot of experimentation usually works. Though I can definitely recommend the various O&#8217;Reilly manuals.</p>
<p>Here are some notes about setting up Samba on Ubuntu for access by XP and Mac OS X. I don&#8217;t have clear instructions, as it was a bit hit and miss:</p>
<ul>
<li>Created a new group, home, for users accessing the share</li>
<li>Create linux user to access share; <code>useradd -g home -p <em>password user</em></code></li>
<li>For each system user; <code>smbpasswd -a <em>user</em></code></li>
</ul>
<p>Actually setting up the file share was pretty easy, it was the printing that was hell. The printer is an HP OfficeJet G55 &#8211; check out and apt-get <a href="http://hplip.sourceforge.net/">hplip</a>. They are the drivers to use.</p>
<p>Other things/sites to check</p>
<ul>
<li><a href="http://www.wildfire.dircon.co.uk/hnw-printing.html">http://www.wildfire.dircon.co.uk/hnw-printing.html</a></li>
<li><a href="http://ubuntuforums.org/showthread.php?t=310450">http://ubuntuforums.org/showthread.php?t=310450</a></li>
<li><a href="https://help.ubuntu.com/community/NetworkPrintingFromMacOSX">https://help.ubuntu.com/community/NetworkPrintingFromMacOSX</a> &#8211; if you want to print from Mac (just edit the /etc/cups/printers.conf file like the comment says). Also see <a href="http://mike.hostetlerhome.com/2006/05/09/printing-from-mac-os-x-to-linux/">http://mike.hostetlerhome.com/2006/05/09/printing-from-mac-os-x-to-linux/</a></li>
<li>Need to run
<pre>/usr/share/cups/enable_sharing 1
/usr/share/cups/enable_browsing 1</pre>
</li>
</ul>
<p>If you get an &#8220;access denied, unable to connect&#8221;, it might be (as a lot of posts say) that you need to enable &#8220;use client driver = yes&#8221;. However, what you probably want is for samba to dish out the printer driver to the Windows clients. In this case you need to leave it as &#8220;use client driver = no&#8221;.</p>
<p>The following site was really useful.<em> If there&#8217;s one link to look at from this post, it&#8217;s this one</em>: </p>
<p><a href="http://www.linuxdevcenter.com/pub/a/linux/2005/01/13/lnxckbk_samba.html">http://www.linuxdevcenter.com/pub/a/linux/2005/01/13/lnxckbk_samba.html</a>.</p>
<p>Also read the man page for cupsaddsmb. Note that you need to set <code>security = user</code> at first, later changing it.</p>
<p>Here&#8217;s an edited smb.conf file, which works for me. I suspect it&#8217;s slightly over complex, so comments welcome. It&#8217;s really a mashup of several other files, though it did try to create it systematically following the official documentation.</p>
<div class="updated">I&#8217;ve removed the previous smb.conf that was listed here, as there were several errors. I had a several problems trying to access the share from XP using the IP address or fully qualified domain name (but not the short name). I believe the solution to this was to add the line: spnego = 3DNO to the global section.   </p>
<p>If there&#8217;s enough interest, I&#8217;ll dig out the conf file and clean it up. Please <a href="/contact">contact me</a> if you want to know more.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://julianrex.com/2006/12/samba-on-ubuntu-606/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

