<?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; Linux</title>
	<atom:link href="http://www.stealthcopter.com/blog/tag/linux/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>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>Partitions and disk space in linux</title>
		<link>http://www.stealthcopter.com/blog/2009/09/partitions-and-disk-space-in-linux/</link>
		<comments>http://www.stealthcopter.com/blog/2009/09/partitions-and-disk-space-in-linux/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 23:19:51 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=66</guid>
		<description><![CDATA[I&#8217;m sure there are many ways to see the partitions and corresponding diskspace in linux, but here is the method I found: $df -m Filesystem 1M-blocks Used Available Use% Mounted on /dev/sda2 7513 5937 1576 80% / tmpfs 1005 0 1005 0% /lib/init/rw varrun 1005 1 1005 1% /var/run varlock 1005 0 1005 0% /var/lock [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sure there are many ways to see the partitions and corresponding diskspace in linux, but here is the method I found:</p>
<blockquote><p>$df -m<br />
Filesystem           1M-blocks      Used Available Use% Mounted on<br />
/dev/sda2                 7513      5937      1576  80% /<br />
tmpfs                     1005         0      1005   0% /lib/init/rw<br />
varrun                    1005         1      1005   1% /var/run<br />
varlock                   1005         0      1005   0% /var/lock<br />
udev                      1005         1      1005   1% /dev<br />
tmpfs                     1005         1      1005   1% /dev/shm<br />
/dev/sdc1               469453    353295     92311  80% /media/x<br />
/dev/sdd1              1408345    979205    429141  70% /media/z
</p></blockquote>
<p>or visually:</p>
<p><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2009/09/df.png" alt="df -m screenshot" /></p>
<p>I kept struggeling to remember what letters it was, as there are many two letter commands beginning with d in linux&#8230; (dc, dd, df, dh, do, dl, du). I now remember it, because &#8216;f&#8217; is next to the &#8216;d&#8217; key on my keyboard, and because df probably stands for disk-free. </p>
<p>For more information check out <a href="http://www.computerhope.com/unix/udf.htm">this site</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stealthcopter.com/blog/2009/09/partitions-and-disk-space-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</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>
