<?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>Simon Rycroft's musings &#187; Linux</title>
	<atom:link href="http://blog.simon.rycroft.name/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.simon.rycroft.name</link>
	<description>Too lazy to be a blog, but a little more than the average web page.</description>
	<lastBuildDate>Thu, 09 Oct 2008 11:43:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>AMD64 Ubuntu and Zend Studio 6</title>
		<link>http://blog.simon.rycroft.name/2008/10/09/amd64-ubuntu-and-zend-studio-6/</link>
		<comments>http://blog.simon.rycroft.name/2008/10/09/amd64-ubuntu-and-zend-studio-6/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 11:43:56 +0000</pubDate>
		<dc:creator>Simon Rycroft</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.simon.rycroft.name/?p=26</guid>
		<description><![CDATA[As a relatively new convert to Debian/Ubuntu, I found the process of getting Zend Studio 6 to run on my machine a little tricky.  What I ended up doing was the following:# Install sun-jre
sudo apt-get install sun-java6-bin
# Install libraries to allow 32bit software to run
# (not sure whether all are necessary)
sudo apt-get install ia32-libs [...]]]></description>
			<content:encoded><![CDATA[<p>As a relatively new convert to Debian/Ubuntu, I found the process of getting Zend Studio 6 to run on my machine a little tricky.  What I ended up doing was the following:<code># Install sun-jre<br />
sudo apt-get install sun-java6-bin<br />
# Install libraries to allow 32bit software to run<br />
# (not sure whether all are necessary)<br />
sudo apt-get install ia32-libs lib32asound2 util-linux<br />
# Finally install Zend using the installed JRE<br />
sudo ./ZendStudioForEclipse-6_1_0.bin LAX_VM /usr/bin/java</code><br />
If the final install fails, it may be because /usr/bin/java isn&#8217;t pointing at the Sun version of java, you can check this by doing the following:<code>java -version</code>which should output something like<code>java version "1.6.0_06"<br />
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)<br />
Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)</code>If it doesn&#8217;t, you&#8217;ll need to change where the symbolic link /etc/alternatives/java points to.<code>cd /etc/alternatives<br />
rm java<br />
ln -s /usr/lib/jvm/java-6-sun/jre/bin/java</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.simon.rycroft.name/2008/10/09/amd64-ubuntu-and-zend-studio-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VMWare Player and FC5 2.6.19</title>
		<link>http://blog.simon.rycroft.name/2007/03/05/index-of-bits2619-rc5/</link>
		<comments>http://blog.simon.rycroft.name/2007/03/05/index-of-bits2619-rc5/#comments</comments>
		<pubDate>Mon, 05 Mar 2007 17:12:19 +0000</pubDate>
		<dc:creator>Simon Rycroft</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.simon.rycroft.name/2007/03/05/index-of-bits2619-rc5/</guid>
		<description><![CDATA[Index of /bits/2.6.19-rc5  Just needs a quick mention.  Basically, remove any mention of CHECKSUM_HW and replace with CHECKSUM_PARTIAL.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://nerdbynature.de/bits/2.6.19-rc5/">Index of /bits/2.6.19-rc5</a>  Just needs a quick mention.  Basically, remove any mention of CHECKSUM_HW and replace with CHECKSUM_PARTIAL.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.simon.rycroft.name/2007/03/05/index-of-bits2619-rc5/feed/</wfw:commentRss>
		<slash:comments>-1</slash:comments>
		</item>
		<item>
		<title>KDE or Gnome</title>
		<link>http://blog.simon.rycroft.name/2007/02/28/kde-or-gnome/</link>
		<comments>http://blog.simon.rycroft.name/2007/02/28/kde-or-gnome/#comments</comments>
		<pubDate>Wed, 28 Feb 2007 17:36:07 +0000</pubDate>
		<dc:creator>Simon Rycroft</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.simon.rycroft.name/2007/02/28/kde-or-gnome/</guid>
		<description><![CDATA[We&#8217;ve seen it discussed many a  time before, but I&#8217;m really no longer too sure which I prefer, KDE or Gnome.  Why do I have to choose?  I&#8217;ve decided to use the one that is the default with the particular flavour of Linux I use, which is Fedora, although I still have [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve seen it discussed many a  time before, but I&#8217;m really no longer too sure which I prefer, KDE or Gnome.  Why do I have to choose?  I&#8217;ve decided to use the one that is the default with the particular flavour of Linux I use, which is Fedora, although I still have the other installed, just for completeness.</p>
<p>Just while we&#8217;re on the subject of Linux.   I&#8217;ve just installed Fedora Core 6 on my laptop, and been blown away by the progress that it has made in the past couple of years.  It&#8217;s almost user friendly!  The much talked about <a href="http://www.go-compiz.org/index.php?title=Main_Page">Compiz</a> (or in my case <a href="http://www.beryl-project.org/">Beryl</a>) is simply stunning, whilst improvements in the general look and feel of Gnome and KDE make it much more user friendly.  There have been problems before with hardware compatibility, but from the box (or DVD), sound, touchpad, VGA, LAN, and bluetooth were working nicely.  Wireless took a little tweak to have working shortly afterwards (Firmware for the ipw2100 was required).  I shall check later this evening to see if video works ok, but given that I&#8217;ve already made my way through an excellent <a href="http://www.fedorafaq.org/">FAQ</a>, I&#8217;m sure it already will be.</p>
<p>I guess all Linux needs now is Office and Photoshop! (Yes, I know about wine and crossover).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.simon.rycroft.name/2007/02/28/kde-or-gnome/feed/</wfw:commentRss>
		<slash:comments>-3</slash:comments>
		</item>
		<item>
		<title>Bluetoothed penguin</title>
		<link>http://blog.simon.rycroft.name/2007/02/08/linux-and-bluetooth/</link>
		<comments>http://blog.simon.rycroft.name/2007/02/08/linux-and-bluetooth/#comments</comments>
		<pubDate>Thu, 08 Feb 2007 15:05:41 +0000</pubDate>
		<dc:creator>Simon Rycroft</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.simon.rycroft.name/2007/02/08/linux-and-bluetooth/</guid>
		<description><![CDATA[Linux's implementation of Bluetooth isn't half bad, especially when used from the desktop along with kdebluetooth (or gnome's equivalent if you're that way inclined).  The KDE version comes with the ability to run scripts on detection of Bluetooth enabled devices within range of your computer.  I personally run my computer as a server, and like to run as little as possible from X (It's started at runlevel 3).  For this reason, I've decided to mimic what KDE does, and write my own scripts for detecting Bluetooth devices, running various programs on detection.  I've set up scripts to do a number of things, including, downloading of photos from phone to computer when phone comes in range and setting of IM away messages.  In order to do this, a few simple steps have to be performed.

Go on, you know you want to read the rest.]]></description>
			<content:encoded><![CDATA[<p>Linux&#8217;s implementation of Bluetooth isn&#8217;t half bad, especially when used from the desktop along with kdebluetooth (or gnome&#8217;s equivalent if you&#8217;re that way inclined).  The KDE version comes with the ability to run scripts on detection of Bluetooth enabled devices within range of your computer.  I personally run my computer as a server, and like to run as little as possible from X (It&#8217;s started at runlevel 3).  For this reason, I&#8217;ve decided to mimic what KDE does, and write my own scripts for detecting Bluetooth devices, running various programs on detection.  I&#8217;ve set up scripts to do a number of things, including, downloading of photos from phone to computer when phone comes in range and setting of IM away messages.  In order to do this, a few simple steps have to be performed.</p>
<p>Firstly ensure that Bluetooth is installed on your computer, and that it is working.  I&#8217;m using Fedora Core 5 (FC5), so to do this is as simple as (assuming you have yum <a href="http://www.fedorafaq.org/#installsoftware">set up properly</a>:<br />
<code># yum install bluez-*</code><br />
We don&#8217;t really need all of the packages here to do this, but you will no doubt find those that are installed useful.</p>
<p>Insert your dongle here (assuming you&#8217;re using a USB Bluetooth device, if Bluetooth is built in, ignore this next bit).  You may, depending on how your computer is set up, have to reboot here &#8211; I have no idea how to detect added hardware!  I&#8217;m sure there is a better solution to this, but unfortunately I don&#8217;t know what it is. Now test the Bluetooth, which should give you output similar to below.<br />
<code>$ hcitool dev<br />
Devices:<br />
        hci0    11:22:33:44:55:66</code><br />
Assuming you&#8217;ve got this far and everything is working, you can now try the more interesting bits.  I&#8217;m going to assume that you&#8217;re wanting to connect a phone to your computer, and monitor the presence of the phone.  If you&#8217;re intending on using something else (TomTom, GPS box, PDA, <a href="http://www.theregister.co.uk/2005/10/28/bluetooth_device/">whatever</a>), then just use that whenever I mention phone &#8211; simple.  Turn on Bluetooth on the phone, and scan for the device from the computer<br />
<code>$ hcitool scan<br />
Scanning ...<br />
00:AA:BB:CC:DD:EE phone</code><br />
This will give you the name, and the id of your phone (and also any other devices in range).  Make a note of the ID/Mac address (the letters/numbers/colons bit), we&#8217;ll need this later.  Now, what we&#8217;re going to use to detect the presence of your phone is this Mac address.  If you scan specifically for the Mac address when the phone is in range, then the hcitool program returns the name of the phone, if the phone is out of range, then NULL is returned:<br />
<code>$ hcitool name 00:AA:BB:CC:DD:EE<br />
phone</code><br />
The results from this are best piped into a file, which can then be used to monitor the presence of your phone.  A simple bash<br />
script to do this might look like this:<br />
<code>#!/bin/bash<br />
## usage:<br />
##      detectphone time mac output_file_name<br />
## Where:<br />
##      time - Is the time in minutes between detection attempts<br />
##      mac  - Is the mac address of the device to attempt to detect<br />
##      output_file_name is the filename to write the output to!<br />
if [ ! -n "$3" ]<br />
then<br />
        echo "usage: detectphone time mac outputfile &#038;"<br />
        exit 2<br />
fi<br />
## Simply put the program into a loop, sleeping for the first argument each loop<br />
## and looking for the device with the id equal to the second argument each loop.<br />
## The output from this is saved to the third argument<br />
while [ "$var1" != "end" ]<br />
do<br />
  `hcitool name $2 > $3`<br />
  `sleep $1`<br />
done</code><br />
Next we need a script which will check for the content of the file produced above and for it to then produce an action.  Note, we don&#8217;t put the above check in to the script, as it would mean that for each action you want to do, you would have to check for the presence of the phone, whereas doing the above, the phone is only checked for once, no matter how many scripts you have.  The following scripts can be executed periodically, or could have a loop in like the above script.<br />
<code>#!/bin/bash<br />
## This script should be reproduced as the top of all the scripts that you create.<br />
## Usage:<br />
##	fileexists pathtodetectionfile<br />
if [ ! -n "$1" ] # Ensure that the path to the file was passed<br />
then<br />
	echo "usage: fileexists pathtodetectionfile"<br />
	exit 2<br />
fi<br />
if [ ! -e "$1" ]       # Check if file exists.<br />
then<br />
	echo "$1 does not exist.";<br />
	exit 2<br />
fi<br />
output=`ls -l "$1" | awk '{print $5}'`<br />
if [ $output == 0 ]<br />
then<br />
	# File length is 0, exit quietly<br />
	exit 0;<br />
fi<br />
## If the script reaches this point, then everything has worked, and the phone<br />
## has been detected.<br />
## Insert your application logic HERE ##<br />
## Insert your application logic HERE ##<br />
exit 0;</code><br />
If you&#8217;d prefer a script that executes a particular function when the phone comes into range, or moves out of range, then the following will probably be useful.</p>
<p>I know this is a little open ended, and that I&#8217;m not really finished with this, but I felt the need to post this as it has been sitting on my computer for far too long.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.simon.rycroft.name/2007/02/08/linux-and-bluetooth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
