<?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>stealthcopter.com &#187; ubuntu</title>
	<atom:link href="http://www.stealthcopter.com/blog/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stealthcopter.com/blog</link>
	<description>Android, Linux, Python and stealthcopters</description>
	<lastBuildDate>Sat, 24 Jul 2010 00:01:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Setting up google calendar with Kontact (or korganiser) using akonadi</title>
		<link>http://www.stealthcopter.com/blog/2010/05/setting-up-google-calendar-with-kontact-or-korganiser-using-akonadi/</link>
		<comments>http://www.stealthcopter.com/blog/2010/05/setting-up-google-calendar-with-kontact-or-korganiser-using-akonadi/#comments</comments>
		<pubDate>Sat, 29 May 2010 14:42:13 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[akonadi]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[kontact]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=867</guid>
		<description><![CDATA[It used to be a real pain to try and get google calendar working with kontact/korganiser, however now it is very simple. I have also provided a screenshot walk-through to aide the process. Just install akonadi-kde-resource-googledata using your package manager or in the terminal with: sudo apt-get install akonadi-kde-resource-googledata This will install support of google [...]]]></description>
			<content:encoded><![CDATA[<p>It used to be a real pain to try and get google calendar working with kontact/korganiser, however now it is very simple. I have also provided a screenshot walk-through to aide the process.</p>
<p>Just install akonadi-kde-resource-googledata using your package manager or in the terminal with:</p>
<pre name="code" class="bash">
sudo apt-get install akonadi-kde-resource-googledata
</pre>
<p>This will install support of google calendar and google contacts into akonadi. If you&#8217;ve not heard of akonadi before, it is a backend that manages communications and protocols. So rather than having developers of separate applications working on the same thing rewriting code that does the same thing they can simply plug into akonadi. Kontact/korganiser can load can load from an akonadi resource:</p>
<p><strong>Walkthrough</strong><br />
(see below for walkthough with screenshots)</p>
<ul>
<li>Right Click on calendars and click add resource</li>
<li>Select akonadi</li>
<li>Click Manage Calendar Sources</li>
<li>Click add</li>
<li>Select Akonadi Google Calendar Resource</li>
<li>Enter your email and password and select ok</li>
<li>Your calendar should now sync and appear in korganiser</li>
</ul>
<p><strong>Screenshot Walkthrough</strong></p>
<li>Right Click on calendars and click add resource</li>
<div id="attachment_878" class="wp-caption aligncenter" style="width: 610px"><a href="http://www.stealthcopter.com/blog/2010/05/setting-up-google-calendar-with-kontact-or-korganiser-using-akonadi/googlecal1/" rel="attachment wp-att-878"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/05/googlecal1-600x375.png" alt="Google Caldendar integration with Kontact Korganiser 1" title="Google Caldendar integration with Kontact Korganiser 1" width="600" height="375" class="size-medium wp-image-878" /></a><p class="wp-caption-text">Google Caldendar integration with Kontact Korganiser 1</p></div>
<li>Select akonadi</li>
<div id="attachment_879" class="wp-caption aligncenter" style="width: 337px"><a href="http://www.stealthcopter.com/blog/2010/05/setting-up-google-calendar-with-kontact-or-korganiser-using-akonadi/googlecal2/" rel="attachment wp-att-879"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/05/googlecal2.png" alt="Google Caldendar integration with Kontact Korganiser 2" title="Google Caldendar integration with Kontact Korganiser 2" width="327" height="304" class="size-full wp-image-879" /></a><p class="wp-caption-text">Google Caldendar integration with Kontact Korganiser 2</p></div>
<li>Click Manage Calendar Sources</li>
<div id="attachment_880" class="wp-caption aligncenter" style="width: 535px"><a href="http://www.stealthcopter.com/blog/2010/05/setting-up-google-calendar-with-kontact-or-korganiser-using-akonadi/googlecal3/" rel="attachment wp-att-880"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/05/googlecal3.png" alt="Google Caldendar integration with Kontact Korganiser 3" title="Google Caldendar integration with Kontact Korganiser 3" width="525" height="545" class="size-full wp-image-880" /></a><p class="wp-caption-text">Google Caldendar integration with Kontact Korganiser 3</p></div>
<li>Click add</li>
<div id="attachment_881" class="wp-caption aligncenter" style="width: 396px"><a href="http://www.stealthcopter.com/blog/2010/05/setting-up-google-calendar-with-kontact-or-korganiser-using-akonadi/googlecal4/" rel="attachment wp-att-881"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/05/googlecal4.png" alt="Google Caldendar integration with Kontact Korganiser 4" title="Google Caldendar integration with Kontact Korganiser 4" width="386" height="335" class="size-full wp-image-881" /></a><p class="wp-caption-text">Google Caldendar integration with Kontact Korganiser 4</p></div>
<li>Select Akonadi Google Calendar Resource</li>
<div id="attachment_882" class="wp-caption aligncenter" style="width: 478px"><a href="http://www.stealthcopter.com/blog/2010/05/setting-up-google-calendar-with-kontact-or-korganiser-using-akonadi/googlecal5/" rel="attachment wp-att-882"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/05/googlecal5.png" alt="Google Caldendar integration with Kontact Korganiser 5" title="Google Caldendar integration with Kontact Korganiser 5" width="468" height="352" class="size-full wp-image-882" /></a><p class="wp-caption-text">Google Caldendar integration with Kontact Korganiser 5</p></div>
<li>Enter your email and password and select ok</li>
<div id="attachment_883" class="wp-caption aligncenter" style="width: 418px"><a href="http://www.stealthcopter.com/blog/2010/05/setting-up-google-calendar-with-kontact-or-korganiser-using-akonadi/googlecal6/" rel="attachment wp-att-883"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/05/googlecal6.png" alt="Google Caldendar integration with Kontact Korganiser 6" title="Google Caldendar integration with Kontact Korganiser 6" width="408" height="192" class="size-full wp-image-883" /></a><p class="wp-caption-text">Google Caldendar integration with Kontact Korganiser 6</p></div>
<li>Your calendar should now sync and appear in korganiser</li>
<div id="attachment_884" class="wp-caption aligncenter" style="width: 610px"><a href="http://www.stealthcopter.com/blog/2010/05/setting-up-google-calendar-with-kontact-or-korganiser-using-akonadi/googlecal7/" rel="attachment wp-att-884"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/05/googlecal7.png" alt="Google Caldendar integration with Kontact Korganiser 7" title="Google Caldendar integration with Kontact Korganiser 7" width="600" height="361" class="size-full wp-image-884" /></a><p class="wp-caption-text">Google Caldendar integration with Kontact Korganiser 7</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.stealthcopter.com/blog/2010/05/setting-up-google-calendar-with-kontact-or-korganiser-using-akonadi/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bash script to toggle samba on and off (and a button KDE)</title>
		<link>http://www.stealthcopter.com/blog/2010/04/bash-script-to-toggle-samba-on-and-off-and-a-button-kde/</link>
		<comments>http://www.stealthcopter.com/blog/2010/04/bash-script-to-toggle-samba-on-and-off-and-a-button-kde/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 15:38:54 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=823</guid>
		<description><![CDATA[I like using samba as a password-less method for people on a network to share and access files on my computer. This works well on a network you trust like a small home network or a small private network, however on different networks restricted access is preferred. For me this problem is solved by simply [...]]]></description>
			<content:encoded><![CDATA[<p>I like using samba as a password-less method for people on a network to share and access files on my computer. This works well on a network you trust like a small home network or a small private network, however on different networks restricted access is preferred. </p>
<p>For me this problem is solved by simply having a button to turn samba on and off. This will also have the side effect that you will not be able to access anyone else&#8217;s shares but is sufficient for my needs.</p>
<p><strong>Bash script</strong></p>
<pre name="code" class="bash">
#!/bin/bash
smb=`sudo /etc/init.d/samba status | grep running | wc -l`
if [ $smb -gt 0 ]
then
	# Stop samba
	sudo /etc/init.d/samba stop
else
	# Start samba
	sudo /etc/init.d/samba restart
fi
</pre>
<p>Where username is replaced with your username.</p>
<p>The script simply checks the status of samba to see if it is running, if it is then it is killed otherwise it is started. kdialog is used to display a notification of which toggle state we are in. </p>
<p><strong>Adding a notification (KDE)</strong></p>
<pre name="code" class="bash">
#!/bin/bash
smb=`sudo /etc/init.d/samba status | grep running | wc -l`
if [ $smb -gt 0 ]
then
	# Stop samba
	sudo /etc/init.d/samba stop
	sudo -u username kdialog --passivepopup 'Samba off' 3
else
	# Start samba
	sudo /etc/init.d/samba restart
	sudo -u username kdialog --passivepopup 'Samba on' 3
fi
</pre>
<p>We run kdialog through `sudo -u username` because when the script is run with sudo the current user will be root, and using this will cause kdialog to display an ugly notification.</p>
<p>For an example of this try running `sudo kdialog &#8220;ugly message&#8221; 3`</p>
<div id="attachment_825" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.stealthcopter.com/blog/2010/04/bash-script-to-toggle-samba-on-and-off-and-a-button-kde/uglykdialog/" rel="attachment wp-att-825"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/03/uglykdialog.png" alt="kdialog run as root showing an ugly notification" title="kdialog run as root showing an ugly notification" width="400" height="254" class="size-full wp-image-825" /></a><p class="wp-caption-text">kdialog run as root showing an ugly notification</p></div>
<p>As opposed to `sudo -u username kdialog &#8211;passivepopup &#8216;lovly message&#8217; 3`<br />
<div id="attachment_826" class="wp-caption aligncenter" style="width: 460px"><a href="http://www.stealthcopter.com/blog/2010/04/bash-script-to-toggle-samba-on-and-off-and-a-button-kde/nicekdialog/" rel="attachment wp-att-826"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/03/nicekdialog.png" alt="kdialog run as user showing an pretty notification" title="kdialog run as user showing an pretty notification" width="450" height="147" class="size-full wp-image-826" /></a><p class="wp-caption-text">kdialog run as user showing an pretty notification</p></div></p>
<p><strong>Creating an icon/button (KDE)</strong><br />
You can then turn this into a button you can simply click my creating a desktop file. In KDE Right click > new > link to application. Then fill in the application tab with the information as in the following image:</p>
<div id="attachment_824" class="wp-caption aligncenter" style="width: 511px"><a href="http://www.stealthcopter.com/blog/2010/04/bash-script-to-toggle-samba-on-and-off-and-a-button-kde/desktopsamba/" rel="attachment wp-att-824"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/03/desktopsamba.png" alt="Samba toggle desktop button configuration" title="Samba toggle desktop button configuration" width="501" height="442" class="size-full wp-image-824" /></a><p class="wp-caption-text">Samba toggle desktop button configuration</p></div>
<p>In the General tab you can give the button a name and choose the icon of your choice, click OK, and now you can drag your button to where ever you want it (taskbar, desktop, panel etc.) Then you can simple push the button to toggle samba on and off.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stealthcopter.com/blog/2010/04/bash-script-to-toggle-samba-on-and-off-and-a-button-kde/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing a Dell 1320c colour laser printer in ubuntu (kubuntu 9.10 x86_64)</title>
		<link>http://www.stealthcopter.com/blog/2010/04/installing-a-dell-1320c-colour-laser-printer-in-ubuntu-kubuntu-9-10-x86_64/</link>
		<comments>http://www.stealthcopter.com/blog/2010/04/installing-a-dell-1320c-colour-laser-printer-in-ubuntu-kubuntu-9-10-x86_64/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 14:59:05 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[printer]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=842</guid>
		<description><![CDATA[This is a nice colour laser printer that I managed to pick up quite cheaply with 2 sets of toner. Problem On my system (kubuntu 9.10 x86_64) it did not appear in lsusb and dmesg showed the following: [15208.550014] usb 1-6: new high speed USB device using ehci_hcd and address 10 [15208.701200] usb 1-6: configuration [...]]]></description>
			<content:encoded><![CDATA[<p>This is a nice colour laser printer that I managed to pick up quite cheaply with 2 sets of toner.</p>
<p><strong>Problem</strong></p>
<p>On my system (kubuntu 9.10 x86_64) it did not appear in lsusb and dmesg showed the following:</p>
<blockquote><p>
[15208.550014] usb 1-6: new high speed USB device using ehci_hcd and address 10<br />
[15208.701200] usb 1-6: configuration #1 chosen from 1 choice<br />
[15208.741575] usblp0: USB Bidirectional printer dev 10 if 0 alt 0 proto 2 vid 0x413C pid 0&#215;5516<br />
[15208.741596] usbcore: registered new interface driver usblp<br />
[15209.747326] usb 1-6: usbfs: interface 0 claimed by usblp while &#8216;usb&#8217; sets config #1
</p></blockquote>
<p>Funnily enough it did appear in the list of devices in virtualbox, however I had no luck trying (and didn&#8217;t really want to) to install it virtually. So I decided I&#8217;d make use of the built in network abilities of the printer and plug it directly into the router (I didn&#8217;t do this initially as I wanted the printer in a different room to the router).</p>
<p><strong>Solution</strong></p>
<p>After setting the printer up on the network, I ensure logged into the web interface and changed the password from the default. I then followed <a href="http://ubuntuforums.org/showthread.php?t=783346">this thread</a> on the ubuntuforums which refers to <a href="http://www.xtr.org/jeff/notes/linux/dell_1320c_printer_linux_install.txt">this text</a> for installing the &#8220;Fuji Xerox DocuPrint C525A&#8221; driver which is compatible with the dell 1320c.</p>
<p>The driver is an 32bit rpm by default (which is fine for redhat based os&#8217;s), you can use alien to convert the rpm to an deb, or you can just download a prebuilt deb from <a href="http://zoffix.com/other/Installing-Dell-1320c-Color-Laser-Printer-on-Ubuntu">zoffix.com</a> (<a href="http://zoffix.com/content-pics/dell_printer/fuji-xerox-docuprint-c525-a-ap_1.0-2_i386.deb">Direct link</a>. This is a 32 bit package still so we need to install it using &#8220;&#8211;force-architecture&#8221;</p>
<blockquote><p>
sudo dpkg -i fuji-xerox-docuprint-c525-a-ap_1.0-2_i386.deb &#8211;force-architecture
</p></blockquote>
<p>Once this driver is installed you can login to cups and configure your printer as you would normally (instructions below). However when you are required to select the printer you need to provide the ppd file manually  if you have installed the driver</p>
<p>1 &#8211; Open a webbrowser and goto http://localhost:631/admin<br />
2 &#8211; Click add printer<br />
3 &#8211; Enter a name for the printer eg: dell1320c (spaces are not allowed)<br />
4 &#8211; Enter the printer address. This is the ip address of your printer prefixed with &#8220;lpd://&#8221;. eg: lpd://192.168.1.121<br />
5 &#8211; Either locate Fuji Xerox DocuPrint C525A or select the ppd directly which is located at /usr/share/cups/model/FujiXerox/en/FX_DocuPrint_C525_A_AP.ppd<br />
6 &#8211; Memory Capacity should be 64MB, and Optional Tray Module should be 250 Sheet Feeder<br />
7 &#8211; finish.</p>
<p><strong>Bypass tray problem</strong></p>
<p>You should now print a test page, however if you get the problem like me that the printer always attempts to load paper from the manual paper feed, you will need to change the paper source from bypass tray to tray 1 in each program you need to print with (hopefully there will be a fix for this, but in this cups there seems no option to set it)</p>
<div id="attachment_844" class="wp-caption aligncenter" style="width: 511px"><a href="http://www.stealthcopter.com/blog/2010/04/installing-a-dell-1320c-colour-laser-printer-in-ubuntu-kubuntu-9-10-x86_64/bypasspaper/" rel="attachment wp-att-844"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/04/bypasspaper.png" alt="Select tray 1 to avoid using bypass paper with dell 1320c in ubuntu" title="Select tray 1 to avoid using bypass paper with dell 1320c in ubuntu" width="501" height="379" class="size-full wp-image-844" /></a><p class="wp-caption-text">Select tray 1 to avoid using bypass paper with dell 1320c in ubuntu</p></div>
<p><strong>Additional</strong></p>
<p>I also noticed that this printer was covering each printed page with tiny yellow dots, which can be used to identify a printer (most likely for criminal matters). </p>
]]></content:encoded>
			<wfw:commentRss>http://www.stealthcopter.com/blog/2010/04/installing-a-dell-1320c-colour-laser-printer-in-ubuntu-kubuntu-9-10-x86_64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiling and running CUDA 2.3 SDK and toolkit on ubuntu 9.10 x64 (64-bit)</title>
		<link>http://www.stealthcopter.com/blog/2010/02/compiling-and-running-cuda-2-3-sdk-and-toolkit-on-ubuntu-9-10-x64-64-bit/</link>
		<comments>http://www.stealthcopter.com/blog/2010/02/compiling-and-running-cuda-2-3-sdk-and-toolkit-on-ubuntu-9-10-x64-64-bit/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 10:30:17 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[computational]]></category>
		<category><![CDATA[CUDA]]></category>
		<category><![CDATA[Nvidia]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=728</guid>
		<description><![CDATA[I&#8217;ve heard a lot about CUDA, such as how it is 10,000% faster at cracking wireless passwords over a conventional program/hardware, but never really got around to testing it out before now. This post details the steps required to compile and setup CUDA 2.3 SDK and toolkit on ubuntu 9.10. Downloads You are required to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve heard a lot about CUDA, such as how it is <a href="http://www.crunchgear.com/2008/10/10/crack-wpa-ten-thousand-percent-faster-with-cuda/">10,000% faster at cracking wireless passwords</a> over a conventional program/hardware, but never really got around to testing it out before now. This post details the steps required to compile and setup CUDA 2.3 SDK and toolkit on ubuntu 9.10.</p>
<p><strong>Downloads</strong><br />
You are required to have an Nvidia graphics driver (relatively new version) already installed. First download the CUDA toolkit and CUDA sdk from the <a href="http://developer.nvidia.com/object/cuda_2_3_downloads.html">Nvidia CUDA 2.3 download page</a>.</p>
<p><strong>Install the toolkit</strong></p>
<pre name="code" class="bash"># Make file executable
chmod +x cudatoolkit_2.3_linux_64_ubuntu9.04.run
# Run it as superuser
sudo ./cudatoolkit_2.3_linux_64_ubuntu9.04.run
</pre>
<p>You now need to edit your .bashrc file in your home directory to include the paths (so your CUDA binaries can be found by the system)</p>
<pre class="bash">export PATH=${PATH}:/usr/local/cuda/bin
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda/lib64</pre>
<p>Note if you are using 32bit then &#8220;lib64&#8243; should be replaced with just &#8220;lib&#8221;</p>
<p><strong>Install the SDK</strong></p>
<pre name="code" class="bash">
# Make file executable
chmod +x cudasdk_2.3_linux.run
# Run it as normal user
./cudasdk_2.3_linux.run
</pre>
<p>You should now have a NVIDIA_GPU_Computing_SDK folder in your home directory. Change directory into the C folder inside this one.</p>
<pre name="code" class="bash">
cd NVIDIA_GPU_Computing_SDK/C
</pre>
<p>In this folder is a make file which will compile all the Nvidia SDK and all the demos, in order for this to work in ubuntu 9.10 (x64) you will need to install several dependencies. By installing these before attempting to make will save you a lot of time, if you are getting errors please scroll down to the problems section to see if they are already covered.</p>
<pre name="code" class="bash">
# Install the necessary libraries
sudo apt-get install freeglut3 freeglut3-dev libx11-dev mesa-common-dev libxmu6
</pre>
<p><strong>Making and running demos</strong></p>
<p>You can then run the make command, once this is ran all of the executables will be placed in  NVIDIA_GPU_Computing_SDK/C/bin/linux/released . We can check that our computer has an useable CUDA device install by running the deviceQuery program:</p>
<pre name="code" class="bash">
cd ~/NVIDIA_GPU_Computing_SDK/C/bin/linux/released
./deviceQuery
</pre>
<p>This should output something similar to the following:</p>
<pre name="code" class="bash">
# ./deviceQuery
CUDA Device Query (Runtime API) version (CUDART static linking)
There is 1 device supporting CUDA

Device 0: "GeForce GTX 260"
  CUDA Driver Version:                           2.30
  CUDA Runtime Version:                          2.30
  CUDA Capability Major revision number:         1
  CUDA Capability Minor revision number:         3
  Total amount of global memory:                 938803200 bytes
  Number of multiprocessors:                     27
  Number of cores:                               216
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       16384 bytes
  Total number of registers available per block: 16384
  Warp size:                                     32
  Maximum number of threads per block:           512
  Maximum sizes of each dimension of a block:    512 x 512 x 64
  Maximum sizes of each dimension of a grid:     65535 x 65535 x 1
  Maximum memory pitch:                          262144 bytes
  Texture alignment:                             256 bytes
  Clock rate:                                    1.47 GHz
  Concurrent copy and execution:                 Yes
  Run time limit on kernels:                     Yes
  Integrated:                                    No
  Support host page-locked memory mapping:       Yes
  Compute mode:                                  Default (multiple host threads can use this device simultaneously)

Test PASSED
</pre>
<p>Now that we can see CUDA is successfully installed and a suitable device is found we can run some of nvidia&#8217;s more ascetically pleasing demos:</p>
<pre name="code" class="bash">
./fluidsGL
</pre>
<div id="attachment_739" class="wp-caption aligncenter" style="width: 610px"><a href="http://www.stealthcopter.com/blog/2010/02/compiling-and-running-cuda-2-3-sdk-and-toolkit-on-ubuntu-9-10-x64-64-bit/cudafluids/" rel="attachment wp-att-739"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/02/cudafluids-600x570.png" alt="CUDA SDK example fluidsGL on ubuntu 9.10 x64" title="CUDA SDK example fluidsGL on ubuntu 9.10 x64" width="600" height="570" class="size-medium wp-image-739" /></a><p class="wp-caption-text">CUDA SDK example fluidsGL on ubuntu 9.10 x64</p></div>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/ITpgGT65PJY&#038;hl=en_GB&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ITpgGT65PJY&#038;hl=en_GB&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<pre name="code" class="bash">
./smokeParticles
</pre>
<div id="attachment_744" class="wp-caption aligncenter" style="width: 610px"><a href="http://www.stealthcopter.com/blog/2010/02/compiling-and-running-cuda-2-3-sdk-and-toolkit-on-ubuntu-9-10-x64-64-bit/cudasmokeparticles/" rel="attachment wp-att-744"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/02/cudasmokeparticles-600x474.png" alt="CUDA SDK example smokeparticles on ubuntu 9.10 x64" title="CUDA SDK example smokeparticles on ubuntu 9.10 x64" width="600" height="474" class="size-medium wp-image-744" /></a><p class="wp-caption-text">CUDA SDK example smokeparticles on ubuntu 9.10 x64</p></div>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/IrKITmwU3jE&#038;hl=en_GB&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/IrKITmwU3jE&#038;hl=en_GB&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<pre name="code" class="bash">
./particles
</pre>
<div id="attachment_765" class="wp-caption aligncenter" style="width: 610px"><a href="http://www.stealthcopter.com/blog/2010/02/compiling-and-running-cuda-2-3-sdk-and-toolkit-on-ubuntu-9-10-x64-64-bit/cuda_particles/" rel="attachment wp-att-765"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/02/cuda_particles-600x473.png" alt="CUDA SDK example particles on ubuntu 9.10 x64" title="CUDA SDK example particles on ubuntu 9.10 x64" width="600" height="473" class="size-medium wp-image-765" /></a><p class="wp-caption-text">CUDA SDK example particles on ubuntu 9.10 x64</p></div>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/wKSy8_GeHFY&#038;hl=en_GB&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/wKSy8_GeHFY&#038;hl=en_GB&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<pre name="code" class="bash">
./postProcessGL
</pre>
<div id="attachment_767" class="wp-caption aligncenter" style="width: 530px"><a href="http://www.stealthcopter.com/blog/2010/02/compiling-and-running-cuda-2-3-sdk-and-toolkit-on-ubuntu-9-10-x64-64-bit/cuda_teapot/" rel="attachment wp-att-767"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/02/cuda_teapot.png" alt="CUDA SDK example postProcessGL on ubuntu 9.10 x64 (teapot)" title="CUDA SDK example postProcessGL on ubuntu 9.10 x64 (teapot)" width="520" height="543" class="size-full wp-image-767" /></a><p class="wp-caption-text">CUDA SDK example postProcessGL on ubuntu 9.10 x64 (teapot)</p></div>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/0Fd7pVQ8OP0&#038;hl=en_GB&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/0Fd7pVQ8OP0&#038;hl=en_GB&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p><strong>Problems</strong></p>
<pre name="code" class="bash">

libxi (<a href="http://forums.nvidia.com/lofiversion/index.php?t30464.html">Nvidia forum link</a>)

make[1]: Leaving directory `/home/mat/NVIDIA_GPU_Computing_SDK/C/common'
make[1]: Entering directory `/home/mat/NVIDIA_GPU_Computing_SDK/C/common'
In file included from ./../common/inc/paramgl.h:24,
                 from src/paramgl.cpp:19:
./../common/inc/GL/glut.h:60:20: error: GL/glu.h: No such file or directory
make[1]: *** [obj/release/paramgl.cpp.o] Error 1
make[1]: Leaving directory `/home/mat/NVIDIA_GPU_Computing_SDK/C/common'
make: *** [lib/libparamgl.so] Error 2
</pre>
<pre>
sudo apt-get install freeglut3 freeglut3-dev libx11-dev mesa-common-dev
</pre>
<pre name="code" class="bash">
/usr/include/bits/mathcalls.h:350: error: inline function ‘int __signbitf(float)’ cannot be declared weak
/usr/include/bits/mathcalls.h:350: error: inline function ‘int __signbitl(long double)’ cannot be declared weak
/usr/include/bits/mathinline.h:36: error: inline function ‘int __signbitf(float)’ cannot be declared weak
/usr/include/bits/mathinline.h:42: error: inline function ‘int __signbit(double)’ cannot be declared weak
/usr/include/bits/mathinline.h:48: error: inline function ‘int __signbitl(long double)’ cannot be declared weak
/usr/local/cuda/bin/../include/math_functions.h:442: error: inline function ‘int __signbitl(long double)’ cannot be declared weak
make[1]: *** [obj/release/particleSystem.cu.o] Error 255
make[1]: Leaving directory `/home/mat/NVIDIA_GPU_Computing_SDK/C/src/particles'
make: *** [src/particles/Makefile.ph_build] Error 2
</pre>
<p>The problem is due to having gcc 4.4 installed rather than 4.3, it is possible to install the older version of this compiler but it is simpler to modify common/common.mk and add the following extra flag (<a href="http://forums.nvidia.com/index.php?showtopic=104525">Nvidia forum link</a>):</p>
<pre class="bash">
# Change:
NVCCFLAGS += --compiler-options -fno-strict-aliasing
# To:
NVCCFLAGS += --compiler-options -fno-strict-aliasing --compiler-options -fno-inline</pre>
<p>and change the -O2</p>
<pre class="bash">
# Change:
COMMONFLAGS += -O2
# To:
COMMONFLAGS += -O0
</pre>
<p>The two remaining errors you may encounter are very similar and arrise from missing libraries:</p>
<p>libxi (<a href="http://forums.nvidia.com/index.php?showtopic=83217">Nvidia forum link</a>)</p>
<pre class="bash">
/usr/bin/ld: cannot find -lXi
collect2: ld returned 1 exit status
make[1]: *** [../../bin/linux/release/particles] Error 1
</pre>
<pre name="code" class="bash">
sudo apt-get install libxi-dev
</pre>
<p>libxmu (<a href="http://forums.nvidia.com/index.php?showtopic=87692">Nvidia forum link</a>)</p>
<pre class="bash">/usr/bin/ld: cannot find -lXmu
collect2: ld returned 1 exit status
make[1]: *** [../../bin/linux/release/particles] Error 1</pre>
<pre name="code" class="bash">
sudo apt-get install libxmu-dev libxmu6
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.stealthcopter.com/blog/2010/02/compiling-and-running-cuda-2-3-sdk-and-toolkit-on-ubuntu-9-10-x64-64-bit/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Utilising the notification system in KDE or Gnome in bash scripts (ubuntu 9.10 / linux)</title>
		<link>http://www.stealthcopter.com/blog/2010/02/utilising-the-notification-system-in-kde-or-gnome-in-bash-scripts-ubuntu-9-10-linux/</link>
		<comments>http://www.stealthcopter.com/blog/2010/02/utilising-the-notification-system-in-kde-or-gnome-in-bash-scripts-ubuntu-9-10-linux/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 00:27:25 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=699</guid>
		<description><![CDATA[So you want to use the nice notification features available in your desktop environment (KDE or Gnome) from a script you wrote? Below explains how to do just that for the two different environments. KDE The code below will use kdialog (should be installed along with kde) to create a popup message that displays for [...]]]></description>
			<content:encoded><![CDATA[<p>So you want to use the nice notification features available in your desktop environment (KDE or Gnome) from a script you wrote? Below explains how to do just that for the two different environments.</p>
<p><strong>KDE</strong></p>
<p>The code below will use kdialog (should be installed along with kde) to create a popup message that displays for 3 seconds before closing:</p>
<pre name="code" class="bash">
kdialog --passivepopup 'notification message!' 3
</pre>
<p>This should look like the image below:</p>
<div id="attachment_701" class="wp-caption aligncenter" style="width: 288px"><a href="http://www.stealthcopter.com/blog/2010/02/utilising-the-notification-system-in-kde-or-gnome-in-bash-scripts-ubuntu-9-10-linux/notification/" rel="attachment wp-att-701"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/02/notification.png" alt="kdialog passive popup notification" title="kdialog passive popup notification" width="278" height="118" class="size-full wp-image-701" /></a><p class="wp-caption-text">kdialog passive popup notification</p></div>
<p>Source: <a href="http://stackoverflow.com/questions/1379804/activating-kde-4-notifications-from-bash-scripts/1379834">stackoverflow</a></p>
<p><strong>Gnome</strong></p>
<p>A similar tool is available for gnome, but to the best of my knowledge (I don&#8217;t really use gnome) you need to install a package. The libnotify-</p>
<pre name="code" class="bash">
sudo apt-get install libnotify-bin
</pre>
<p>The command notify-send can then be used to create notifications from your script.</p>
<pre name="code" class="bash">
notify-send -t 3000 "notification title" "notification text"
</pre>
<p>Where 3000 is the timeout in milliseconds (so 3 seconds). notify-send features some nice additional options such as the ability to include images eg:</p>
<pre name="code" class="bash">
notify-send -i /home/user/exampleicon.png -t 3000 "notification title" "notification text"
</pre>
<p>Source: <a href="http://coderstalk.blogspot.com/2010/02/custom-gnome-notification-for-your-apps.html">Coder&#8217;s Talk </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stealthcopter.com/blog/2010/02/utilising-the-notification-system-in-kde-or-gnome-in-bash-scripts-ubuntu-9-10-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android: Using SVN with your app&#8217;s project (and eclipse)</title>
		<link>http://www.stealthcopter.com/blog/2010/02/android-using-svn-with-your-apps-project-and-eclipse/</link>
		<comments>http://www.stealthcopter.com/blog/2010/02/android-using-svn-with-your-apps-project-and-eclipse/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 17:04:15 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=513</guid>
		<description><![CDATA[When creating any non-trivial program using a versioning system is essential, especially when working in part of a group. This guide aims to be a quick tutorial to the SVN (subversion) tool for versioning and how to use it with an android project. Assumptions You will need SVN installed on your computer. This can be [...]]]></description>
			<content:encoded><![CDATA[<p>When creating any non-trivial program using a versioning system is essential, especially when working in part of a group. This guide aims to be a quick tutorial to the SVN (subversion) tool for versioning and how to use it with an android project.</p>
<p><strong>Assumptions</strong></p>
<ul>
<li>
You will need SVN installed on your computer. This can be done using your package manager or by the following command in ubuntu / debian based systems:</p>
<pre name="code" class="bash">sudo apt-get install subversion</pre>
</li>
<li>
You already have an SVN repository configured. If not please view a tutorial like <a href="http://www.systhread.net/texts/200607subver.php">this</a> or if you have a nice webhost like me (thanks <a href="http://www.dreamhost.com/r.cgi?543037">dreamhost</a> <img src='http://www.stealthcopter.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  ) there may be a simple tool to do this automatically for you in your panel.
</li>
</ul>
<p><strong></strong></p>
<p><strong>Note</strong><br />
Don&#8217;t include the files inside /bin or /gen as they are just build from the source code and will simply fill up a lot space in your SVN. But do include the folders themselves as the project will fail to build without them.</p>
<p><strong>Command line (recommended)</strong><br />
For SVN, I am a great fan of the command line. From the few SVN GUI applications that I have used in the past I can recommend Turtoise SVN for windows and kdesvn for linux (kde) but I still prefer the command line.</p>
<p>The following code will checkout the project from your server. This will create a new folder called &#8220;projectname&#8221; on your computer and download the project from your server (at this point it is most likely an empty folder).</p>
<pre name="code" class="bash">
# Checkout the SVN directory
svn co svn.yourdomain.com/projectname projectname
</pre>
<p>You can then copy or create your android project in this directory. In our project folder there are two folders which contain generated files (as opposed to source files) there is no point uploading these to the svn as you will simply take up space and bandwidth. Before you decided to upload your changes to the server you should empty the bin and gen folders:</p>
<pre name="code" class="bash">
# Empty bin and gen folders
rm -rf ./projectname/bin/*
rm -rf ./projectname/gen/*
</pre>
<p>Each time you add a new file to the project you will need to add (`svn add filename` for single files or `svn add *` for all files):</p>
<pre name="code" class="bash">
# Tell SVN we want to be versioning these files
svn add projectname/*
</pre>
<p>When you are happy with your changes you can commit (`svn commit -m &#8220;message&#8221;`) your changes to the svn to create a new version, it is mandatory to include a message with each revision and it is best to be as detailed as possible with the changes made. This makes it much easier to hunt down where a bug or regression was introduced.</p>
<pre name="code" class="bash">
# Save the changes and upload to repository
svn commit -m "Initial import of projectname"
</pre>
<p>Each time you commit or wish to upgrade what is stored locally to the latest version on the server you need to use the following:</p>
<pre name="code" class="bash">
# Update the locally stored version
svn update projectname
</pre>
<p><strong>Further points</strong><br />
Eclipse has a plugin to manage SVN download and install instructions can be found <a href="http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stealthcopter.com/blog/2010/02/android-using-svn-with-your-apps-project-and-eclipse/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Bash: Script to find active computers in a subnet using ping</title>
		<link>http://www.stealthcopter.com/blog/2010/01/bash-script-to-find-active-computers-in-a-subnet-using-ping/</link>
		<comments>http://www.stealthcopter.com/blog/2010/01/bash-script-to-find-active-computers-in-a-subnet-using-ping/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 21:44:14 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=511</guid>
		<description><![CDATA[The following is a simple bash script that will scan each ip address in a give subnet and report if they are alive (or accepting ping requests). The code creates processes for each ping so that it completes quickly rather than scanning each ip address sequentially. Create a text file called &#8220;pinger.sh&#8221; and paste the [...]]]></description>
			<content:encoded><![CDATA[<p>The following is a simple bash script that will scan each ip address in a give subnet and report if they are alive (or accepting ping requests). The code creates processes for each ping so that it completes quickly rather than scanning each ip address sequentially.</p>
<p>Create a text file called &#8220;pinger.sh&#8221; and paste the following into it:</p>
<pre name="code" class="bash">
#!/bin/sh

: ${1?"Usage: $0 ip subnet to scan. eg '192.168.1.'"}

subnet=$1
for addr in `seq 0 1 255 `; do
#   ( echo $subnet$addr)
( ping -c 3 -t 5 $subnet$addr > /dev/null &#038;&#038; echo $subnet$addr is Alive ) &#038;
done
</pre>
<p>Save and close, then it can be called from the command line like so:</p>
<pre name ="code" class="bash">
sh pinger.sh 192.168.1.
</pre>
<p>This will scan from 192.168.1.0 to 192.168.1.255 and will return something like the following:</p>
<pre name ="code" class="bash">
192.168.1.1 is Alive
192.168.1.105 is Alive
192.168.1.112 is Alive
192.168.1.149 is Alive
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.stealthcopter.com/blog/2010/01/bash-script-to-find-active-computers-in-a-subnet-using-ping/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bash: Script to convert .flv to mp3</title>
		<link>http://www.stealthcopter.com/blog/2010/01/bash-script-to-convert-flv-to-mp3/</link>
		<comments>http://www.stealthcopter.com/blog/2010/01/bash-script-to-convert-flv-to-mp3/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 21:04:50 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=484</guid>
		<description><![CDATA[Flash Video (.FLV) is currently a very popular format of online videos, inparticular youtube. This post explains how to use a simple script to extract the sound from a flash video file and turn it into an mp3. In order for the script to work you will need to download ffmpeg (to decode the video) [...]]]></description>
			<content:encoded><![CDATA[<p>Flash Video (.FLV) is currently a very popular format of online videos, inparticular youtube. This post explains how to use a simple script to extract the sound from a flash video file and turn it into an mp3.</p>
<p>In order for the script to work you will need to download ffmpeg (to decode the video) and lame (to encode the mp3). This can be achieve in ubuntu by opening a terminal and running the following or alternatively you can use your package manager GUI to search and download the packages for you.</p>
<blockquote><p>
sudo apt-get install ffmpeg lame
</p></blockquote>
<p>You then need to create a new file named &#8220;flv2mp3.sh&#8221; and paste the following into it using your preferred text editor (which hopefully isn&#8217;t VI). Save the file and then change the file permissions so that it is executable (by running:`chmod a+x flv2mp3.sh` in the terminal or via the gui in you file browser)</p>
<pre name="code" class="bash">
#!/bin/sh
# this script should convert files from FLV to WAV and then to MP3
echo " "
echo "  Welcome to FLV to MP3 converter!  version 0.1"
echo " "
infile_name="$@"
# exit if the user did not enter anything:
if [ -z "$infile_name" ]; then
    echo " "
    echo "You did not tell me the file name, so I will exit now."
    echo " "
    exit
fi
echo " "
ffmpeg -i "$infile_name" -acodec pcm_s16le -ac 2 -ab 128k -vn -y "${infile_name%.flv}.wav"
lame --preset cd "${infile_name%.flv}.wav" "${infile_name%.flv}.mp3"
rm "${infile_name%.flv}.wav"
echo " "
echo "OK. I'm done! Have fun!"
echo " "
exit
</pre>
<p>You should now be able to convert a flashvideo into an mp3 by running the following command (changing the filenames to fit your purpose):<br />
<code>sh flv2mp3.sh videofilename.flv mp3audiofilename.mp3</code></p>
<p><strong>Extra: Youtube</strong><br />
In linux it might be worth noting that youtube downloads the flv&#8217;s to your /tmp folder and you can easily copy them or convert to mp3&#8242;s (Ensure video is completly finished loading).</p>
<p>Also there is an application called &#8216;youtube-dl&#8217; which can be installed from the repositories</p>
<blockquote><p>sudo apt-get install youtube-dl</p></blockquote>
<p>and then run using</p>
<blockquote><p>youtube-dl http://www.youtube.com/video_to_borrow</p></blockquote>
<p>Of course it&#8217;s up to your moral guidance to decide what you can and can&#8217;t download.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stealthcopter.com/blog/2010/01/bash-script-to-convert-flv-to-mp3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programming Android Apps: SDK and Eclipse (ubuntu)</title>
		<link>http://www.stealthcopter.com/blog/2010/01/programming-android-apps-sdk-and-eclipse-ubuntu/</link>
		<comments>http://www.stealthcopter.com/blog/2010/01/programming-android-apps-sdk-and-eclipse-ubuntu/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 13:59:43 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=382</guid>
		<description><![CDATA[Android is a brilliant smart phone operating system, this is the start of a short series of guides for starting to program applications for it using the android SDK. Android SDK Download the android SDK Once downloaded untar the SDK tar xvzf android-sdk_r04-linux_86.tgz The SDK is not complete as additional files need to be downloaded [...]]]></description>
			<content:encoded><![CDATA[<p>Android is a brilliant smart phone operating system, this is the start of a short series of guides for starting to program applications for it using the android SDK.</p>
<p><strong>Android SDK</strong><br />
Download the <a href="http://developer.android.com/sdk/index.html">android SDK</a></p>
<p>Once downloaded untar the SDK</p>
<blockquote><p>
tar xvzf android-sdk_r04-linux_86.tgz
</p></blockquote>
<p>The SDK is not complete as additional files need to be downloaded in order to compile for different versions of android. Open the SDK and AVG management application by moving into the SDK folder and running the following.</p>
<blockquote><p>
sh tools/android
</p></blockquote>
<p>In the <strong>avaliable packages</strong> select the android versions you wish to develop for, and begin downloading them. Should this fail please read the next section, otherwise skip ahead.</p>
<p><strong>Failing to download</strong><br />
If you cannot download from the google website, goto settings and select &#8220;force https://&#8230; source to be fetched using  http://&#8221; and click save and apply. </p>
<div id="attachment_388" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.stealthcopter.com/blog/wp-content/uploads/2010/01/android_force_http.png"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/01/android_force_http-300x174.png" alt="android force http" title="android_force_http" width="300" height="174" class="size-medium wp-image-388" /></a><p class="wp-caption-text">forcing SDK and AVD manager http instead of https for android </p></div>
<p>If this still does not work (as was the case for me) it is possible that for some reason a configuration file was not created for this program, this can be solved by creating it manually:</p>
<blockquote><p>
echo sdkman.force.http=true > ~/.android/androidtool.cfg
</p></blockquote>
<p><strong>Creating Android Virtual Devices</strong><br />
You can create virtual android phones using the SDK and AVD manager, click the Virtual Device tab and select new. Enter a name for the device, and a size for the sd card and simply click create AVD.</p>
<div id="attachment_391" class="wp-caption aligncenter" style="width: 230px"><a href="http://www.stealthcopter.com/blog/wp-content/uploads/2010/01/android_create_avd.png"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/01/android_create_avd-220x300.png" alt="android create avd" title="android_create_avd" width="220" height="300" class="size-medium wp-image-391" /></a><p class="wp-caption-text">creation of an android virtual device</p></div>
<p>Once you&#8217;ve created you Virtual Device(s) it should look like the following:</p>
<div id="attachment_392" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.stealthcopter.com/blog/wp-content/uploads/2010/01/android_avds.png"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/01/android_avds-300x174.png" alt="android avd&#039;s" title="android_avds" width="300" height="174" class="size-medium wp-image-392" /></a><p class="wp-caption-text">Android Virtual Devices</p></div>
<p>You can test these virtual devices and see how nicely the phones are emulated. This is much more useful once you begin writing applications.</p>
<div id="attachment_394" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.stealthcopter.com/blog/wp-content/uploads/2010/01/android_virtual_device.png"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/01/android_virtual_device-300x251.png" alt="Android virtual device" title="android_virtual_device" width="300" height="251" class="size-medium wp-image-394" /></a><p class="wp-caption-text">Android Virtual Device in action</p></div>
<p><strong>Eclipse</strong></p>
<p>I would highly recommend using eclipse as it, along with the android plugin, greatly simplifies production and testing of applications.</p>
<p>Download eclipse from the ubuntu repositories (or from <a href="http://www.eclipse.org/downloads/">the eclipse website</a>)</p>
<blockquote><p>
sudo apt-get install eclipse
</p></blockquote>
<p>If you do not already have java installed then you will need to install it.</p>
<blockquote><p>
sudo apt-get install sun-java6-jdk sun-java6-jre
</p></blockquote>
<p>You will need to add the following line to your .bashrc in your home folder so that the android tools can be used in eclipse (and other programs).</p>
<blockquote><p>
export PATH=${PATH}:/home/user/android/sdk/tools
</p></blockquote>
<p><strong>* replace /home/user/android/sdk with the path to where you downloaded the SDK</strong></p>
<p><strong>Installing the android plugin for eclipse</strong><br />
Google&#8217;s eclipse plugin <a href="https://dl-ssl.google.com/android/eclipse/">install guide</a>.</p>
<p>In eclipse goto help then Install new software and then add the google plugin url</p>
<blockquote>
<p>https://dl-ssl.google.com/android/eclipse/</p>
</blockquote>
<div id="attachment_412" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.stealthcopter.com/blog/wp-content/uploads/2010/01/eclipse_addnew.png"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/01/eclipse_addnew-300x278.png" alt="Install software" title="eclipse_addnew" width="300" height="278" class="size-medium wp-image-412" /></a><p class="wp-caption-text">Install new software in eclipse</p></div>
<p>Then install Android DDMS and Android Development Tools.</p>
<p>Should you receive errors (like I did) relating to a missing package you will need to add the eclipse repository and install the missing packages.</p>
<blockquote>
<p>http://download.eclipse.org/releases/galileo</p>
</blockquote>
<p>You should then have a fully working eclipse with android plugin.</p>
<div id="attachment_409" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.stealthcopter.com/blog/wp-content/uploads/2010/01/android_eclipse_main.png"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2010/01/android_eclipse_main-300x180.png" alt="Eclipse main window" title="android_eclipse_main" width="300" height="180" class="size-medium wp-image-409" /></a><p class="wp-caption-text">Eclipse main window</p></div>
<p><strong>What next?</strong><br />
Now you should have everything setup in order to develop and android applications. I would recommend the google tutorials:</p>
<ul>
<li><a href="http://developer.android.com/guide/tutorials/hello-world.html">Hello World</a></li>
<li><a href="http://developer.android.com/guide/tutorials/notepad/index.html">Notepad</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.stealthcopter.com/blog/2010/01/programming-android-apps-sdk-and-eclipse-ubuntu/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Free</title>
		<link>http://www.stealthcopter.com/blog/2009/05/free/</link>
		<comments>http://www.stealthcopter.com/blog/2009/05/free/#comments</comments>
		<pubDate>Sun, 17 May 2009 19:24:34 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=61</guid>
		<description><![CDATA[Using the free command gives output something like this (-m just tells free to output in megabytes): free -m total used free shared buffers cached Mem: 2013 1996 17 0 27 1381 -/+ buffers/cache: 588 1425 Swap: 956 0 956 This is useful but annoying as it doesn&#8217;t show you how much memory is actually [...]]]></description>
			<content:encoded><![CDATA[<p>Using the free command gives output something like this (-m just tells free to output in megabytes):</p>
<blockquote><p>
free -m<br />
             total       used       free     shared    buffers     cached<br />
Mem:          2013       1996         17          0         27       1381<br />
-/+ buffers/cache:        588       1425<br />
Swap:          956          0        956
</p></blockquote>
<p>This is useful but annoying as it doesn&#8217;t show you how much memory is actually free. Files that are used are kept in the ram (referred to as caching). If the memory is needed it is simply overwritten, however if the file is used again it is already in the memory which saves time. </p>
<p>I wrote a quick little bash line to get the actually memory in use or the actual memory free. I use grep to select the right line from the output of free, and then use awk to do the string manipulation and math.</p>
<p>Memory in use</p>
<blockquote><p>free -m | grep Mem | awk &#8216;{x=$3-$7; print x}&#8217;</p></blockquote>
<p>Memory free</p>
<blockquote><p>free -m | grep Mem | awk &#8216;{x=$2-($3-$7); print x}&#8217;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.stealthcopter.com/blog/2009/05/free/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Karamba &#8211; System Monitor Basis</title>
		<link>http://www.stealthcopter.com/blog/2009/05/karamba-system-monitor-basis/</link>
		<comments>http://www.stealthcopter.com/blog/2009/05/karamba-system-monitor-basis/#comments</comments>
		<pubDate>Sun, 17 May 2009 01:09:05 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[superkaramba]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[widgets]]></category>

		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=41</guid>
		<description><![CDATA[I posted my superkaramba system monitor on kde-look.org. Hopefully it will be useful to some people as a basis for their own system monitors. Note that it&#8217;s transparent not grey, so looks a little better with the whole screen included in the second picture.]]></description>
			<content:encoded><![CDATA[<p><a title="karamba1" href="#" onclick="window.open('/blog/wp-content/plugins/simple-popup-images/popup.php?z=http://www.stealthcopter.com/images/karamba/karamba2.jpg&#038;width=480&#038;height=299&#038;title=karamba1','imagepopup','width=480,height=299,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no,screenx=150,screeny=150');return false" onmouseover="window.status='image popup: karamba1';return true" onmouseout="window.status='';return true"><img src="http://www.stealthcopter.com/images/karamba/karamba2.jpg" width="480" height="299" alt="karamba1" title="karamba1" /></a></p>
<p>I posted my superkaramba system monitor on <a href="http://kde-look.org/content/show.php?content=104945">kde-look.org</a>. Hopefully it will be useful to some people as a basis for their own system monitors. Note that it&#8217;s transparent not grey, so looks a little better with the whole screen included in the second picture.</p>
<p><a title="karamba" href="#" onclick="window.open('/blog/wp-content/plugins/simple-popup-images/popup.php?z=http://www.stealthcopter.com/images/karamba/karamba.jpg&#038;width=158&#038;height=368&#038;title=karamba','imagepopup','width=158,height=368,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no,screenx=150,screeny=150');return false" onmouseover="window.status='image popup: karamba';return true" onmouseout="window.status='';return true"><img src="http://www.stealthcopter.com/images/karamba/karamba.jpg" width="158" height="368" alt="karamba" title="karamba" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stealthcopter.com/blog/2009/05/karamba-system-monitor-basis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>apt &#8211; no public key error</title>
		<link>http://www.stealthcopter.com/blog/2009/05/apt-no-public-key-error/</link>
		<comments>http://www.stealthcopter.com/blog/2009/05/apt-no-public-key-error/#comments</comments>
		<pubDate>Sun, 17 May 2009 00:52:37 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=34</guid>
		<description><![CDATA[If you add a new repository to apt (/etc/apt/sources.list) you may get the following error when running &#8216;sudo apt-get update&#8217;: Reading package lists… Done W: There is no public key available for the following key IDs: [Key] W: You may want to run apt-get update to correct these problems As you probably already guessed, running [...]]]></description>
			<content:encoded><![CDATA[<p>If you add a new repository to apt (/etc/apt/sources.list) you may get the following error when running &#8216;sudo apt-get update&#8217;:</p>
<blockquote><p>
Reading package lists… Done<br />
W: There is no public key available for the following key IDs:<br />
[Key]<br />
W: You may want to run apt-get update to correct these problems
</p></blockquote>
<p>As you probably already guessed, running &#8216;sudo apt-get update&#8217; will result in exactly the same problem. This is because the new repository&#8217;s key needs to verified. This is done by the following:</p>
<blockquote><p>
gpg &#8211;keyserver subkeys.pgp.net &#8211;recv  [Key]<br />
gpg &#8211;export [Key] | sudo apt-key add -
</p></blockquote>
<p><em>replace [Key] with the key you want to add</em></p>
<p>This can also be made slightly easier by using a bash variable:</p>
<blockquote><p>
$1=[key]<br />
gpg &#8211;keyserver subkeys.pgp.net &#8211;recv  $1<br />
gpg &#8211;export $1 | sudo apt-key add -
</p></blockquote>
<p><em>replace [Key] with the key you want to add</em></p>
<p>or as a bash script:</p>
<blockquote><p>
#!/bin/sh<br />
gpg &#8211;keyserver subkeys.pgp.net &#8211;recv  $1<br />
gpg &#8211;export $1 | sudo apt-key add -</p></blockquote>
<p>ran by the following:</p>
<blockquote><p>./key [key]</p></blockquote>
<p><em>replace [Key] with the key you want to add</em><br />
which then you could place in /bin so you could simply run</p>
<p>Script can be downloaded <a href="http://www.stealthcopter.com/files/bash/key">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stealthcopter.com/blog/2009/05/apt-no-public-key-error/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bash: mass image and video conversions</title>
		<link>http://www.stealthcopter.com/blog/2009/05/bash-mass-file-conversions/</link>
		<comments>http://www.stealthcopter.com/blog/2009/05/bash-mass-file-conversions/#comments</comments>
		<pubDate>Sat, 16 May 2009 01:49:58 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=4</guid>
		<description><![CDATA[Linux has many useful command line programs that will convert from one file format to another. convert &#8211; converts images (part of ImageMagick) convert input.jpg -resize 500&#215;500 output.jpg converts input.jpg to output.jpg resized to 500 by 500 pixels mencoder &#8211; converts video files mencoder -ovc lavc -oac mp3lame -o output.avi input.flv converts input.flv to output.avi [...]]]></description>
			<content:encoded><![CDATA[<p>Linux has many useful command line programs that will convert from one file format to another.</p>
<li>convert &#8211; converts images (part of <a href="http://www.imagemagick.org">ImageMagick</a>)</li>
<blockquote><p>convert input.jpg -resize 500&#215;500 output.jpg</p></blockquote>
<p><em>converts input.jpg to output.jpg resized to 500 by 500 pixels</em></p>
<li>mencoder &#8211; converts video files</li>
<blockquote><p>mencoder -ovc lavc -oac mp3lame -o output.avi input.flv</p></blockquote>
<p><em>converts input.flv to output.avi</em></p>
<p>Now lets look at some bash:</p>
<blockquote><p>for i in *.jpg; do echo $i; done</p></blockquote>
<p>This is a for loop which will assign and iterate over a variable i to every item it finds that matches *.jpg in the current directory. It will simple echo the name of the file to the console and then finish. Only really useful for testing the command works, now lets put a conversion command in instead of the echo.</p>
<blockquote><p>for i in *.jpg; do convert &#8220;$i&#8221; -resize 500&#215;500 &#8220;x_$i&#8221;; done</p></blockquote>
<p>This will take every jpg in the current directory resize it to 500 by 500 pixels and then save it as with and x_ prefixing the filename. You can get it to overwrite the current file by making the input and output file names equal (in this case it simple means removing x_ from the above code)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stealthcopter.com/blog/2009/05/bash-mass-file-conversions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Streaming media from Linux to PS3</title>
		<link>http://www.stealthcopter.com/blog/2008/08/streaming-media-from-linux-to-ps3/</link>
		<comments>http://www.stealthcopter.com/blog/2008/08/streaming-media-from-linux-to-ps3/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 22:40:59 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mediatomb]]></category>
		<category><![CDATA[ps3]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=16</guid>
		<description><![CDATA[I wanted to watch some of the videos that I have on my computer on my playstation 3, so that lead me to search for media server applications. I found out that you could set this up quite easily from within Windows Media Player, however as a linux user I knew there was probably a [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to watch some of the videos that I have on my computer on my playstation 3, so that lead me to search for media server applications. I found out that you could set this up quite easily from within Windows Media Player, however as a linux user I knew there was probably a much better linux based solution available.</p>
<p>After a few minutes of googling, I found a program called Mediatomb. It is avaliable at <a href="http://mediatomb.cc/">mediatomb.cc</a></p>
<p>mediatomb is in the ubuntu repositories, so all that is needed to install it is:</p>
<blockquote><p>sudo apt-get install mediatomb</p></blockquote>
<p>All you need to do once it is setup is to open up the config file located at ~/.mediatomb/config.xml<br />
and to add the following below the &lt;server&gt; line</p>
<blockquote><p>
&lt;server&gt;<br />
&lt;protocolInfo extend=&#8221;yes&#8221;/&gt;
</p></blockquote>
<p>then in the mappings section, add any file formats that you want to be forwarded. In this example .avi and .divx files have been added</p>
<blockquote><p>   &lt;mappings&gt;<br />
&lt;extension-mimetype ignore-unknown=&#8221;no&#8221;&gt;<br />
<strong>&lt;map from=&#8221;avi&#8221; to=&#8221;video/x-divx&#8221;/&gt;<br />
&lt;map from=&#8221;divx&#8221; to=&#8221;video/x-divx&#8221;/&gt;</strong></p></blockquote>
<p>Once this is all done, you can run mediatomb, and it will give you an output like the following:</p>
<blockquote><p>
MediaTomb UPnP Server version 0.11.0 &#8211; http://mediatomb.cc/</p>
<p>===============================================================================<br />
Copyright 2005-2008 Gena Batsyan, Sergey Bostandzhyan, Leonhard Wimmer.<br />
MediaTomb is free software, covered by the GNU General Public License version 2</p>
<p>2008-08-13 23:46:19    INFO: Loading configuration from: /home/mat/.mediatomb/config.xml<br />
2008-08-13 23:46:19    INFO: Checking configuration&#8230;<br />
2008-08-13 23:46:19    INFO: Setting filesystem import charset to UTF-8<br />
2008-08-13 23:46:19    INFO: Setting metadata import charset to UTF-8<br />
2008-08-13 23:46:19    INFO: Setting playlist charset to UTF-8<br />
2008-08-13 23:46:19    INFO: Configuration check succeeded.<br />
2008-08-13 23:46:19    INFO: Initialized port: 49152<br />
2008-08-13 23:46:19    INFO: Server bound to: 192.168.0.4<br />
2008-08-13 23:46:20    INFO: MediaTomb Web UI can be reached by following this link:<br />
2008-08-13 23:46:20    INFO: http://192.168.0.4:49152/
</p></blockquote>
<p>The last line shows the information of use, using the ip address you can login to the web interface for the mediatomb server, from there you can add the folders you wish to be shared.</p>
<p>Then on the PS3 or whatever device you are using, you should be able to access the files that you have shared. My PS3 automatically found the server but also had the option to scan for media servers. The only problem with the playstation is that it will refuse to play some files, but most of the videos I tried worked.</p>
<p>Conclusion: Pretty dam cool</p>
<p>The following link is a slightly better guide, than my brief overview <a href="http://www.freesoftwaremagazine.com/columns/upnp_mediatomb_ps3_and_me">http://www.freesoftwaremagazine.com/columns/upnp_mediatomb_ps3_and_me</a><br />
P.S. Media tomb also shares images and music files etc&#8230; forgot to mention it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stealthcopter.com/blog/2008/08/streaming-media-from-linux-to-ps3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
