<?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>Linux User &#187; Programming</title>
	<atom:link href="http://www.linuxuser.co.uk/category/tutorials/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linuxuser.co.uk</link>
	<description></description>
	<lastBuildDate>Wed, 08 Feb 2012 13:02:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>The art of unit testing explained</title>
		<link>http://www.linuxuser.co.uk/features/the-art-of-unit-testing-explained/</link>
		<comments>http://www.linuxuser.co.uk/features/the-art-of-unit-testing-explained/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 14:58:18 +0000</pubDate>
		<dc:creator>RussellBarnes</dc:creator>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[feature]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=6395</guid>
		<description><![CDATA[Swayam Prakasha explores and explains one of the most important methodologies in modern software development…]]></description>
			<content:encoded><![CDATA[<!--Unit-testing-15.46.26--><!--Unit-testing-15.47.41-1024x359--><p style="text-align: center;"><a rel="attachment wp-att-6401" href="http://www.linuxuser.co.uk/features/the-art-of-unit-testing-explained/attachment/unit-testing-15-46-26/"><img class="aligncenter size-full wp-image-6401" title="Unit testing 15.46.26" src="http://www.linuxuser.co.uk/wp-content/uploads/2011/10/Unit-testing-15.46.26.png" alt="The art of unit testing explained" width="460" height="456" /></a></p>
<p>Software development and testing are considered to be two sides of the same coin. It is not surprising to see that a lot of focus is given to the testing phase and this only ensures better quality, thereby enhancing the customer satisfaction. Software testing plays a significant role in the success of any project. In simple words, software testing can be defined as a process of verifying and validating that a software application or program meets the business and technical requirements that guided its design and development, and works as expected. It is this testing phase that identifies defects, flaws or errors that need to be fixed.</p>
<p>Software testing has three main purposes:</p>
<ol>
<li>Verification</li>
<li>Validation</li>
<li>Defect finding</li>
</ol>
<p>The verification process confirms that the software meets its technical specifications. A specification is a description of a function in terms of a measurable output value given a specific input value under<br />
specific preconditions.</p>
<p>The validation process confirms that the software meets the business requirements.  A defect is a variance between the expected and actual result. The defect’s ultimate source may be traced to a fault introduced in the specification, design, or development (coding) phases.</p>
<p>Software testing answers questions that development testing and code reviews can’t. Some of the questions answered by software testing are:</p>
<ol>
<li>Does it meet the users’ requirements?</li>
<li>Does it <em>really</em> work as expected?</li>
<li>How does it <em>scale</em> when more users are added?</li>
<li>What about its performance?</li>
<li>How does it <em>work</em> when more users are added?</li>
<li>Is it ready for release?</li>
</ol>
<p>When we are able to find answers to the above questions, it saves time and money by identifying defects early. It also reduces development downtime. We will be able to provide better customer service by delivering a better application. And the important thing is that it will help us to identify the areas where our programmers need trainings.</p>
<p>The value of software testing is that it goes far beyond testing the underlying code. It also examines the functional behaviour of the application. Behaviour is a function of the code, but it doesn’t always follow that if the behaviour is bad then the code is bad. It’s entirely possible that the code is solid, but the requirements were inaccurately or incompletely collected and communicated. It’s entirely possible that the application can be doing exactly what we’re telling it to do, but we’re not telling it to do the right thing. It is important to understand that the testing provides an opportunity to validate and verify things like the assumptions that went into the requirements, the appropriateness of the systems that the application is to run on etc.</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p>The V-model has gained acceptance because of its simplicity and straightforwardness. If you look at the pictorial representation of V-model, the first test level is unit testing. It is also known as component testing. Unit testing can be considered as a method by which individual units are tested to see whether they are functioning as expected. Unit testing is typically done by software developers, as they are the only ones who understand how a specific unit or module works.</p>
<p>The problem with testing a unit is that it performs only a small part of the functionality of a system, and it relies on co-operating with other parts of the system which may not have been built yet. To overcome this, the developer either builds or uses special software to trick the component into believing it is working in a fully functional system.</p>
<p style="text-align: center;"><a rel="attachment wp-att-6399" href="http://www.linuxuser.co.uk/features/the-art-of-unit-testing-explained/attachment/unit-testing-15-47-41/"><img class="aligncenter size-large wp-image-6399" title="Unit testing 15.47.41" src="http://www.linuxuser.co.uk/wp-content/uploads/2011/10/Unit-testing-15.47.41-1024x359.png" alt="The art of unit testing explained" width="614" height="215" /></a></p>
<p>The goal of unit testing is to isolate each part of the program and show that the individual parts are correct. Unit testing allows the programmer to refactor code at a later date. This will help in making sure the module still works correctly. It also simplifies integration testing – unit testing helps to eliminate uncertainty in the units themselves. By testing the parts of a program first and then testing the sum of its parts, integration testing becomes much easier.</p>
<p>In unit testing, a series of standalone tests are conducted. Each test examines an individual module that is new or has been modified. Each test validates a single module that, based on the technical design documents, was built to perform a certain task with the expectation that it will behave in a specific way or produce specific results.</p>
<p>Generally, unit tests focus on functionality and reliability, and the entry and exit criteria can be the same for each module or specific to a particular module. Unit testing is done in a test environment prior to system integration. If a defect is discovered during a unit test, the severity of the defect will determine whether or not it will be fixed before the module is approved. In summary, unit tests help developers to reduce the number of bugs, hours spent on debugging, and thereby contributing to more stable software.</p>
<p><a href="http://www.linuxuser.co.uk/features/the-art-of-unit-testing-explained/2/">Continue to the next page</a></p>
<p><a class="twitter-follow-button" href="http://twitter.com/LinuxUserMag">Follow @LinuxUserMag</a><br />
<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/features/the-art-of-unit-testing-explained/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to install a new ROM on your Android smartphone</title>
		<link>http://www.linuxuser.co.uk/tutorials/how-to-install-a-new-rom-on-your-andoid-smartphone/</link>
		<comments>http://www.linuxuser.co.uk/tutorials/how-to-install-a-new-rom-on-your-andoid-smartphone/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 10:03:09 +0000</pubDate>
		<dc:creator>RussellBarnes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[Android Magazine]]></category>
		<category><![CDATA[ROM]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=5913</guid>
		<description><![CDATA[You might have read or heard people talking about custom ROMs they have installed on their Android devices. Here's how to do it quickly and safely…]]></description>
			<content:encoded><![CDATA[<!--Android_01_Small-PORTRAIT-200x150--><!--hacker_zone--><p style="text-align: center;">This article is dedicated to the launch of <a href="HTTP://www.littlegreenrobot.co.uk" target="_blank">Android Magazine</a>, the world&#8217;s first monthly mag 100% dedicated to the little green robot.</p>
<p style="text-align: center;"><a href="http://www.littlegreenrobot.co.uk"><img class="aligncenter size-thumbnail wp-image-5906" title="Android_01_Small PORTRAIT" src="http://www.linuxuser.co.uk/wp-content/uploads/2011/07/Android_01_Small-PORTRAIT-200x150.jpg" alt="How to install a new ROM on your Android smartphone" width="200" height="150" /></a></p>
<p>One of the main reasons people like to root their devices is to install a new or different version of the operating system. The open source nature of the OS means that it’s possible for anyone to view the code that makes up Android and then modify it as they see fit, in a similar way to which the Linux-based desktop operating systems work.</p>
<p>Custom ROMs can offer new features over the standard ones, allowing you to tailor your device to your needs. They also allow developers to port other manufacturers’ interfaces to other device makes – for instance, HTC’s Sense UI onto Samsung phones – or to remove a heavily customised ROM altogether. Another reason is to hurry along the update process: you are no longer tied to waiting on the phone manufacturers and the mobile operators to push out the latest version of Android. Installing a new ROM is a relatively simple and quick process thanks to the ROM Manager app which can be downloaded for free from the Android Market.</p>
<p>First of all you need to root your phone and there are a few methods for doing so. Some of  the most popular are: SuperOneClick, Universal Androot and Z4Root. Check  the compatibility with your particular device before attempting to gain  root access. Here&#8217;s how we&#8217;ll do it:</p>
<p><strong>1) </strong>For this example we’ll use Z4 Root. Download it from <a href="http://bit.ly/qpr9Pt" target="_blank">here</a>, as it isn’t available on the Market. You will need to register first. Now, copy the .apk file you’ve downloaded to your SD card and then install using an app such as ‘Easy Installer’ or by clicking on the apk in your favourite file manager.</p>
<p><strong>2) </strong>Open Z4Root and in the centre you will see a button saying ‘Root’. Click on the button and wait for a short while, for the process to complete; the progress is shown in the bottom bar. After it has finished, the phone will reboot. You now have root access!</p>
<p>Once you’ve rooted your phone, ROM Manager makes backing up, installing a custom recovery and downloading the new one a breeze – and will even enable you to restore your original ROM if you prefer! This tutorial will take you through the process step by step and help you on the way to a fresh new experience with your phone…</p>
<p><strong>Installing ROM Manager</strong><br />
First off, you will need to install the ROM Manager app. The good news its that it’s a free one (although there is a premium version that offers more features). Open up the Android Market from your apps list and search for ‘ROM Manager’, then click the icon and install.</p>
<p><strong>Install Clockwork Recovery</strong><br />
When you rooted your Android device, it’s quite likely that at the same time you installed a piece of ‘custom recovery’ software. ROM Manager will check that you have this installed and that you have the latest version that’s available.</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p><strong>Backup your ROM</strong><br />
Open up ROM Manager, click on the Backup Current ROM button, give the backup a name (perhaps something like ‘Standard ROM Backup’) and then click OK. You might be asked to allow ROM Manager superuser access and you’ll need to grant this.  The phone will now automatically reboot into recovery mode. The backup process can take a little while, so make sure you aren’t expecting any important calls! The recovery backs up your current ROM to the microSD card, so it’s important not to format this.</p>
<p><strong>Choose your ROM</strong><br />
Back in ROM Manager, click ‘Download ROM’. This will bring up a list of available ROMs for your device. In this example we will install CyanogenMod 7, one of the most popular custom versions of<br />
Android due to its stability and wide device support.</p>
<p><strong>Download the ROM</strong><br />
Choose the CyanogenMod version you wish to download – the latest version at time of writing is 7.1.0-RC. It’s strongly advisable to stay away from the ‘Nightly’ builds, as these are largely experimental. Google apps don’t come as standard, so click to download them.</p>
<p><strong>Installing the ROM<br />
</strong>Once the ROM and Google Apps have finished downloading, reopen ROM Manager and you will see the ROM pre-installation screen. Tick the ‘Wipe Dalvik’ and ‘Wipe Data and Cache’ boxes. Click OK and<br />
the phone will now reboot into recovery again. The new ROM will now install. This might take a little while. Once complete, the phone will reboot again. The first boot of any new ROM can take a while, sometimes up to 15 minutes, so be patient and don’t panic if the device appears to have frozen.</p>
<p><strong>Setup your Google Account</strong><br />
Once the phone has booted up, you will then be prompted to enter your Google account details. Doing this will automatically download and set up all your contacts, settings and apps back onto the phone. You now have a brand new ROM to explore!</p>
<p><strong>(Optional) Battery Calibration</strong><br />
Plug in your Android device while it’s on and let it charge fully. Disconnect and turn off, then reconnect the power cable and wait until the LED goes green. Disconnect and turn back on, turn off again and reconnect the charger until the LED goes green again.</p>
<p><strong>Below is a sample of <a href="http://www.littlegreenrobot.co.uk/" target="_blank">Android Magazine</a>&#8216;s Hacker Zone &#8211; a section of the mag dedicated to tweaking and modding your Android devices. Follow Android Magazine on <a href="http://www.facebook.com/littlegreenrobot" target="_blank">Facebook</a> and <a href="https://twitter.com/#!/lgrobot" target="_blank">Twitter</a>…</strong></p>
<p style="text-align: center;"><img class="size-full wp-image-5904 aligncenter" title="How to install a new ROM on your Android smartphone" src="http://www.linuxuser.co.uk/wp-content/uploads/2011/07/hacker_zone.jpg" alt="How to install a new ROM on your Android smartphone" width="480" height="310" /></p>
<p style="text-align: left;"><strong>Disclaimer</strong><br />
Rooting your phone and installing ROMs on your device may void your manufacturer warranty. You undertake the procedure outlined in this tutorial at your own risk. Linux User &amp; Developer, Android Magazine and Imagine Publishing Ltd. cannot be held responsible for loss of data or damage to your device.</p>
<p style="text-align: left;"><strong>Words by: Kieron Howard</strong></p>
<p><a href="http://twitter.com/LinuxUserMag" class="twitter-follow-button" data-show-count="false">Follow @LinuxUserMag</a><br />
<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/tutorials/how-to-install-a-new-rom-on-your-andoid-smartphone/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Arduino programming guide &#8211; part 1</title>
		<link>http://www.linuxuser.co.uk/tutorials/arduino-programming-guide-part-1/</link>
		<comments>http://www.linuxuser.co.uk/tutorials/arduino-programming-guide-part-1/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 11:57:23 +0000</pubDate>
		<dc:creator>RussellBarnes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[open hardware]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=4883</guid>
		<description><![CDATA[Gareth Halfacree shows us how to get started with programming for Arduino and open hardware by create an electronic music box. The first of our three part guide assumes no prior experience in either programming or developing with Arduino…
]]></description>
			<content:encoded><![CDATA[<!--buy_online--><!--Arduino-Pt1-01--><!--Arduino-Pt1-02-1024x662--><!--Arduino-Pt1-03-NEW-1024x577--><!--Arduino-pt1-04--><p><em>This article originally appeared in <a href="http://www.linuxuser.co.uk/magazine-issues/linux-user-developer-issue-95-is-out-now/ target=">issue 95</a> of <a href="http://www.linuxuser.co.uk" target="_blank">Linux User &amp; Developer</a> magazine.<a href="http://www.imagineshop.co.uk/linuxuseranddeveloper/" target="_blank"><img class="size-full wp-image-2388 alignright" title="Arduino programming guide - part 1" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/07/buy_online.jpg" alt="Arduino programming guide - part 1" width="92" height="24" /></a> Subscribe and save more than 30% and receive our exclusive money back guarantee – click <a href="https://imagine.subscribeonline.co.uk/all-titles/linux-user-&amp;-developer?offer=WEB100">here</a> to find out more.</em></p>
<p><strong>Resources</strong><br />
<a href="http://oomlout.co.uk" target="_blank">Arduino Experimenter’s Starter Kit </a><br />
<a href="http://arduino.cc" target="_blank">Arduino IDE </a></p>
<p>The Arduino project is a hacker’s dream: originally designed as a way of getting students involved in microcontroller programming and electronic design, it offers a quick and easy route for programmers to take their skills out of the digital realm and into the physical.</p>
<p>Better yet, the Arduino’s plug and play nature and the C-based programming environment mean that it’s easy to get started, even if you lack experience in electronics.<br />
To prove it, this three-part project is going to walk you through building a simple Arduino music box, programming it with the Arduino IDE, integrating it with your PC, and finally adding a useful LCD display to your project.</p>
<p>As a completely open source project, Arduino programming goes well with Linux development, and all the code and hardware designs behind Arduino are freely available for tinkering.<br />
Before we can get started, we’ll want to install the Arduino development environment.  If you’re lucky enough to be running a version of Linux for which pre-packaged versions exist, it’s a simple case of downloading them from the Arduino website or installing directly from your distribution’s repositories. If not, there are a few steps we’ll have to go through before we can get started with building our first Arduino circuit.</p>
<p><strong>Installing the Arduino IDE</strong><br />
<strong>1. </strong>Grab the dependencies<br />
If you’re not using a pre-packaged version of the Arduino IDE, you’ll need to install certain dependencies. In Debian-based distributions, simply run:</p>
<pre class="brush: plain; title: ; notranslate">$ apt-get install openjdk-6-jre gcc-avr avr-libc avrdude binutils-avr</pre>
<p>For Fedora-based distributions, the dependency list is slightly different:</p>
<pre class="brush: plain; title: ; notranslate">$ yum install uisp java-1.6.0-openjdk avr-libc avr-gcc-c++ rxtx avrdude</pre>
<p><strong>2. </strong>Change group membership<br />
As the Arduino IDE requires access to the USB port to program the board, you’ll need to make sure that you’re a member of the right groups.  As root, change the group memberships as follows:</p>
<pre class="brush: plain; title: ; notranslate">$ usermod -a -G uucp,dialout,lock $USER</pre>
<p><strong>3.</strong>Install Arduino<br />
The easiest way to get the Arduino IDE running on your system in lieu of a suitable package is to download the pre-compiled binaries and extract them into your home directory:</p>
<pre class="brush: plain; title: ; notranslate">wget http://arduino.googlecode.com/files/arduino-0021.tgz</pre>
<p>If you’re running a different distribution, or if the steps outlined above don’t work for you, more detailed instruction are available on the <a href="http://www.arduino.cc/playground/Learning/Linux" target="_blank">Arduino Playground</a>.</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p><strong><a href="http://www.linuxuser.co.uk/wp-content/uploads/2011/02/Arduino-Pt1-01.jpg" rel="lightbox[4883]"><img class="alignright size-full wp-image-4891" title="Arduino Pt1 01" src="http://www.linuxuser.co.uk/wp-content/uploads/2011/02/Arduino-Pt1-01.jpg" alt="Arduino programming guide - part 1" width="322" height="490" /></a>Wiring up your first circuit</strong><br />
Before we get started writing our project in the Arduino IDE, we need to build the circuit.  For that, we’ll need our Arduino development board, a piezoelectric buzzer, some wire and a breadboard. If you’re using the Arduino ARDX Kit from Oomlout, then you’ve already got all the parts required. The Arduino board features multiple pins, some of which are capable of acting as analogue inputs for sensors while others can act as pseudo-analogue outputs thanks to a technique known as ‘pulse width modulation’.</p>
<p>For our simple starter project, however, we’re only going to use a single digital output pin.</p>
<p><strong>4. </strong>Connect the piezoelectric buzzer to Pin 8<br />
Our program is going to control the buzzer through Pin 8, one of the Arduino’s digital output pins.  Before that can happen, we need to connect the buzzer to the output pin on the breadboard (Fig 1).  If you’re using wire instead of a breadboard, just connect the positive wire directly to the pin.</p>
<p style="text-align: center;"><a href="http://www.linuxuser.co.uk/wp-content/uploads/2011/02/Arduino-Pt1-02.jpg" rel="lightbox[4883]"><img class="aligncenter size-large wp-image-4890" title="Arduino Pt1 02" src="http://www.linuxuser.co.uk/wp-content/uploads/2011/02/Arduino-Pt1-02-1024x662.jpg" alt="Arduino programming guide - part 1" width="368" height="238" /></a></p>
<p><strong>5. </strong>Connect the piezoelectric buzzer to the Ground Pin<br />
Before we can use the buzzer, it needs to have a path to ground in order to complete the circuit.  Thankfully, the Arduino includes a ground pin that we can connect directly into (Fig 2).</p>
<p><strong>6. </strong>Check your circuit<br />
The finished circuit should connect the buzzer to the Arduino, and look something like Fig 3. Double-check that the wires lead to the same row as the buzzer’s pins, as it’s easy to miss.</p>
<p style="text-align: center;"><a href="http://www.linuxuser.co.uk/wp-content/uploads/2011/02/Arduino-Pt1-03-NEW.jpg" rel="lightbox[4883]"><img class="aligncenter size-large wp-image-4926" title="Arduino Pt1 03 NEW" src="http://www.linuxuser.co.uk/wp-content/uploads/2011/02/Arduino-Pt1-03-NEW-1024x577.jpg" alt="Arduino programming guide - part 1" width="614" height="346" /></a></p>
<p><strong>Programming the music box</strong><br />
As it stands at the moment, we’ve got a simple circuit that doesn’t do anything.  In order to make our collection of components become the electronic music box that we originally envisaged, we need to tell the microcontroller at the heart of the Arduino exactly what we have plugged into it and how we want it to operate the components.</p>
<p>Thankfully, the processing-based Arduino IDE makes this easy.  The complexities of coding for a microcontroller are abstracted away thanks to a library called Wiring, which allows you to address each pin of the microcontroller in a simple manner. Anyone familiar with the C programming language will feel immediately at home writing for the Arduino, but there are some ‘gotchas’ that can trap the unwary. An Arduino program is known as a ‘Sketch,’ and to make our simple music box we’re going to load one of the example Sketches to customise rather than reinventing the wheel.</p>
<p><strong>7. </strong>Load the sample Sketch<br />
After loading the IDE, you can find the Sketch we want – written for the Arduino project  by Tom Igoe back in January – under:<br />
<em>File&gt;Examples&gt;Digital&gt;toneMelody</em><br />
This Sketch contains an included header file, called ‘pitches.h’, which will also load automatically (Fig 4).</p>
<figure id="attachment_4929" class="wp-caption aligncenter"><a href="http://www.linuxuser.co.uk/wp-content/uploads/2011/02/Arduino-pt1-04.jpg" rel="lightbox[4883]"><img class="size-full wp-image-4929" title="Arduino pt1 04" src="http://www.linuxuser.co.uk/wp-content/uploads/2011/02/Arduino-pt1-04.jpg" alt="Arduino programming guide - part 1" width="348" height="272" /></a><figcaption>Load the sample toneMeloyd Sketech to customise</figcaption></figure>
<p><strong>8. </strong>The empty loop<br />
Usually the meat of a Sketch can be found in the loop section, which runs continuously while power is applied to the Arduino. Because a constantly repeating tune would be annoying, you’ll notice that this section is empty in our sample program.</p>
<pre class="brush: plain; title: ; notranslate">void loop() {
  // no need to repeat the melody.
}
</pre>
<h3 style="text-align: center;">Continue to: <a href="http://www.linuxuser.co.uk/tutorials/arduino-programming-guide-part-1/2" target="_self">Page 2 &#8211; The setup</a></h3>
<p style="text-align: center;"><a href="https://imagine.subscribeonline.co.uk/all-titles/linux-user-&amp;-developer?offer=ACGLUD&amp;utm_source=Internal&amp;utm_medium=House%2BAd&amp;utm_content=MPU&amp;utm_campaign=Linux%2BUser%2B3%2Bfor%2B%C2%A31" target="_self">Linux User &amp; Developer is the magazine for the GNU Generation<br />
Click here to try 3 issues for £1</a></p>
<p><a href="http://www.linuxuser.co.uk" target="_self">Return to the homepage</a><br />
<a href="http://www.linuxuser.co.uk/magazine-issues/linux-user-developer-issue-96-is-out-now/" target="_self">See what features in our latest issue</a></p>
<p style="text-align: center;"><a href="http://twitter.com/LinuxUserMag" target="_blank">
                <img src="http://www.linuxuser.co.uk/wp-content/themes/linuxuser"/images/twitter_follow.png" width="160" height="60" border="2" alt="twitter follow us" />
            </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/tutorials/arduino-programming-guide-part-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Shell scripting for system administrators: advanced techniques</title>
		<link>http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-advanced-techniques/</link>
		<comments>http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-advanced-techniques/#comments</comments>
		<pubDate>Tue, 14 Dec 2010 15:52:25 +0000</pubDate>
		<dc:creator>RussellBarnes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[shell scripting]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=4487</guid>
		<description><![CDATA[Swayam Prakasha concludes his excellent three part series on shell scripting with some of the more advanced concepts, including two very useful commands…]]></description>
			<content:encoded><![CDATA[<!--buy_online--><!--Shell-Scripting-3-Fig-1--><!--Shell-Scripting-3-Fig-2--><p><em>This article originally appeared in <a href="http://www.linuxuser.co.uk/magazine-issues/linux-user-developer-94-is-out-now/ target=">issue 94</a> of <a href="http://www.linuxuser.co.uk" target="_blank">Linux User &amp; Developer</a> magazine.<a href="http://www.imagineshop.co.uk/linuxuseranddeveloper/" target="_blank"><img class="size-full wp-image-2388 alignright" title="Shell scripting for system administrators: advanced techniques" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/07/buy_online.jpg" alt="Shell scripting for system administrators: advanced techniques" width="92" height="24" /></a> Subscribe and save more than 30% and receive our exclusive money back guarantee – click <a href="https://imagine.subscribeonline.co.uk/all-titles/linux-user-&amp;-developer?offer=WEB100">here</a> to find out more.</em></p>
<p>In issues <a href="http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-the-basics/" target="_blank">91</a> and <a href="http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-beyond-the-basics/" target="_blank">92</a> of Linux User &amp; Developer, we had a look at various aspects of shell scripting. We covered topics such as redirection, variables, arithmetic expansions, control constructs, various operations on strings etc.</p>
<p>We also had a detailed look at some of the popular shell commands such as ‘find’ and ‘grep’. Thus an in-depth understanding of shell scripting is very essential if someone wants to become an expert in system administration tasks. It is recommended to go through those two articles first via the links at the bottom of this page.</p>
<p>In this part, our focus will be on various advanced concepts of shell scripting and see how they are going to be beneficial for software developers and system administrators.<br />
Two important concepts in shell scripting are ‘sed’ and ‘awk’. Let us take a detailed look at each of these.</p>
<p>sed – This is a non-interactive stream editor. A stream editor is used to perform various forms of text transformations on an input stream. In its basic form, it reads input files line by line and applies the operation specified via the command line. Therefore, if you want to write a program to make changes in a file, sed should be your ultimate choice. IT professionals have considered sed as the successor to the popular ‘grep’ command. Fig 1 gives more information about this command.</p>
<p style="text-align: center;">
<figure id="attachment_4497" class="wp-caption aligncenter"><a href="http://www.linuxuser.co.uk/wp-content/uploads/2010/12/Shell-Scripting-3-Fig-1.jpg" rel="lightbox[4487]"><img class="size-full wp-image-4497 " title="Shell Scripting 3 Fig 1" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/12/Shell-Scripting-3-Fig-1.jpg" alt="Shell scripting for system administrators: advanced techniques" width="509" height="287" /></a><figcaption>Fig 1 - Detailed information about the sed command</figcaption></figure>
<p>Please go through the complete man page to find out more about this specific command. If you want to learn more about how to use the sed command, please take a look at Fig 2.</p>
<p>Let&#8217;s understand this command with some examples. sed has several commands and the simplest one is the substitute command, ‘s’.<br />
Consider a sample test file with these contents:</p>
<pre class="brush: bash; title: ; notranslate">This is a sample program.
abc def ghi klm abc opq abc
</pre>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p>Now let&#8217;s use sed for a well-known in-place editing of files:</p>
<pre class="brush: bash; title: ; notranslate">cvs@cn-setta-2:~&amp;gt; sed -i ‘s/abc/ABC/’ test_file
cvs@cn-setta-2:~&amp;gt;
cvs@cn-setta-2:~&amp;gt; cat test_file
This is a sample program.

ABC def ghi klm abc opq abc
</pre>
<p><figure id="attachment_4496" class="wp-caption aligncenter"><a href="http://www.linuxuser.co.uk/wp-content/uploads/2010/12/Shell-Scripting-3-Fig-2.jpg" rel="lightbox[4487]"><img class="size-full wp-image-4496 " title="Shell Scripting 3 Fig 2" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/12/Shell-Scripting-3-Fig-2.jpg" alt="Shell scripting for system administrators: advanced techniques" width="384" height="307" /></a><figcaption>Fig 2 - How to use sed</figcaption></figure><br />
The above example shows that the sed command has replaced the first occurrence of ‘abc’ with ‘ABC’. If we want to replace all occurrences of ‘abc’ by ‘ABC’, then the following command will do the work for us:</p>
<pre class="brush: bash; title: ; notranslate">cvs@cn-setta-2:~&amp;gt; sed -i ‘s/abc/ABC/g’ test_file
</pre>
<p>It is important to note here that ‘sed -i’ overwrites the original file with the new one. Let us look at another typical usage of sed:</p>
<pre class="brush: bash; title: ; notranslate">cvs@cn-setta-2:~&amp;gt; sed -e ‘s/abc/DEF/g’ test_file &amp;gt; test_file_out
cvs@cn-setta-2:~&amp;gt;
cvs@cn-setta-2:~&amp;gt; cat test_file_out
This is a sample program.

DEF def ghi klm DEF opq DEF
</pre>
<p>It is not always needed to specify the -e option. Here, ‘s’ stands for substitute and ‘g’ stands for global. Thus, as expected, all occurrences matching the specified criteria are replaced and the output is redirected to another file.</p>
<h3 style="text-align: center;">Continue to: <a href="http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-advanced-techniques/2" target="_self">Page 2</a></h3>
<p>Preliminary reading:<br />
<a href="http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-the-basics/" target="_self">Shell scripting for system admin: the basics</a><br />
<a href="http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-beyond-the-basics/" target="_self">Shell scripting for system admin: beyond the basics</a></p>
<p><a href="https://imagine.subscribeonline.co.uk/all-titles/linux-user-&amp;-developer?offer=ACGLUD&amp;utm_source=Internal&amp;utm_medium=House%2BAd&amp;utm_content=MPU&amp;utm_campaign=Linux%2BUser%2B3%2Bfor%2B%C2%A31" target="_self">Linux User &amp; Developer is the magazine for the GNU Generation<br />
Click here to try 3 issues for £1</a></p>
<p style="text-align: center;"><a href="http://twitter.com/LinuxUserMag" target="_blank">
                <img src="http://www.linuxuser.co.uk/wp-content/themes/linuxuser"/images/twitter_follow.png" width="160" height="60" border="2" alt="twitter follow us" />
            </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-advanced-techniques/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Make Firefox extensions with Mozilla Jetpack</title>
		<link>http://www.linuxuser.co.uk/tutorials/make-firefox-extensions-with-mozilla-jetpack/</link>
		<comments>http://www.linuxuser.co.uk/tutorials/make-firefox-extensions-with-mozilla-jetpack/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 17:25:18 +0000</pubDate>
		<dc:creator>RussellBarnes</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[Jetpack]]></category>
		<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=4455</guid>
		<description><![CDATA[Mozilla Jetpack is designed to make it incredibly easy to build Firefox add-ons using a number of common web technologies like HTML and JavaScript. Join Kunal Deo as he demonstrates how to get setup ready for your creative juices to start flowing...]]></description>
			<content:encoded><![CDATA[<!--buy_online--><p><em>This article originally appeared in <a href=" http://www.linuxuser.co.uk/magazine-issues/linux-user-developer-issue-93-is-out-now/" target="_blank">issue 93</a> of <a href="http://www.linuxuser.co.uk" target="_blank">Linux User &amp; Developer</a> magazine.<a href="http://www.imagineshop.co.uk/linuxuseranddeveloper/" target="_blank"><img class="size-full wp-image-2388 alignright" title="Make Firefox extensions with Mozilla Jetpack" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/07/buy_online.jpg" alt="Make Firefox extensions with Mozilla Jetpack" width="92" height="24" /></a> Subscribe and save more than 30% and receive our exclusive money back guarantee – click <a href="https://imagine.subscribeonline.co.uk/all-titles/linux-user-&amp;-developer?offer=WEB100">here</a> to find out more.</em></p>
<p><strong>Resources:</strong><br />
Before we go any further it&#8217;s worth making sure you have everything you need to follow this tutorial.</p>
<p><strong><a href="http://www.mozilla.com" target="_blank">Mozilla Firefox  3.6 or later</a></strong><br />
If you are trying to build a standalone application, you can also use the XULRunner SDK that uses Gecko 1.9.2 or later. Using Firefox is much easier since the SDK is already configured to work with Firefox</p>
<p><strong><a href="http://www.python.org" target="_blank">Python 2.5 or later</a></strong><br />
To check the version of Python installed in the system, perform the following command:</p>
<pre class="brush: python; title: ; notranslate">$ python
[~ $:] python
Python 2.6.1 (r261:67515, Jun 20 2010, 21:47:49)</pre>
<p><strong>Mercurial (optional)<br />
</strong>In case you want to check out the Jetpack SDK  source code from its source code repository, you will need Mercurial installed on your system, since the Jetpack is hosted on the Mercurial version control system. To install Mercurial on Ubuntu, perform the following command:</p>
<pre class="brush: python; title: ; notranslate">$ sudo apt-get install mercurial</pre>
<p>Following installation, Mercurial’s hg command should be available.</p>
<p><strong>Mozilla Jetpack SDK </strong><br />
To obtain the Jetpack SDK from the Mercurial repository, perform the following command:</p>
<pre class="brush: python; title: ; notranslate">$ hg clone http://hg.mozilla.org/labs/jetpack-sdk/</pre>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p>Please note that the Mercurial repository of the Mozilla Jetpack SDK is being updated constantly and may not work with this tutorial. Please use the stable version of the Jetpack SDK for maximum compatibility. To set up the SDK development environment, enter the following command from the jetpack-sdk directory:</p>
<pre class="brush: python; title: ; notranslate">$ source bin/activate
</pre>
<p>There was a time when a dinosaur named Internet Explorer used to rule the planet ‘Internet’. It was so big that in order to support Internet Explorer, people would happily ditch the support for other browsers. Then came a meteoroid called Firefox (read the name) that destroyed most of the dinosaurs and established a lot of key features that changed the face of planet Internet for times to come. It was like freeing humankind from a ruthless alien empire. These features were…</p>
<p><strong>Open source: </strong>There is no doubt that open source software packages are of great quality. But mainstream adoption has always been a difficult task to achieve for an open source application. Firefox was one of the first open source projects which went head on head with something that was as popular as Internet Explorer. Being an open source project, it attracted lot of developers who worked under the Mozilla Foundation’s guidelines to create it.</p>
<p><strong>Portable: </strong>Firefox was portable like most open source applications. But at the same time it was also a popular web browser. This got lot of web developers to develop their websites and web apps so they would also work with Firefox. Previously the situation was a little awkward for those of us who were using our Linux boxes with either Netscape or Mozilla web browser, because most of the websites and web apps were only designed to work with Internet Explorer. Firefox helped a lot in the adoption of Linux and other desktop operating systems because it ensured that the internet would not be incompatible on Linux or other alternative operating systems.</p>
<p><strong>Extensibility: </strong>This was and still is the landmark feature that Firefox had to offer. Companies like Apple, Google and Microsoft are still figuring out the extensibility of their browsers, but Firefox had got it just right from the start. Extensibility allowed users to add features to Firefox without hacking into the original source code. This allowed users to customise the browser according to their own needs.<br />
Out of these three features, extensibility proved to be the most popular for the Firefox project. Not that the other web browsers weren’t extensible, but the extension mechanism in other web browsers was… for lack of a better word, let’s call it horrible. We all know about the trouble with spyware and Internet Explorer BHOs (Browser Helper Objects). Firefox, being an open source browser, provided a  very easy way to install extensions and manage them. It also included a sandbox-type environment and a consistent user interface. Even developing Firefox extension proves very easy. You do not need to learn C/C++ or any other low-level programming language.</p>
<h3 style="text-align: center;">Continue to: <a href="http://www.linuxuser.co.uk/tutorials/make-firefox-extensions-with-mozilla-jetpack/2" target="_self">Page 2 &#8211; Ways you can extend Firefox</a></h3>
<p><a href="https://imagine.subscribeonline.co.uk/all-titles/linux-user-&amp;-developer?offer=ACGLUD&amp;utm_source=Internal&amp;utm_medium=House%2BAd&amp;utm_content=MPU&amp;utm_campaign=Linux%2BUser%2B3%2Bfor%2B%C2%A31" target="_self">Linux User &amp; Developer is the magazine for the GNU Generation<br />
Click here to try 3 issues for £1</a></p>
<a href="http://twitter.com/LinuxUserMag" target="_blank">
                <img src="http://www.linuxuser.co.uk/wp-content/themes/linuxuser"/images/twitter_follow.png" width="160" height="60" border="2" alt="twitter follow us" />
            </a>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/tutorials/make-firefox-extensions-with-mozilla-jetpack/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Emacs in the real world &#8211; part 3</title>
		<link>http://www.linuxuser.co.uk/tutorials/emacs-in-the-real-world-part-3/</link>
		<comments>http://www.linuxuser.co.uk/tutorials/emacs-in-the-real-world-part-3/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 11:24:13 +0000</pubDate>
		<dc:creator>RussellBarnes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=4161</guid>
		<description><![CDATA[Forget Perl’s claims, Emacs really is the Swiss Army chainsaw of the *NIX world. Join Richard Smedley for the conclusion of his three-part series, this time exploring how you can live your life online and do it faster and better with Emacs… ]]></description>
			<content:encoded><![CDATA[<!--buy_online--><p><em>This article originally appeared in <a href=" http://www.linuxuser.co.uk/magazine-issues/linux-user-developer-issue-93-is-out-now/" target="_blank">issue 93</a> of <a href="http://www.linuxuser.co.uk" target="_blank">Linux User &amp; Developer</a> magazine.<a href="http://www.imagineshop.co.uk/linuxuseranddeveloper/" target="_blank"><img class="size-full wp-image-2388 alignright" title="Emacs in the real world - part 3" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/07/buy_online.jpg" alt="Emacs in the real world - part 3" width="92" height="24" /></a> Subscribe and save more than 30% and receive our exclusive money back guarantee – click <a href="https://imagine.subscribeonline.co.uk/all-titles/linux-user-&amp;-developer?offer=WEB100">here</a> to find out more.</em></p>
<p>Over the past couple of months we&#8217;ve been running a series of articles to demonstrate how you can do most of your day-to-day tasks without leaving Emacs. Click to read the introduction to Emacs in the real world <a href="http://www.linuxuser.co.uk/tutorials/emacs-in-the-real-world-part-1/" target="_blank">here</a>, and part 2 <a href="http://www.linuxuser.co.uk/tutorials/emacs-in-the-real-world-part-2/" target="_blank">here</a>&#8230;</p>
<p><strong>A quick shortcut to Emacs enlightenment…</strong><br />
For brevity we’re writing C-x C-s to mean simultaneously press the Ctrl and X keys, release, then simultaneously press the Ctrl and S keys (this saves the file in the current buffer).<br />
M-! means press the Meta and ! keys – Alt represents Meta on most modern keyboards. You can also press and release Esc, then press !. Oh yes, and as ! is Shift+1 on most keyboards, that’s a bit more stretching!<br />
Start Emacs and type C-h t. This will bring you into the excellent interactive beginners’ tutorial. Run through it, then use your newfound knowledge on  a couple of your documents. Print out one of the many crib sheets for Emacs keystrokes available on the web, then join us on these pages to join the wired world from the world’s most flexible text editor.</p>
<p><strong>Resources</strong> &#8211; what you&#8217;ll need for this tutorial<br />
<em>Emacs23</em> contains much of the additional software.<br />
<em>w3m-el-snapshot</em> – in Debian and Ubuntu you need the snapshot package of <em>W3M-el</em>. Other distros vary. You’ll have no problems if you compile according to the instructions <a href="http://emacs-w3m.namazu.org/" target="_blank">here </a><br />
<a href="http://github.com/psanford/emacs-oauth/" target="_blank"><em>emacs-oauth</em></a> enables authentication for client apps – now mandatory for Twitter apps</p>
<p>We’re online all the time and the information just keeps pouring in. You get emails for work and leisure, mailing lists for projects to which you contribute, tons of spam of course, plus the near-spam sent by organisations who gather your email address every time you buy something. Add to this microblog posts (Twitter, Identi.ca, Facebook status updates), RSS feeds, instant messages and IRC, and good old-fashioned newsgroups, and there’s a lot to keep up with.</p>
<p>Swapping between apps to monitor these channels adds to the time spent. If you’ve followed these tutorials and are finding Emacs useful, you’ll be glad to know that you can do it all from Emacs and benefit from some of the best tools for handling all these messages – such as Gnus – into the bargain.</p>
<p>As always, we can only whet your appetite here, so please take your time and try out what’s on offer. Once you’re this far down the road there’s almost no turning back – just relax and enjoy the power at your fingertips. Anyone who went to university in the 1980s or early 1990s is likely to have had their first email account on a big UNIX machine, accessed through a green-screen serial terminal. The mail client was Pine or Elm. Perhaps you were glad to leave that behind and love your current GUI email, whether Thunderbird, Evolution, Outlook or even Lotus Notes.</p>
<p>Nevertheless, many of our readers use Mutt, a powerful evolution of Pine. Its speed and ease of use outclass GUI solutions in the same way that many of Emacs’ features leave GUI IDEs (integrated development environments) behind for many coders. However, Mutt is a standalone program, designed to do one thing well: handling email. It doesn’t even have a text editor. Nor<br />
does it fetch mail, leaving that to the dedicated app of your choice – usually Fetchmail on GNU/Linux systems.</p>
<p>It’s very hard to shake Mutt users away from their favoured client – you’ll see them ssh-ing to their server and reading emails in Mutt on smartphones, rather than the cumbersome apps presented by Android et al. However it’s easy to use Emacs as Mutt’s default editor, and get Emacs to see all files whose name contains ‘mutt’ to be in mail-mode.</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p>Add the following to ~/.emacs</p>
<pre>(server-start)
(add-to-list ‘auto-mode-alist ‘(“/mutt” . mail-mode))
</pre>
<p>and to ~/.muttrc</p>
<pre>set editor=emacsclient
set pager=emacsclient
</pre>
<p><strong>Rmail</strong><br />
Emacs does come with a simple default mail mode, called Rmail. Some users, faced with so many powerful alternative email clients in Emacs, are a bit sniffy about Rmail, but it’s actually quite good enough for many purposes, and it is able to handle multiple accounts and remote inboxes.</p>
<p>Emacs can fetch your mail for you, but seems to lose all multitasking abilities while engaged in this task so, like Mutt, is best used with the ever-helpful Fetchmail utility. Rmail is started, predictably enough, with:</p>
<pre>M-x rmail</pre>
<p>and will pull mail from the local spool and place it in ~/rmail, or wherever it’s been pointed by:</p>
<pre>rmail-file-name</pre>
<p>Reading mail and scrolling between messages is easy (h brings up a summary window, n and p take you back and forward through the list). Pressing ‘a’ while viewing a message allows you to mark it with (comma-separated) tags. ‘l’ gives you a view of tagged mails.</p>
<p>One nifty feature is:</p>
<pre>M-x undigestify-rmail-message</pre>
<p>which takes a mailing list digest and splits it into individual messages – useful if you want to reply properly to one of the messages.</p>
<h3 style="text-align: center;"><a href="http://www.linuxuser.co.uk/tutorials/emacs-in-the-real-world-part-3/2" target="_self">Continue to page 2</a></h3>
<p><em>You might also like:<br />
<a href="http://www.linuxuser.co.uk/tutorials/emacs-in-the-real-world-part-1/" target="_self">Emacs in the real world &#8211; part 1</a><br />
<a href="http://www.linuxuser.co.uk/" target="_self">Emacs in the real world &#8211; part 2<br />
Linux User homepage</a></em></p>
<a href="http://twitter.com/LinuxUserMag" target="_blank">
                <img src="http://www.linuxuser.co.uk/wp-content/themes/linuxuser"/images/twitter_follow.png" width="160" height="60" border="2" alt="twitter follow us" />
            </a>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/tutorials/emacs-in-the-real-world-part-3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Emacs in the real world &#8211; part 2</title>
		<link>http://www.linuxuser.co.uk/tutorials/emacs-in-the-real-world-part-2/</link>
		<comments>http://www.linuxuser.co.uk/tutorials/emacs-in-the-real-world-part-2/#comments</comments>
		<pubDate>Wed, 29 Sep 2010 16:23:45 +0000</pubDate>
		<dc:creator>RussellBarnes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[series]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=3547</guid>
		<description><![CDATA[Forget Perl’s claims, Emacs really is the Swiss Army chainsaw of the *NIX world. Join Richard Smedley for the second of a three-part series revealing how you can do most of your day-to-day tasks without leaving Emacs – from contacts and appointments to GTD, there’s an Emacs way to productivity paradise...]]></description>
			<content:encoded><![CDATA[<!--buy_online--><!--Emacs-org011--><p><em>This article appears in <a href="http://www.linuxuser.co.uk/magazine-issues/linux-user-developer-issue-92-is-out-now/" target="_blank">issue 92</a> of <a href="http://www.linuxuser.co.uk" target="_blank">Linux User &amp; Developer</a> magazine.<a href="http://www.imagineshop.co.uk/linuxuseranddeveloper/" target="_blank"><img class="size-full wp-image-2388 alignright" title="Emacs in the real world - part 2" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/07/buy_online.jpg" alt="Emacs in the real world - part 2" width="92" height="24" /></a> Subscribe and save more than 30% and receive our exclusive money back guarantee – click <a href="https://imagine.subscribeonline.co.uk/all-titles/linux-user-&amp;-developer?offer=WEB100">here</a> to find out more.</em></p>
<p>You can find part 1 of Emacs in the real world <a href="http://www.linuxuser.co.uk/tutorials/emacs-in-the-real-world-part-1/" target="_blank">here</a>.</p>
<p>Here&#8217;s a quick start guide for those looking for a quick refresher:<br />
We’re writing C-x C-s to mean simultaneously press the Ctrl and X keys, release, then simultaneously press the Ctrl and S keys (this saves the file in the current buffer). M-! means press the Meta and ! keys – Alt represents Meta on most modern keyboards. You can also press and release Esc, them press !. Oh yes, and as ! is Shift+1 on most keyboards, that’s a bit more stretching!</p>
<p>Start Emacs and type C-h t. This will bring you into the excellent interactive beginners’ tutorial. Run through it, then use your newfound knowledge on  a couple of your documents. Print out one of the many crib sheets for Emacs keystrokes available on the web, then join us on these pages to discover Org-mode.</p>
<p>Most time spent on PCs and mobile devices that isn’t lost to passive consumption (eBooks, DVDs, MP3s) is spent either communicating (from email through microblogging to VoIP) or organising (contacts, project planning, wikis, TODO lists). We’ll look at communication next month: this month we show how to make Emacs the centre of your organised life. Org-mode in particular builds structured text and simple, wiki-like syntax into a comprehensive management tool for projects, schedules and workgroups, tightly integrated with diary and contacts.</p>
<p>A short while ago, you had to sync up Palm devices to tiresome productivity tools on your PC, but now that smartphones all seem to be based on GNU/Linux, you can run Emacs there too – and even when you can’t, the heart of Emacs’ magnificent Org-mode is simple text lists, so you can manage the most complex set of project tasks wherever you go, without having to forsake the finger-twisting but all-embracing comfort of Emacs.</p>
<p style="text-align: center;"><a href="http://www.linuxuser.co.uk/wp-content/uploads/2010/09/Emacs-org011.jpg" rel="lightbox[3547]"><img class="size-full wp-image-3565 aligncenter" title="Emacs org01" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/09/Emacs-org011.jpg" alt="Emacs in the real world - part 2" width="487" height="359" /></a><em><br />
Tags, TODO, tree views – a glimpse at what Org-mode can do to a list</em></p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p>However you organise, an important task is to get info into your system as painlessly as possible. Emacs Remember works with Planner or Org-mode. All you need is<br />
<em>(require ‘remember)</em> in your .emacs file. Adding the following will bring more functionality:</p>
<pre>(setq remember-annotation-functions ‘(org-remember-annotation))
(setq remember-handler-functions ‘(org-remember-handler))
(add-hook ‘remember-mode-hook ‘org-remember-apply-template)
</pre>
<p>Now ‘M-x remember’ will open the Remember buffer, and you can start inputting notes with /minimum/ structure, to be saved in whichever back end you choose – or ~/.notes by default. Once you’ve captured the information, then you can worry about organising it.</p>
<p><strong>A-Muse-ing</strong><br />
A favourite tool of many is Muse, an authoring and publishing environment. It combines an enhanced text mode for navigating projects and authoring new documents with a set of styles for publishing standards-compliant docs in various formats. Either may be used alone. Beyond this, Muse now integrates with Emacs’ planner.el, a personal information manager (PIM) bringing together all the necessary Emacs pieces, such as Bbdb-mode for addresses, and using Muse to link notes and items together – something Muse inherits from EmacsWiki, from which it is a fork.</p>
<p>The Insidious Big Brother Database (BBDB) is so-called because it silently gathers address details from Emacs’ news and mail readers, and makes them available when you need them. Planner can grab these details, as well as linking into diary, calendar and your choice of Emacs mail program, and building on Muse.<br />
Muse will output everything from webpages and blog entries, through tutorials and UNIX man or info pages, to slides and lecture notes. Think of all the time you’ll save not having to move the mouse around in OpenOffice menus to produce simple documents!</p>
<p><a href="http://www.linuxuser.co.uk/tutorials/emacs-in-the-real-world-part-2/2/" target="_self"><em>Continue to page 2…</em></a></p>
<p><em><a href="../tutorials/" target="_self">Click here</a> for more tutorials from Linux User &amp; Developer magazine, or <a href="http://www.linuxuser.co.uk" target="_self">click here</a> to return to the homepage…<br />
</em></p>
<a href="http://twitter.com/LinuxUserMag" target="_blank">
                <img src="http://www.linuxuser.co.uk/wp-content/themes/linuxuser"/images/twitter_follow.png" width="160" height="60" border="2" alt="twitter follow us" />
            </a>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/tutorials/emacs-in-the-real-world-part-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Develop for Google Chrome &#8211; making apps and extensions</title>
		<link>http://www.linuxuser.co.uk/tutorials/develop-for-google-chrome-making-apps-and-extensions/</link>
		<comments>http://www.linuxuser.co.uk/tutorials/develop-for-google-chrome-making-apps-and-extensions/#comments</comments>
		<pubDate>Mon, 27 Sep 2010 16:35:26 +0000</pubDate>
		<dc:creator>RussellBarnes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[extensions]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web apps]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=3495</guid>
		<description><![CDATA[Kunal Deo explores the art of developing for Google Chrome using HTML5 and more. In this tutorial you'll learn how to develop web apps and extensions for the world's fastest growing web browser…]]></description>
			<content:encoded><![CDATA[<!--buy_online--><!--Chrome-Dev-tools--><p><em>This article originally appeared in <a href="http://www.linuxuser.co.uk/magazine-issues/issue-91/" target="_blank">issue 91</a> of <a href="http://www.linuxuser.co.uk" target="_blank">Linux User &amp; Developer</a> magazine.<a href="http://www.imagineshop.co.uk/linuxuseranddeveloper/" target="_blank"><img class="size-full wp-image-2388 alignright" title="Develop for Google Chrome - making apps and extensions" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/07/buy_online.jpg" alt="Develop for Google Chrome - making apps and extensions" width="92" height="24" /></a> Subscribe and save more than 30% and receive our exclusive money back guarantee – click <a href="https://imagine.subscribeonline.co.uk/all-titles/linux-user-&amp;-developer?offer=WEB100">here</a> to find out more.</em></p>
<p>The internet has evolved a lot since its inception. It was originally created to share hyperlinked text documents. Since then the internet and its related technologies have been developed into an all-round technology handling everything from simple HTML to complex applications. It has also grown into an excellent application platform – not just any application platform, but a true cross-platform one.</p>
<p>In the case of internet applications, the browser becomes the operating system. Fortunately, most of the technology which is used in building the internet, including the web browser, is based on open standards and is open source. This makes the internet’s operating system available on almost any software or hardware platform that ever existed or will ever exist.</p>
<p>Today most of us spend a considerable amount of time every day on the internet, inside a web browser, to carry out work- and leisure-related tasks. When you are on internet, it does not matter which operating system you are running or on what hardware you are using. Ummm… sometimes it matters, especially for something like video playback, but 90% of the time it doesn’t. What actually matters is the browser. The more modern and standards-compliant browser you have, the better the internet you will get.</p>
<p>In terms of standards, Google’s Chrome and Apple’s Safari web browsers are leading the way, with both scoring 100/100 in the Acid3 test, and Chrome scoring 197/300 and Safari 208/300 in the HTML5 test. In its current version, Mozilla Firefox is lagging behind both of those browsers with a 94/100 score in the Acid3 test and 139/300 in the HTML5 test.</p>
<p>Both Google Chrome and Apple Safari are excellent browsers from a standards point of view, but there is one major distinction: Chrome is completely open source and runs on Linux, whereas Safari is closed source and runs on Windows, Mac and iOS devices. Although this article will revolve around Google Chrome, it is encouraged that you also pay close attention to Safari while developing for the web, since it runs on some of the most popular mobile devices in the world such as the iPhone, the iPod touch and the iPad.</p>
<p>Let us return to the cross-platform aspect of web applications. Cross-platform web application really allows you to do what the Java slogan says without any fuss: ‘Write once, run anywhere’. But cross-platform is just one benefit. Web apps also provide various other benefits that are directly the result of how web applications are implemented.</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p>A few examples are:<br />
<strong>1. </strong>Runs directly from the cloud. No local installation required, no messing up the system with unwanted configuration changes.<br />
<strong>2. </strong>Auto updated: Since these apps runs from the cloud, you just need to update an app at one place and every version of the web application is automatically updated.<br />
<strong>3. </strong>Runs inside sandbox: Not really a benefit, but a great feature for users. Sandboxed applications cannot get access to the whole system, but are instead confined to their own sandbox, hence they run in a more secure way.<br />
<strong>4.</strong> Low system resources usage: As most of the heavy lifting is done by the browser itself, your app (as well as other web apps) consumes much less system resources.</p>
<p>Now you may wonder, with this many cool features, why web apps are not mainstream. Well, there are two answers to that question. Firstly, they are mainstream for most of the applications that actually originated on the web, such as web search, web mail and social networking applications. Secondly, they are not mainstream for the apps that were originally ported from desktop/native applications to the web, such as word processing, instant messaging, 3D gaming and so on. The reason behind such web applications not going mainstream was their inability to deliver the same features as their desktop counterparts. Nobody wants to settle for an inferior version of their desktop product just because it is a web application, no matter how many things you say in favour of the cloud and cross-platform.</p>
<p>A lot of new standards were developed and existing standards were upgraded to make it possible for developers to build desktop-class web applications. Out of the many constantly evolving open standards, HTML5 is the main umbrella technology that is leading the revolution. HTML5 is still in development, but has gained a lot of traction and support from the community and browser makers. Most of the current browsers can handle HTML5 in some way or other, with the exception of Microsoft’s Internet Explorer.</p>
<p>HTML5 builds upon existing technologies – namely HTML, CSS and JavaScript. All these standards have got numerous new functionalities that really provide great powers to the web applications and diminish the gap between the web application and its desktop equivalent.</p>
<p><a href="http://www.linuxuser.co.uk/wp-content/uploads/2010/09/Chrome-Dev-tools.png" rel="lightbox[3495]"><img class="aligncenter size-full wp-image-3499" title="Chrome Dev tools" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/09/Chrome-Dev-tools.png" alt="Develop for Google Chrome - making apps and extensions" width="557" height="522" /></a><a href="http://www.linuxuser.co.uk/tutorials/develop-for-google-chrome-making-apps-and-extensions/2/" target="_self"></a></p>
<p><a href="http://www.linuxuser.co.uk/tutorials/develop-for-google-chrome-making-apps-and-extensions/2/" target="_self">Continue to page 2…</a></p>
<p><a href="http://www.linuxuser.co.uk/tutorials/" target="_self"><em>You can find more tutorials from Linux User &amp; Developer here…</em></a></p>
<a href="http://twitter.com/LinuxUserMag" target="_blank">
                <img src="http://www.linuxuser.co.uk/wp-content/themes/linuxuser"/images/twitter_follow.png" width="160" height="60" border="2" alt="twitter follow us" />
            </a>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/tutorials/develop-for-google-chrome-making-apps-and-extensions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Emacs in the real world &#8211; part 1</title>
		<link>http://www.linuxuser.co.uk/tutorials/emacs-in-the-real-world-part-1/</link>
		<comments>http://www.linuxuser.co.uk/tutorials/emacs-in-the-real-world-part-1/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 10:44:43 +0000</pubDate>
		<dc:creator>RussellBarnes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[series]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=3345</guid>
		<description><![CDATA[Forget Perl’s claims, Emacs really is the Swiss Army chainsaw of the *NIX world. Join Richard Smedley on the first of a three-part series revealing how you can do most of your day-to-day tasks without leaving Emacs – even if programming is a small or non-existent part of your typical day…]]></description>
			<content:encoded><![CDATA[<!--buy_online--><!--emacs-1-main-shot-300x190--><!--emacs-1-Space-cadet-300x121--><p><em>This article originally appeared in <a href="http://www.linuxuser.co.uk/magazine-issues/issue-91/" target="_blank">issue 91</a> of <a href="http://www.linuxuser.co.uk" target="_blank">Linux User &amp; Developer</a> magazine.<a href="http://www.imagineshop.co.uk/linuxuseranddeveloper/" target="_blank"><img class="size-full wp-image-2388 alignright" title="Emacs in the real world - part 1" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/07/buy_online.jpg" alt="Emacs in the real world - part 1" width="92" height="24" /></a> Subscribe and save more than 30% and receive our exclusive money back guarantee – click <a href="https://imagine.subscribeonline.co.uk/all-titles/linux-user-&amp;-developer?offer=WEB100">here</a> to find out more.</em></p>
<p><a href="http://www.linuxuser.co.uk/wp-content/uploads/2010/09/emacs-1-main-shot.jpg" rel="lightbox[3345]"><img class="alignright size-medium wp-image-3350" title="emacs 1 main-shot" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/09/emacs-1-main-shot-300x190.jpg" alt="Emacs in the real world - part 1" width="192" height="122" /></a><a href="http://www.linuxuser.co.uk/tutorials/emacs-in-the-real-world-part-2/" target="_self">You can find part 2 of this series here…</a></p>
<p>Yes, Emacs is a programmer’s editor. Yes, it comes from a 1960s command-line world. Yes, it’s not easy to start using, as one must adapt to new concepts and ridiculous key-stroke combinations. Yes it’s Anglocentric in menus and doesn’t really do right-to-left languages. But there must be an upside, right? Yes, once through the pain barrier – say a week of editing, and adding in other operations through Emacs – you’ll find the power is addictive.</p>
<p>In the first part of the series we&#8217;ll introduce some of the Emacs concepts you need to get you started, but also take a brief look at music and games. The main focus has to be on editing, just to get comfortable with the interface. Stick with it for the next few weeks because in the next part we will concentrate on organisation, with Emacs making a great project management tool, and PIM, as well as adding a bit more customisation. And in the final part we’ll look at everything internet, from email to updating your status on social networks, and point you to info on how to take things further.</p>
<p><strong>Swiss Army chainsaw?</strong><br />
The UNIX way is small, specialised programs that do one job well, glued  together to form a system that can easily be maintained. Emacs is a  500lb gorilla of a text editor that takes on many operating systems in  functionality. This is because of its origins not within UNIX, but MIT’s  Artificial Intelligence Lab, where Lisp machines used that language to  modify themselves on the fly. Richard M Stallman coded the original Emacs – Editor MACroS – for the  TECO line editor there in the 1970s with Guy Steele Jr, and rewrote it  as GNU Emacs when he started the GNU project in the 1980s. Parts of the  app, and even the config files, are written in the Elisp dialect of  Lisp.</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p><strong>Required Resources</strong><br />
Emacs23 should be in your OS’s repository. Older versions can be extended to do almost everything we cover here<br />
EMMS is available from <a href="http://www.gnu.org/software/emms/" target="_blank">here </a><br />
.emacs customisation can be found <a href="http://www.emacswiki.org/emacs/CategoryDotEmacs" target="_blank">here</a> and many other places</p>
<p><strong>Alt-Meta-Shift-Ctrl-Hyper-?</strong><br />
For brevity, in this article we’re writing ‘C-x C‑s’ to mean ‘simultaneously press the Ctrl and X keys, release, then simultaneously press the Ctrl and S keys’ (this saves the file in the current buffer).</p>
<p style="text-align: left;">‘M-!’ means ‘press the Meta and ! keys’ – don’t have a Meta key? You’re not alone; it’s been a while since they were common in the wild. Alt is used instead, but no one’s in any hurry to update the documentation. You can also press and release Esc, then press !. Oh yes, and as ! is Shift+1 on most keyboards, that’s a bit more stretching!</p>
<p style="text-align: left;">Modern keyboards leave the Ctrl key isolated in the bottom left-hand corner. Even switching it with the Caps Lock key still leaves it under your little finger, and heavy Emacs users can develop nasty RSI (repetitive strain injury).</p>
<p style="text-align: center;"><a href="http://www.linuxuser.co.uk/wp-content/uploads/2010/09/emacs-1-Space-cadet.jpg" rel="lightbox[3345]"><img class="size-medium wp-image-3351  aligncenter" title="Image: Dave Fischer, rcsri.org " src="http://www.linuxuser.co.uk/wp-content/uploads/2010/09/emacs-1-Space-cadet-300x121.jpg" alt="emacs 1 Space-cadet" width="300" height="121" /></a></p>
<p>However, with a good keyboard, Alt and AltGr are equidistant from the centre, and swapping them with Ctrl means you can reach Ctrl with your thumbs while touch-typing. Better still, get an ergonomic keyboard, such as the Kinesis Contoured ones, which splits the keys between each hand and puts the modifier keys within easy reach of the thumbs. Other alternatives include chording keyboards or even foot or knee switches for Ctrl, Alt and Shift. A little extreme? Well, if you rely on typing all day to pay the rent, investing in your hands’ health is sensible.</p>
<p><a href="http://www.linuxuser.co.uk/tutorials/emacs-in-the-real-world-part-1/2/" target="_self"><em>Continue to page 2…</em></a></p>
<a href="http://twitter.com/LinuxUserMag" target="_blank">
                <img src="http://www.linuxuser.co.uk/wp-content/themes/linuxuser"/images/twitter_follow.png" width="160" height="60" border="2" alt="twitter follow us" />
            </a>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/tutorials/emacs-in-the-real-world-part-1/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>KDE &amp; GNOME cross-desktop development</title>
		<link>http://www.linuxuser.co.uk/tutorials/kde-gnome-cross-desktop-development/</link>
		<comments>http://www.linuxuser.co.uk/tutorials/kde-gnome-cross-desktop-development/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 16:07:53 +0000</pubDate>
		<dc:creator>RussellBarnes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[cross-desktop development]]></category>
		<category><![CDATA[desktop environment]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[KDE]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=2898</guid>
		<description><![CDATA[If you want your application to have the widest reach possible, it would be a good idea to ensure they play nice with both KDE and GNOME. Follow Kunal Deo's brief tutorial to find out how to get started…]]></description>
			<content:encoded><![CDATA[<!--buy_online--><!--KDE-VS-GNOME-300x229--><p><strong>This article originally appeared in <a href="http://www.linuxuser.co.uk/magazine-issues/issue-90/" target="_blank">issue 90</a> of <a href="http://www.linuxuser.co.uk" target="_blank">Linux User &amp; Developer</a> magazine.</strong><a href="http://www.imagineshop.co.uk/linuxuseranddeveloper/" target="_blank"><img class="size-full wp-image-2388 alignright" title="KDE & GNOME cross-desktop development" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/07/buy_online.jpg" alt="KDE & GNOME cross-desktop development" width="92" height="24" /></a><strong> Subscribe and save more than 30% and receive our exclusive money back guarantee – click <a href="https://imagine.subscribeonline.co.uk/all-titles/linux-user-&amp;-developer?offer=WEB100">here</a> to find out more.</strong></p>
<p><a href="http://www.linuxuser.co.uk/wp-content/uploads/2010/08/KDE-VS-GNOME.jpg" rel="lightbox[2898]"><img class="alignright size-medium wp-image-2903" title="KDE VS GNOME" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/08/KDE-VS-GNOME-300x229.jpg" alt="KDE & GNOME cross-desktop development" width="300" height="229" /></a>Running applications in different desktops is the easy part. Most of the applications are already cross-compatible with both KDE and GNOME as long as the required libraries are available. The real problem arises when you want to integrate the desktop aspects of your application. Desktop aspects include desktop menus, application menu, MIME type association, etc.</p>
<p>For example, GNOME uses a different location to KDE for storing  the application launcher menu item. Fortunately, you can take care of this yourself, thanks to the <a href="http://portland.freedesktop.org" target="_blank">Portland Project</a>. Portland is a joint OSDL/freedesktop.org initiative to provide developers with stable APIs for desktop Linux and other free desktop platforms.</p>
<p><em>xdg-utils</em> is the first outcome of the Portland project. It is a set of open source tools that allows applications to easily integrate with any desktop configuration. It ships with the following tools…<br />
<em>xdg-desktop-menu</em>: A command-line tool for (un)installing desktop menu items. Set it up via:</p>
<pre class="brush: cpp; title: ; notranslate">$ xdg-desktop-menu install [--noupdate] [--novendor] [--mode mode] directory-file(s) desktop-file(s)
$ xdg-desktop-menu uninstall [--noupdate] [--mode mode] directory-file(s) desktop-file(s)</pre>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p><em>xdg-desktop-icon</em>: A command-line tool for (un)installing icons to the desktop. Set it up via:</p>
<pre class="brush: cpp; title: ; notranslate">$ xdg-desktop-icon install [--novendor] FILE
$ xdg-desktop-icon uninstall FILE</pre>
<p><em>xdg-icon-resource</em>: A command-line tool for (un)installing icon resources. These resources may include XPM or PNG files. This tool works according to the XDG icon theme specification from freedesktop.org. Set it up via:</p>
<pre class="brush: cpp; title: ; notranslate">$ xdg-icon-resource install [--noupdate] [--novendor] [--theme theme] [--context context] [--mode mode] --size size icon-file [icon-name]
$ xdg-icon-resource uninstall [--noupdate] [--theme theme] [--context context] [--mode mode] --size size icon-name</pre>
<p><em>xdg-mime:</em> A command-line tool for querying information about file type handling and adding descriptions for new file types. Set it up via:</p>
<pre class="brush: cpp; title: ; notranslate">$ xdg-mime query { filetype | default } ...
$ xdg-mime default application mimetype(s)
$ xdg-mime install [--mode mode] [--novendor] mimetypes-file</pre>
<p>Want to know which Desktop Environment is right for you? Check out Linux User &amp; Developer&#8217;s feature <a href="http://www.linuxuser.co.uk/features/gnome-vs-kde/" target="_blank">KDE vs GNOME</a> and join the debate. You can see what else featured in issue 90 of the magazine <a href="http://www.linuxuser.co.uk/magazine-issues/issue-90/" target="_blank">here</a>.</p>
<a href="http://twitter.com/LinuxUserMag" target="_blank">
                <img src="http://www.linuxuser.co.uk/wp-content/themes/linuxuser"/images/twitter_follow.png" width="160" height="60" border="2" alt="twitter follow us" />
            </a>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/tutorials/kde-gnome-cross-desktop-development/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Shell scripting for system administrators: the basics</title>
		<link>http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-the-basics/</link>
		<comments>http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-the-basics/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 09:57:13 +0000</pubDate>
		<dc:creator>RussellBarnes</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[shell scripting]]></category>
		<category><![CDATA[shell scripts]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=2831</guid>
		<description><![CDATA[For system administrators shell scripting can be a very useful way to drastically improve workflow. Join Swayam Prakasha to find out how you can employ some fundemental tips and techniques to make your life easier…]]></description>
			<content:encoded><![CDATA[<!--buy_online--><p><strong>This article originally appeared in <a href="http://www.linuxuser.co.uk/magazine-issues/issue-90/" target="_blank">issue 90</a> of <a href="http://www.linuxuser.co.uk" target="_blank">Linux User &amp; Developer</a> magazine.</strong><a href="http://www.imagineshop.co.uk/linuxuseranddeveloper/" target="_blank"><img class="size-full wp-image-2388 alignright" title="Shell scripting for system administrators: the basics" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/07/buy_online.jpg" alt="Shell scripting for system administrators: the basics" width="92" height="24" /></a><strong> Subscribe and save more than 30% and receive our exclusive money back guarantee – click <a href="https://imagine.subscribeonline.co.uk/all-titles/linux-user-&amp;-developer?offer=WEB100">here</a> to find out more.</strong></p>
<p>If we frequently use a sequence of commands, it goes without saying that it&#8217;s a waste of time to constantly retype them at a command prompt. Scripting is a mechanism that eliminates this need by automating the command sequence for you. Now a days, scripting has become an integral part of a system administrator’s job. Shells are used to accept commands given by the user. We usually come across different shells. The most commonly used are:</p>
<p><strong>a. </strong>C shell (CSH)<br />
<strong>b.</strong> Korn shell (KSH)<br />
<strong>c. </strong>Bourne shell (SH)</p>
<p>Which shell to use is based on our requirements and we can specify it within our shell script. To find all available shells on your system, you can type the following command:</p>
<pre class="brush: bash; title: ; notranslate"># cat /etc/shells
</pre>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p>And on our system, the following is the output of the above command:</p>
<pre class="brush: bash; title: ; notranslate">/bin/sh
/bin/bash
/sbin/nologin
/bin/tcsh
/bin/csh
/bin/ksh
[root@localhost ~]#
</pre>
<p>If you are interested in knowing your current shell type, then go for this command:</p>
<pre class="brush: bash; title: ; notranslate"># echo $SHELL
</pre>
<p>On our system, we have executed the above command like this:</p>
<pre class="brush: bash; title: ; notranslate">[root@localhost ~]# echo $SHELL
/bin/bash
</pre>
<p>Let us understand some of the advantages offered by shell scripts. They can take input from a user or file and output them onto the screen. Using shell scripting, we can automate many everyday tasks and thereby save an awful lot of time.</p>

<a href='http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-the-basics/attachment/ss-figure-1/' title='SS Figure 1'><img width="200" height="150" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/08/SS-Figure-1-200x150.jpg" class="attachment-thumbnail" alt="SS Figure 1" title="SS Figure 1" /></a>
<a href='http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-the-basics/attachment/ss-figure-2/' title='SS Figure 2'><img width="200" height="150" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/08/SS-Figure-2-200x150.jpg" class="attachment-thumbnail" alt="SS Figure 2" title="SS Figure 2" /></a>
<a href='http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-the-basics/attachment/ss-figure-3/' title='SS Figure 3'><img width="200" height="150" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/08/SS-Figure-3-200x150.jpg" class="attachment-thumbnail" alt="SS Figure 3" title="SS Figure 3" /></a>
<a href='http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-the-basics/attachment/ss-figure-4/' title='SS Figure 4'><img width="200" height="150" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/08/SS-Figure-4-200x150.jpg" class="attachment-thumbnail" alt="SS Figure 4" title="SS Figure 4" /></a>
<a href='http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-the-basics/attachment/ss-figure-5/' title='SS Figure 5'><img width="200" height="150" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/08/SS-Figure-5-200x150.jpg" class="attachment-thumbnail" alt="SS Figure 5" title="SS Figure 5" /></a>
<a href='http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-the-basics/attachment/ss-figure-6/' title='SS Figure 6'><img width="200" height="150" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/08/SS-Figure-6-200x150.png" class="attachment-thumbnail" alt="SS Figure 6" title="SS Figure 6" /></a>
<a href='http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-the-basics/attachment/ss-figure-7/' title='SS Figure 7'><img width="200" height="150" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/08/SS-Figure-7-200x150.png" class="attachment-thumbnail" alt="SS Figure 7" title="SS Figure 7" /></a>
<a href='http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-the-basics/attachment/ss-figure-7-2/' title='SS Figure 7'><img width="200" height="150" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/08/SS-Figure-71-200x150.png" class="attachment-thumbnail" alt="SS Figure 7" title="SS Figure 7" /></a>
<a href='http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-the-basics/attachment/ss-location-of-sh-ex/' title='SS Location of SH ex'><img width="200" height="85" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/08/SS-Location-of-SH-ex-200x85.jpg" class="attachment-thumbnail" alt="SS Location of SH ex" title="SS Location of SH ex" /></a>

<a href="http://twitter.com/LinuxUserMag" target="_blank">
                <img src="http://www.linuxuser.co.uk/wp-content/themes/linuxuser"/images/twitter_follow.png" width="160" height="60" border="2" alt="twitter follow us" />
            </a>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/tutorials/shell-scripting-for-system-administrators-the-basics/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Debug &amp; fix software with help from The Bug Genie</title>
		<link>http://www.linuxuser.co.uk/tutorials/debug-fix-software-with-help-from-the-bug-genie/</link>
		<comments>http://www.linuxuser.co.uk/tutorials/debug-fix-software-with-help-from-the-bug-genie/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 13:07:41 +0000</pubDate>
		<dc:creator>RussellBarnes</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[The Bug Genie]]></category>

		<guid isPermaLink="false">http://www.linuxuser.co.uk/?p=2623</guid>
		<description><![CDATA[It's easy to debug your software and keep tabs on errors with the added aid of The Bug Genie's web-based issue-tracking software. Dmitri Popov shows you how to clean up your act…]]></description>
			<content:encoded><![CDATA[<!--buy_online--><p><strong>This article originally appeared in <a href="http://www.linuxuser.co.uk/magazine-issues/issue-89/" target="_blank">issue 89</a> of <a href="http://www.linuxuser.co.uk" target="_blank">Linux User &amp; Developer</a> magazine.</strong><a href="http://www.imagineshop.co.uk/linuxuseranddeveloper/" target="_blank"><img class="size-full wp-image-2388 alignright" title="Debug & fix software with help from The Bug Genie" src="http://www.linuxuser.co.uk/wp-content/uploads/2010/07/buy_online.jpg" alt="Debug & fix software with help from The Bug Genie" width="92" height="24" /></a><strong> Subscribe and save more than 30% and receive our exclusive money back guarantee – click <a href="https://imagine.subscribeonline.co.uk/all-titles/linux-user-&amp;-developer?offer=WEB100">here</a> to find out more.</strong></p>
<p>Despite the progress we have made in developing software, bug-free applications are still just a beautiful dream. That’s why managing bugs and tracking issues remain a crucial part of the software development process. And since you are likely to spend a considerable amount of time dealing with software issues and bugs, a decent issue-tracking program can make your coding work less stressful and more efficient. And this is where The Bug Genie application can come in rather handy.</p>
<p>This easy-to-deploy issue-tracking solution offers all the features you’d expect from a professional bug-tracking package wrapped into a user-friendly interface. Tracking issues is only part of the deal, though. If you want users to submit bugs and provide feedback, you have to make the entire submission process as simple and easy as possible. And The Bug Genie makes it supremely easy to submit bug reports even for uninitiated users. In short, if you are looking for a robust and user-friendly bug-tracking application, The Bug Genie is exactly what you need…</p>
<p><strong>Resources:</strong><br />
A machine running the Apache/PHP/MySQL stack, or the <a href="http://www.apachefriends.org/en/xampp.html" target="_blank">XAMPP package </a><br />
The latest release of <a href="http://www.thebuggenie.com/" target="_blank">The Bug Genie </a></p>
<p><strong>01 Preparations</strong><br />
To install The Bug Genie, you need either a server with the Apache/PHP/MySQL stack, or the XAMPP solution that bundles all the required components in one neat package. For this tutorial, we use the latter, so download the latest version of XAMPP and install it on your machine.</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("LUD_MidPage_MPU1");
						</script>
					</div><p><strong>02 Download and install The Bug Genie</strong><br />
Next, point your browser to the project’s website and grab the latest version of the software. Unpack the downloaded archive and move the resulting ‘<em>thebuggenie</em>’ directory to the document root of your server (in XAMPP, it’s the htdocs directory).</p>
<p><strong>03 Launch XAMPP and start installation</strong><br />
Open the terminal and start XAMPP by executing the ‘<em>/opt/lampp/lampp start</em>’ command as root. Then point your browser to <em>http://127.0.0.1/thebuggenie/install.php</em>. Agree to the licensing terms and press Continue. Make sure that you have all the required info, then press the ‘Start installation’ button to begin the installation process.</p>
<p><strong>04 Installation step 1</strong><br />
Provide the required database connection information and hit the Continue button. When the database connection has been established, press the ‘Start installing’ button. Modify the default server information if necessary, choose the desired language and theme, then press Continue.</p>
<p><strong>05 Installation step 2</strong><br />
Next, specify the available settings. If you want to use The Bug Genie as a private system, enable the ‘Require login’ options and set the ‘Default user is a guest user’ option to No. Adjust other settings accordingly and press Continue. If you want to make your The Bug Genie installation public, leave all settings at their default values.</p>
<p><strong>06 Installation step 3</strong><br />
The Bug Genie comes with a few handy modules which extend the application’s default functionality. Among other things, these modules provide search, messaging, and calendaring features as well as enabling integration with SVN repositories. All the available modules are enabled by default, but you can turn them off individually, if needed.</p>
<a href="http://twitter.com/LinuxUserMag" target="_blank">
                <img src="http://www.linuxuser.co.uk/wp-content/themes/linuxuser"/images/twitter_follow.png" width="160" height="60" border="2" alt="twitter follow us" />
            </a>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxuser.co.uk/tutorials/debug-fix-software-with-help-from-the-bug-genie/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

