<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5412596911374218009</id><updated>2011-11-09T02:55:09.703-08:00</updated><category term='bash'/><category term='sed'/><title type='text'>This is a test</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://defectio.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5412596911374218009/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://defectio.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>alc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5412596911374218009.post-5154649798789017686</id><published>2010-11-23T17:28:00.000-08:00</published><updated>2010-11-23T18:53:30.208-08:00</updated><title type='text'>Creating files for testing - part 2</title><content type='html'>To test the behaviour of one of our applications, I needed to create a certain number of files of a certain file format. To do this, I wanted to copy the source file (a bitmap) multiple times and have the result go to the same directory. So the files did not overwrite each other, I needed to increment the file name (like: 0file.bmp, 1file.bmp, 2file.bmp).&lt;br /&gt;&lt;br /&gt;With some help from one of the developers, I came up with a script that can also create a specified number of text files (file1.txt, file2.txt etc.)&lt;br /&gt;&lt;br /&gt;The script takes two inputs:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;number of files to create - mandatory&lt;/li&gt;&lt;li&gt;file to copy - optional&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;If a file to copy is not specified, the script will create as many text files as the mandatory number entered.&lt;br /&gt;&lt;br /&gt;I've published the script on our team's repository on &lt;a href="http://github.com/"&gt;GitHub&lt;/a&gt;. You can find it here:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://github.com/csmart/naa/blob/master/sysadmin/scripts/filecreator.sh"&gt;https://github.com/csmart/naa/blob/master/sysadmin/scripts/filecreator.sh&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5412596911374218009-5154649798789017686?l=defectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://defectio.blogspot.com/feeds/5154649798789017686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://defectio.blogspot.com/2010/11/creating-files-for-testing-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5412596911374218009/posts/default/5154649798789017686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5412596911374218009/posts/default/5154649798789017686'/><link rel='alternate' type='text/html' href='http://defectio.blogspot.com/2010/11/creating-files-for-testing-part-2.html' title='Creating files for testing - part 2'/><author><name>alc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5412596911374218009.post-3285318313951462165</id><published>2010-11-23T13:51:00.000-08:00</published><updated>2010-11-23T15:13:35.511-08:00</updated><title type='text'>Creating files for testing - part 1</title><content type='html'>Sometimes I need to create files of a certain size for testing purposes. Using the Linux 'dd' command, this is pretty easy.&lt;br /&gt;&lt;br /&gt;There are lots of other posts around on how to do this. This is one of them on 'dd', including how to create the file of a certain size:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.linuxprogrammingblog.com/dd-as-a-swiss-army-knife"&gt;&lt;br /&gt;http://www.linuxprogrammingblog.com/dd-as-a-swiss-army-knife&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I've noticed that some people suggest creating a file like this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt; dd if=/dev/zero of=test-file bs=1M count=2 &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This produces a 2MB file.&lt;br /&gt;&lt;br /&gt;and others, like this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt; dd of=test-file bs=1M seek=2 count=0 &lt;/code&gt; (uses &lt;span style="font-style:italic;"&gt;stdout &lt;/span&gt;as input)&lt;br /&gt;&lt;br /&gt;&lt;code&gt;dd if=/dev/zero of=test-file bs=1M seek=2 count=0 &lt;/code&gt; (uses &lt;span style="font-style:italic;"&gt;/dev/zero&lt;/span&gt; as input)&lt;br /&gt;&lt;br /&gt;Both of the above create a 2MB file.&lt;br /&gt;&lt;br /&gt;Using 'seek' creates a &lt;a href="http://en.wikipedia.org/wiki/Sparse_file"&gt;sparse file&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5412596911374218009-3285318313951462165?l=defectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://defectio.blogspot.com/feeds/3285318313951462165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://defectio.blogspot.com/2010/11/creating-files-for-testing-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5412596911374218009/posts/default/3285318313951462165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5412596911374218009/posts/default/3285318313951462165'/><link rel='alternate' type='text/html' href='http://defectio.blogspot.com/2010/11/creating-files-for-testing-part-1.html' title='Creating files for testing - part 1'/><author><name>alc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5412596911374218009.post-6329663359576872466</id><published>2010-09-16T21:50:00.000-07:00</published><updated>2010-09-16T22:37:34.522-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='sed'/><title type='text'>Bulk edits of documents with Sed</title><content type='html'>I recently had a need to edit a number of html documents to remove a section of html code. Doing a bit of a search, it seemed that the best way of doing this was via &lt;span style="font-style: italic;"&gt;SED&lt;/span&gt; (Stream EDitor). &lt;span style="font-style: italic;"&gt;Sed&lt;/span&gt; is used in Linux to filter or transform text.&lt;br /&gt;&lt;br /&gt;The next thing I wanted to do was to find out how I could use &lt;span style="font-style: italic;"&gt;sed&lt;/span&gt; to:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Find a string within an html file.&lt;/li&gt;&lt;li&gt;Delete the string.&lt;/li&gt;&lt;li&gt;Do this for more than one html.&lt;/li&gt;&lt;/ol&gt;The first thing I had to do was to create a bash script with a for loop that can cycle through the html files one by one.&lt;br /&gt;&lt;br /&gt;The script I wrote was based on the following (I got this idea from here: &lt;a href="http://gabeanderson.com/2008/02/01/unixlinux-find-replace-in-multiple-files/"&gt;http://gabeanderson.com/2008/02/01/unixlinux-find-replace-in-multiple-files/&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;&lt;code&gt; for fl in *.php; do&lt;br /&gt;mv $fl $fl.old&lt;br /&gt;sed ’s/FINDSTRING/REPLACESTRING/g’ $fl.old &gt; $fl&lt;br /&gt;#rm -f $fl.old&lt;br /&gt;done&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;In my case I want to delete the string and I'm dealing with .html files, so the first line of my script becomes:&lt;br /&gt;&lt;br /&gt;&lt;code&gt; for fl in *.html; do &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The second line remains the same:&lt;br /&gt;&lt;br /&gt;&lt;code&gt; #renames the .html files to .html.old&lt;br /&gt;&lt;br /&gt;mv $fl $fl.old &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The string I wanted to delete was multiple lines of html. I decided to specify the start and end of the string. Also, instead of replacing text, I just want to delete it, so I change the 'g' to a 'd'.&lt;br /&gt;&lt;br /&gt;My third line becomes:&lt;br /&gt;&lt;br /&gt;&lt;code&gt; #this deletes all the html between the &amp;lt;h4&amp;gt; tag and the close table cell tag &lt;/td&gt; and redirects the output to .html&lt;br /&gt;&lt;br /&gt;sed ’/&amp;lt;h4&amp;gt;/,/&lt;\/td&gt;/d’ $fl.old &gt; $fl   &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I didn't want to keep the .old files so I uncommented the fourth line:&lt;br /&gt;&lt;br /&gt;&lt;code&gt; rm -f $fl.old #deletes the .html.old files&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;So, the script ends up looking like this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/bin/bash&lt;br /&gt;&lt;br /&gt;# script to replace multiple lines of text in multiple html files&lt;br /&gt;&lt;br /&gt;for fl in *.html; do&lt;br /&gt;    mv $fl $fl.old&lt;br /&gt;    sed '/&amp;lt;h4&amp;gt;Are you/,/&lt;\/td&gt;/d' $fl.old &gt; $fl&lt;br /&gt;    rm -f $fl.old&lt;br /&gt;done&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To run it, I just had to make it executable and run it from within the directory containing the .html files.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5412596911374218009-6329663359576872466?l=defectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://defectio.blogspot.com/feeds/6329663359576872466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://defectio.blogspot.com/2010/09/bulk-edits-of-documents-with-sed.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5412596911374218009/posts/default/6329663359576872466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5412596911374218009/posts/default/6329663359576872466'/><link rel='alternate' type='text/html' href='http://defectio.blogspot.com/2010/09/bulk-edits-of-documents-with-sed.html' title='Bulk edits of documents with Sed'/><author><name>alc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5412596911374218009.post-4250946234295154830</id><published>2010-08-26T19:26:00.000-07:00</published><updated>2010-08-26T22:32:43.256-07:00</updated><title type='text'>Character Encoding</title><content type='html'>I just learned something about character encoding. It has helped me understand some of the things I've come across when testing.&lt;br /&gt;&lt;br /&gt;This is what I learned:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Without declaring a character encoding, your data may not be treated as you expect.&lt;/li&gt;&lt;li&gt;There are lots of different character encoding systems, such as ASCII, Unicode and ISO-8859.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The ASCII standard represents characters that correspond to those used by Western languages.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;ASCII characters with decimal values of 32 - 127 are graphic characters. Those with values from 0 - 31 are non-printing control characters.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Unicode is a system to allocate a unique number (called a Code Point) to a specific character. The aim of Unicode is to create a single character set for the world's writing systems.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;UTF-8 is a character encoding for Unicode. It is backwards compatible with the ASCII standard.&lt;/li&gt;&lt;li&gt;In UTF-8, code points from 0 to 127 (inclusive) are stored using 8  bits (1 byte). Code points from 0 to 127 correspond with ASCII character  encoding. Code points above 127 are stored using 2 or more bytes and are used for other languages.&lt;/li&gt;&lt;li&gt;Some programs insert a Byte Order Mark before the first character to indicate the character encoding or endianness of the file.&lt;/li&gt;&lt;li&gt;Endianness specifies the ordering of multiple bytes of data in a computer system. Big endian - the most significant byte of any multibyte data field is stored at the lowest memory address, which is also the address of the larger field. Little endian - the least significant byte of any multibyte data field is stored at the lowest memory address, which is also the address of the larger field. (Brown, Christopher and Michael Barr. &lt;a href="http://www.netrino.com/node/149"&gt;Introduction to Endianness&lt;/a&gt;)&lt;/li&gt;&lt;/ul&gt;Here's an example of endianness from &lt;a href="http://www.allinterview.com/showanswers/75815.html"&gt;&lt;/a&gt;&lt;a href="http://www.allinterview.com/viewpost/162165.html"&gt;http://www.allinterview.com/viewpost/162165.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If the value is 0x0A0B0C0D then:&lt;br /&gt;&lt;br /&gt;In case of Little Endian storage will be:&lt;br /&gt;Address 1000 0D&lt;br /&gt;Address 1001 0C&lt;br /&gt;Address 1002 0B&lt;br /&gt;Address 1003 0A&lt;br /&gt;&lt;br /&gt;In case of Big Endian storage will be:&lt;br /&gt;Address 1000 0A&lt;br /&gt;Address 1001 0B&lt;br /&gt;Address 1002 0C&lt;br /&gt;Address 1003 0D&lt;br /&gt;&lt;br /&gt;A couple of good articles explaining Unicode are:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.joelonsoftware.com/printerFriendly/articles/Unicode.html"&gt;http://www.joelonsoftware.com/printerFriendly/articles/Unicode.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://betterexplained.com/articles/unicode/"&gt;&lt;br /&gt;http://betterexplained.com/articles/unicode/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5412596911374218009-4250946234295154830?l=defectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://defectio.blogspot.com/feeds/4250946234295154830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://defectio.blogspot.com/2010/08/character-encoding.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5412596911374218009/posts/default/4250946234295154830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5412596911374218009/posts/default/4250946234295154830'/><link rel='alternate' type='text/html' href='http://defectio.blogspot.com/2010/08/character-encoding.html' title='Character Encoding'/><author><name>alc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5412596911374218009.post-4056849379407782268</id><published>2010-08-19T18:04:00.000-07:00</published><updated>2010-08-24T17:06:46.643-07:00</updated><title type='text'>How Linux helps me become a better tester</title><content type='html'>Since I've been using Linux, I have noticed how much it has improved my approach to learning and where I could make some improvements that can help me be a better tester.&lt;br /&gt;&lt;br /&gt;I'm influenced by testers like James and Jon Bach, Michael Bolton and Pradeep Soundararajan and read a lot about testing but I occasionally find myself having trouble applying what I read about.&lt;br /&gt;&lt;br /&gt;I just read a post by Jon Bach called "&lt;a href="http://jonbox.wordpress.com/2010/07/03/an-encounter-with-jon-bach-and-the-testing-moment/"&gt;The testing moment&lt;/a&gt;". Some of the challenges in Jon's post reminded me about how I acted when I was trying to install Fedora recently. There were lots of things I needed to understand but I was resistant to taking the time to learn - I just wanted everything to work ASAP.&lt;br /&gt;&lt;br /&gt;I was copying and pasting commands, jumping from one thing to another without taking the time to slow down and try to understand what I was supposed to do.&lt;br /&gt;&lt;br /&gt;Some lessons I learned were:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Be patient - be confident that there is a solution (or at least a workaround) and in many cases, someone has probably solved it before.&lt;/li&gt;&lt;li&gt;Take my time - don't rush or you will overlook things. &lt;/li&gt;&lt;li&gt;Be methodical - not scattered. Look at the facts - what do you know, what don't you know. Know that there are things that you don't know you don't know. Don't go installing things or executing commands you don't understand - you forget you've done it or you do it out of sequence or forget something entirely.&lt;/li&gt;&lt;li&gt;Work at it - don't be lazy and just expect to be given the answer. You will learn more and find the next problem easier to solve.&lt;/li&gt;&lt;li&gt;Break down the problem - that way you won't be overwhelmed by its scale.&lt;/li&gt;&lt;li&gt;The whole installation process reminded me about something that James  Bach keeps talking about (commonly in reference to Gerry Weinberg) -  looking at things as a system. What better way to do this than by  installing an operating system. That's one of the best  thing about Linux - you have the power to configure it to a much greater  extent than Windows. But it also means you need to understand how everything fits together and not just go blindly executing commands.&lt;/li&gt;&lt;/ul&gt;When I realised that I needed to slow down and understand more about what I was doing, I began to make some progress. I decided to apply some of the lessons I learned. One of the other challenges I had during the installation process was migrating my virtual machines from my old Ubuntu machine to my new Fedora machine (I outline the process in an &lt;a href="http://defectio.blogspot.com/2010/08/migrating-virtualbox-from-ubuntu-to.html"&gt;earlier post&lt;/a&gt;). While I didn't do it without some help, it taught me some more valuable lessons.&lt;br /&gt;&lt;br /&gt;This is what happened:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;I copied the relevant virtual machines to a location on my Fedora machine. &lt;/li&gt;&lt;li&gt;I then mounted the virtual machines to my home directory, to replicate the setup I had in Ubuntu. &lt;/li&gt;&lt;li&gt;I started VirtualBox to see if it worked. There was nothing there. I realised that I needed to change the ownership of the relevant directories so they were owned by me. &lt;/li&gt;&lt;li&gt;I changed the ownership and started VirtualBox again. Now I could see my virtual machines but I was getting an error about my snapshots not being available. Why could I see my machines but not access the snapshots?&lt;/li&gt;&lt;li&gt;I Googled the error, looking for an explanation but the error message (NS_ERROR_FAILURE (0x80004005)) was generic and could have meant anything. One clue, which I ingnored in my haste, was something about not being able to find the .vdi file for the snapshot.&lt;/li&gt;&lt;li&gt;In my Google search I also ran across a post about checking the VirtualBox.xml file. &lt;/li&gt;&lt;li&gt;I then tried looking in the VirtualBox.xml file for some clues. Some time ago I had a corrupted VirtualBox.xml file, which caused me some problems, so I thought that may have been the cause of my problem now. I assumed that the UUIDs for the snapshots were somehow incorrect in the VirtualBox.xml file or the XML file for each snapshot. I started comparing the IDs between the snapshot XML and the VirtualBox.xml. I couldn't see &lt;/li&gt;&lt;li&gt;why there was an issue. &lt;/li&gt;&lt;li&gt;It wasn't until I asked for help that the problem was solved. I had overlooked the path details in the VirtualBox.xml file, pointing to each snapshot. The VirtualBox.xml file was copied from my old Ubuntu machine. In the file, it references the path to each snapshot. Under Ubuntu my user directory was /home/allan but when I installed Fedora, I decided to use /home/al. I didn't realise that the VirtualBox.xml file states the path to the virtual machine snapshots and that by using a new username, VirtualBox couldn't see any of my snapshots (it was looking for them under /home/allan/.Virtualbox/Machines, not /home/al/.Virtualbox/Machines). It was such an easy solution.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;I think this is where I went wrong:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;I was looking in the right place (the VirtualBox.xml file), but my assuption about a corrupt XML file mad me blind to anything else. I stuck with one cause and didn't examine others. I was being methodical but with blinkers on.&lt;/li&gt;&lt;li&gt;The cause of my problem was something that seemed totally unrelated. It started many steps previously - when I decided to select the username of 'al' vs. 'allan', when initially installing Fedora.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;I was looking for an exact solution to my problem with a Google search but did not accept the possibility that there was a combination of factors that made my problem unique (or at least undocumented on the internet).&lt;/li&gt;&lt;li&gt;My brain wanted me to come to make a quick decision, so I latched on to the first one that seemed right and went with it, closing myself off from other possibilities.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;It's hard to see the big picture when you are in the middle of it all, especially when you are doing something new or unfamiliar. Sometimes you need to step back from the problem and try to see it with new eyes. I think that is one of the hardest things to do. The best thing about these sort of experiences is that I can use them as opportunities to improve my ability to test.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5412596911374218009-4056849379407782268?l=defectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://defectio.blogspot.com/feeds/4056849379407782268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://defectio.blogspot.com/2010/08/how-linux-helps-me-become-better-tester.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5412596911374218009/posts/default/4056849379407782268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5412596911374218009/posts/default/4056849379407782268'/><link rel='alternate' type='text/html' href='http://defectio.blogspot.com/2010/08/how-linux-helps-me-become-better-tester.html' title='How Linux helps me become a better tester'/><author><name>alc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5412596911374218009.post-8713387440230609119</id><published>2010-08-12T23:50:00.000-07:00</published><updated>2010-08-13T00:18:50.266-07:00</updated><title type='text'>Setting up a Network Printer in Fedora 13</title><content type='html'>I just set up printing in Fedora 13.&lt;br /&gt;&lt;br /&gt;This is how I did it:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;I had to get the drivers for my network printer, so I installed foomatic:&lt;/li&gt;&lt;br /&gt;&lt;code&gt;sudo yum install foomatic&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Select &lt;span style="font-weight: bold;"&gt;Administration - Printing.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Select&lt;span style="font-weight: bold;"&gt; Server - New Printer&lt;/span&gt;, and authenticate.&lt;/li&gt;&lt;li&gt;Select &lt;span style="font-weight: bold;"&gt;Network Printer - Find Network Printer&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;In the &lt;span style="font-style: italic;"&gt;Host&lt;/span&gt; field, enter the IP address of the printer and click &lt;span style="font-weight: bold;"&gt;Find&lt;/span&gt;.&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Under &lt;span style="font-style: italic;"&gt;Connections&lt;/span&gt;, select &lt;span style="font-style: italic;"&gt;LPD/LPR queue 'ps'&lt;/span&gt; and click &lt;span style="font-weight: bold;"&gt;Forward&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;p&gt;The system will search for drivers.&lt;br /&gt;&lt;/p&gt;&lt;li&gt;Review install options and click &lt;span style="font-weight: bold;"&gt;Forward&lt;/span&gt;.&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;Enter a printer name and description and click&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; Apply&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;For a nicer description and screenshots, see &lt;a href="http://gadgethubs.com/setting-up-a-network-printer-in-fedora-13/"&gt;Setting up a network printer in Fedora 13&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For info on troubleshooting printing, see &lt;a href="https://fedoraproject.org/wiki/Printing/Debugging#Printing_troubleshooter"&gt;Fedora Printing/Debugging&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5412596911374218009-8713387440230609119?l=defectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://defectio.blogspot.com/feeds/8713387440230609119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://defectio.blogspot.com/2010/08/setting-up-network-printer-in-fedora-13.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5412596911374218009/posts/default/8713387440230609119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5412596911374218009/posts/default/8713387440230609119'/><link rel='alternate' type='text/html' href='http://defectio.blogspot.com/2010/08/setting-up-network-printer-in-fedora-13.html' title='Setting up a Network Printer in Fedora 13'/><author><name>alc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5412596911374218009.post-3453923222946511719</id><published>2010-08-12T17:48:00.000-07:00</published><updated>2010-08-12T21:58:15.614-07:00</updated><title type='text'>Migrating VirtualBox from Ubuntu to Fedora</title><content type='html'>One of the things I had to do when installing Fedora was to migrate my Windows virtual machines. My goal was to move the machines to a newly created LVM volume on my Fedora machine and then access the virtual machines from my &lt;span style="font-style: italic;"&gt;/home&lt;/span&gt; directory.&lt;br /&gt;It wasn't an easy task for me but I learned a lot of new things about Linux in the process (and testing - but that's worthy of another post).&lt;br /&gt;&lt;br /&gt;The whole process involved the following steps:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;When installing Fedora, I created an LVM (Logical Volume Manager) volume for my virtual machines, called "virtual".&lt;/li&gt;&lt;br /&gt;&lt;li&gt;I added the Fedora &lt;a href="http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo"&gt;VirtualBox repo file&lt;/a&gt; to &lt;span style="font-style: italic;"&gt;/etc/yum.repos.d/&lt;/span&gt;.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;I use NTLMAPS, so I had to modify the &lt;span style="font-style: italic;"&gt;virtualbox.repo&lt;/span&gt; file to use the NTLMAPs proxy&lt;/li&gt;&lt;br /&gt;&lt;code&gt;sudo vim /etc/yum.repos.d/virtualbox.repo&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/code&gt;&lt;p&gt;Insert the line: &lt;code&gt;proxy=http://localhost:5865&lt;/code&gt;&lt;br /&gt;&lt;/p&gt;&lt;li&gt;I installed VirtualBox development tools on my Fedora machine.&lt;/li&gt;&lt;code&gt;&lt;br /&gt;sudo yum groupinstall "Development Tools"&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;I installed VirtualBox and &lt;a href="http://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support"&gt;Dynamic Kernel Module Support (DKMS)&lt;/a&gt;.&lt;/li&gt;&lt;code&gt;&lt;br /&gt;sudo yum install VirtualBox-3.2 dkms&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;I mounted my old virtual machines drive and used rsync to copy the machines from my old "virtual" partition to the new LVM volume:&lt;br /&gt;&lt;/li&gt;&lt;code&gt;&lt;br /&gt;sudo rsync -Pa /media/virtual/VirtualBox /virtual/&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;I created a mount point for the virtual machines on my home directory&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;user style="font-style: italic;"&gt;:&lt;/user&gt;&lt;br /&gt;&lt;/li&gt;&lt;code&gt;&lt;br /&gt;mkdir /home/al/.VirtualBox&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;I mounted the "virtual" LVM volume to the mount point on my home directory:&lt;br /&gt;&lt;/li&gt;&lt;code&gt;&lt;br /&gt;sudo mount -o bind /virtual/VirtualBox/ /home/al/.VirtualBox&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;I edited my &lt;span style="font-style: italic;"&gt;fstab&lt;/span&gt; file to to make sure &lt;span style="font-style: italic;"&gt;virtual/VirtualBox&lt;/span&gt; is mounted to my mount point (&lt;span style="font-style: italic;"&gt;/home/al/.Virtualbox&lt;/span&gt;) &lt;span style="font-style: italic;"&gt;&lt;/span&gt;each time I reboot.&lt;/li&gt;&lt;code&gt;&lt;br /&gt;sudo vim /etc/fstab&lt;/code&gt;&lt;br /&gt;&lt;p&gt;Insert the following line:&lt;/p&gt;&lt;code&gt;/virtual/VirtualBox     /home/al/.VirtualBox    auto    bind,defaults   0 0&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;I changed ownership of the &lt;span style="font-style: italic;"&gt;.Virtual&lt;/span&gt; directory and its contents to me:&lt;/li&gt;&lt;br /&gt;&lt;code&gt;sudo chown al:al .VirtualBox -Rf&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;I edited the &lt;span style="font-style: italic;"&gt;VirtualBox.xml&lt;/span&gt; file to ensure that I referenced the correct path to my snapshots. This is probably one of the easiest steps but it caused me the most problems as I didn't know I had to do it in the first place. The reason I had to do this is was because my user directory was&lt;span style="font-style: italic;"&gt; /home/allan&lt;/span&gt; on my Ubuntu machine but on my Fedora machine, I decided to use &lt;span style="font-style: italic;"&gt;/home/al&lt;/span&gt;. I didn't realise that the &lt;span style="font-style: italic;"&gt;VirtualBox.xml&lt;/span&gt; file states the path to the virtual machine snapshots and that by using a new username, VirtualBox couldn't see any of my snapshots (it was looking for them under&lt;span style="font-style: italic;"&gt; /home/allan/.Virtualbox/Machines&lt;/span&gt;, not &lt;span style="font-style: italic;"&gt;/home/al/.Virtualbox/Machines&lt;/span&gt;).&lt;/li&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5412596911374218009-3453923222946511719?l=defectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://defectio.blogspot.com/feeds/3453923222946511719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://defectio.blogspot.com/2010/08/migrating-virtualbox-from-ubuntu-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5412596911374218009/posts/default/3453923222946511719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5412596911374218009/posts/default/3453923222946511719'/><link rel='alternate' type='text/html' href='http://defectio.blogspot.com/2010/08/migrating-virtualbox-from-ubuntu-to.html' title='Migrating VirtualBox from Ubuntu to Fedora'/><author><name>alc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5412596911374218009.post-4743982960237008762</id><published>2010-08-10T20:35:00.000-07:00</published><updated>2010-08-11T22:14:07.246-07:00</updated><title type='text'>Installing Fedora 13</title><content type='html'>Having used Ubuntu for 12 months, I recently installed Fedora 13. It wasn't easy, even though I had the help of the Linux experts I work with.&lt;br /&gt;&lt;br /&gt;This is a list of some of the things I learned about Linux while going through the installation process.&lt;br /&gt;&lt;br /&gt;Disclaimer: Most of the Linux stuff on this blog is stuff I want to remember. To any experts out there - go easy on me - I am still drinking from the noob cup.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;If you want to see the services you have running on your machine, netstat is your friend.&lt;br /&gt;&lt;/li&gt;&lt;p&gt;For TCP services:&lt;br /&gt;&lt;/p&gt;&lt;code&gt; netstat -lt &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;or for TCP services, including port number:&lt;br /&gt;&lt;/p&gt;&lt;code&gt; netstat -ltn &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Another way to see if a service is running on your machine is to telnet to it:&lt;br /&gt;&lt;/li&gt;&lt;code&gt; telnet &amp;lt;server e.g. localhost&amp;gt; &amp;lt;port&amp;gt; &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;If you are behind a proxy server, you'll need to use NTLMAPS (&lt;a href="http://ntlmaps.sourceforge.net/"&gt;NTLM Authorisation Proxy Server&lt;/a&gt;). If you want ntlmaps to automatically run on startup, add the following line to your &lt;code&gt;/etc/rc.local &lt;/code&gt;file:&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;code&gt; ntlmaps /etc/ntlmaps/server.cfg &amp;amp; &lt;/code&gt;&lt;br /&gt;&lt;p&gt; The '&amp;amp;' will ensure that it runs in the background and doesn't stall Fedora on boot up.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;li&gt; Connecting NTFS-formatted drives? Make sure you install the ntfs package.&lt;/li&gt;&lt;br /&gt;&lt;code&gt;sudo yum install ntfs-3g &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt; Can't find where your repositories are listed? Try:&lt;/li&gt;&lt;br /&gt;&lt;code&gt; /etc/yum.repos.d&lt;/code&gt;&lt;br /&gt;&lt;p&gt; Note: if you have just updated your repository list, make sure you run the following so the operating system knows about the change:&lt;br /&gt;&lt;/p&gt;&lt;code&gt; sudo yum update&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;If you want to test websites on your local machine, follow these steps (I got some of this info from &lt;a href="http://www.hackourlives.com/install-apache-php-mysql-phpmyadmin-on-fedora-13/"&gt;here&lt;/a&gt;): &lt;/li&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Install Apache:&lt;/li&gt;&lt;br /&gt;&lt;code&gt; sudo yum install httpd&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt; Depending on the nature of your website, you may need to install other packages. In my case, it was PHP and PHP-Markdown:&lt;/li&gt;&lt;br /&gt;&lt;code&gt; sudo yum install php php-markdown&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt; Start Apache:&lt;/li&gt;&lt;br /&gt;&lt;code&gt; sudo /sbin/service httpd start&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Make sure Apache starts whenever you start Fedora:&lt;/li&gt;&lt;br /&gt;&lt;code&gt; su -&lt;/code&gt;&lt;br /&gt;&lt;code&gt;/sbin/chkconfig --levels 235 httpd on&lt;/code&gt;&lt;br /&gt;&lt;p&gt;Note: 'Levels' refers to &lt;a href="http://en.wikipedia.org/wiki/Runlevel"&gt;run levels&lt;/a&gt;. 2 - single-user, 2 - . &lt;br /&gt;&lt;li&gt;As root, make sure you place the website pages in the following location (Fedora is different than Ubuntu in this regard): &lt;/li&gt;&lt;br /&gt;&lt;code&gt;sudo cp &amp;lt;origin&amp;gt; /var/www/html/ -Rf&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/code&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt; I found more Fedora basic info on &lt;a href="http://www.fedorafaq.org/basics/"&gt;Unofficial Fedora FAQ&lt;/a&gt;.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5412596911374218009-4743982960237008762?l=defectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://defectio.blogspot.com/feeds/4743982960237008762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://defectio.blogspot.com/2010/08/installing-fedora-13.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5412596911374218009/posts/default/4743982960237008762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5412596911374218009/posts/default/4743982960237008762'/><link rel='alternate' type='text/html' href='http://defectio.blogspot.com/2010/08/installing-fedora-13.html' title='Installing Fedora 13'/><author><name>alc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
