<?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/category/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>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>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>acid3 tests firefox chrome konqueror arora on ubuntu x64 karmic</title>
		<link>http://www.stealthcopter.com/blog/2009/09/acid3-tests-firefox-chrome-konqueror-arora-on-ubuntu-x64-karmic/</link>
		<comments>http://www.stealthcopter.com/blog/2009/09/acid3-tests-firefox-chrome-konqueror-arora-on-ubuntu-x64-karmic/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 14:35:18 +0000</pubDate>
		<dc:creator>mat</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[acid3]]></category>
		<category><![CDATA[browser]]></category>

		<guid isPermaLink="false">http://www.stealthcopter.com/blog/?p=92</guid>
		<description><![CDATA[I preformed some acid3 tests on the browsers I currently had installed. Chrome: It is sexy (only thing holding it back in Linux is the lack of flash support) Score: 100/100 Version: 4.0.203.2 Opera: I used to use opera however not really any more, just installed it for this test. Score: 100/100 Version: 10.00 (build [...]]]></description>
			<content:encoded><![CDATA[<p>I preformed some <a href="http://acid3.acidtests.org/">acid3</a> tests on the browsers I currently had installed.</p>
<p><strong>Chrome</strong>: It is sexy (only thing holding it back in Linux is the lack of flash support)<br />
<strong>Score: 100/100</strong><br />
<strong>Version: 4.0.203.2</strong><br />
<a href="http://www.stealthcopter.com/blog/wp-content/uploads/2009/09/acid3-chrome.png"><br />
<img src="/blog/wp-content/uploads/2009/09/acid3-chrome-thumbnail.png" alt="acid3-test-chrome" /><br />
</a></p>
<p><strong>Opera</strong>: I used to use opera however not really any more, just installed it for this test.<br />
<strong>Score: 100/100</strong><br />
<strong>Version: 10.00 (build 4585)</strong><br />
<a href="http://www.stealthcopter.com/blog/wp-content/uploads/2009/09/acid3-opera.png"><br />
<img src="/blog/wp-content/uploads/2009/09/acid3-opera-thumbnail.png" alt="acid3-test-opera" /><br />
</a></p>
<p><strong>Arora</strong>: I don&#8217;t tend to use Arora, however I&#8217;ve heard alot of good things about it. It is a light-weight browser based on web-kit (as are chrome, safari and konqueror) and excels at its speed, highly recommended for notebooks which don&#8217;t need the bloat of firefox.<br />
<strong>Score: 100/100 Linktest failed.</strong><br />
<strong>Version:0.8.0</strong><br />
<a href="http://www.stealthcopter.com/blog/wp-content/uploads/2009/09/acid3-arora.png"><br />
<img src="/blog/wp-content/uploads/2009/09/acid3-arora-thumbnail.png" alt="acid3-test-arora" /><br />
</a></p>
<p><strong>Firefox</strong>: It seems to handle flash better (without crashing) and has lots of useful plugins.<br />
<strong>Score: 93/100</strong><br />
<strong>Version: 3.5.2</strong><br />
<a title="acid3-ff" href="#" onclick="window.open('/blog/wp-content/plugins/simple-popup-images/popup.php?z=http://www.stealthcopter.com/blog/wp-content/uploads/2009/09/acid3-ff.png&#038;width=1169&#038;height=852&#038;title=acid3-ff','imagepopup','width=1169,height=852,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: acid3-ff';return true" onmouseout="window.status='';return true"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2009/09/acid3-ff-thumbnail.png" width="550" height="401" alt="acid3-ff" title="acid3-ff" /></a></p>
<p><strong>Konqueror</strong>:<br />
<strong>Score: 89/100 Linktest failed.</strong><br />
<strong>Version: 4.3.1</strong><br />
<a title="acid3-konq" href="#" onclick="window.open('/blog/wp-content/plugins/simple-popup-images/popup.php?z=http://www.stealthcopter.com/blog/wp-content/uploads/2009/09/acid3-konq.png&#038;width=1168&#038;height=869&#038;title=acid3-konq','imagepopup','width=1168,height=869,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: acid3-konq';return true" onmouseout="window.status='';return true"><img src="http://www.stealthcopter.com/blog/wp-content/uploads/2009/09/acid3-konq-thumbnail.png" width="550" height="409" alt="acid3-konq" title="acid3-konq" /></a></p>
<p>Google&#8217;s chrome comes first (with chrome having smoother and faster animation) followed by Opera and closely followed by Arora only failing on the link test, then firefox and trailing is konqueror. But I still love konqueror as its so convenient have filemanager and web-browser in one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stealthcopter.com/blog/2009/09/acid3-tests-firefox-chrome-konqueror-arora-on-ubuntu-x64-karmic/feed/</wfw:commentRss>
		<slash:comments>0</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>
	</channel>
</rss>
