ThoughtFactory.CreateThought() A random collection of thoughts from an easily bored developer

26Apr/090

When You Assume..

I, like many others, have never thought of Linux as a "pretty" operating system, instead choosing to think of it as the home of "best effort" programmer-designed GUIs and "command line first" design.

This line of thought has set my expectations for my desktop Linux environments at home. When I switched to running Linux as my main Desktop machine 18 months ago I noticed that the fonts were nowhere near as nice as my Mac and Windows machines. Blindly assuming that Ubuntu didn't support ClearType, I simply went about my business and put up with the horrible fonts.

That was up until today, when I finally decided to investigate. It turns out that Ubuntu fully supports ClearType (although they call it "subpixel smoothing"), it's just turned off by default. There's even a handy GUI for turning it on. I'm never going to assume that my OS has to look like a dog's breakfast ever again.

28Dec/080

Flashdance

Until recently, Adobe's support for Flash in 64 bit Linux environments has been pretty much non existent. Those of us who have made the jump have had to make do with nspluginwrapper, which enables the Netscape plugins to run on architectures (such as x64) that they were not written for. The experience offered by this solution was seriously sub par, and was almost a show stopper issue for me when deciding whether or not to make the switch to Linux.

This all changed when Adobe started releasing Alphas of the Flash 10 player for x64 linux distros. Finally we can run the flash plugin natively, ditching the horrid performance and "gray screen of death" that was commonly associated with nspluginwrapper.

It took me about 20 seconds to set up the new plugin using this guide from Softpedia. I uninstalled nspluginwrapper, created a plugin directory as instructed and copied in the libflashplayer.so file. Then I reboot firefox and....

Argh! The performance was even worse than before! What was going on?

A quick scan of top told me that a process called gtk-gnash was eating 100% of one of my 4 CPU cores. I had found the culprit. Unfortunately Ubuntu comes with a horrible open source flash implementation called gnash. The nspluginwrapper implementation had successfully kept it at bay, but now that was gone, leaving me exposed to the CPU usage equivalent of Unicron that is gnash.

After uninstalling everything to do with gnash and giving the system a quick restart for good measure, seeing as gnash had successfully crashed ALSA and a few other core systems, and I was up and running. Finally I can enjoy watching mind numbing Youtube videos and playing benign Flash games at a speed more befitting of my Quad Core box with 8 Gb of RAM!

Tagged as: , , No Comments
16Jul/082

Command and Conquer Pt 1: The Basics

In the early years of public internet usage, before the days of PPP and SLIP (anyone else remember using a SLIP client to get IP connectivity??), one of the only ways to get connected from home was to dial in to a *NIX shell account using a Terminal Emulator application. To many people, their first exposure to the "internet" involved a blinking cursor and a plethora of confusion as their "dir" command refused to work.

That method of internet access hasn't been popular in quite some time, but regardless, the ancient art of staring blankly at the command line is making somewhat of a comeback through another avenue. With the popularity of OSX, Linux-based ultra portables and "friendly" Linux distributions such as Ubuntu, more and more people are being exposed to environments where Bash is the most common way of performing non-GUI operations.

"What's that?", I hear you say, "Non-GUI Operations? But I'm using the latest version of Friendlynix, the friendliest Linux distribution in the world! Can't I do everything through the GUI?". For the most part, yes. However, there are going to be times when you need to peek "under the covers", and it's best to be prepared lest you be shocked and disturbed by what you find. *NIX variants may have lost a lot of their rough edges, but it's not all icecream and cakes just yet.

So let's start with the basics. A *NIX style file system is completely different to the C:\ drive orientated view found in Windows. Everything starts from a single root directory, which lives at "/". All your devices, including DVD Drives, USB sticks, and hard drives,  live as branches of this directory. If you're interested, you should look into device mounting, but for the sake of this conversation it's enough to know that the top of your file system is always "/" and everything else can be found below it. Another thing to note is that most *NIX file systems are case sensitive. This means that, to the file system, "MySpecialFile.txt" is not the same as "myspecialfile.txt".

One of the most important things you'll need to do once you pop open your terminal of choice is get your bearings, as you won't be comfortable until you get a feeling for where you sit in relation to everything else. Depending on your terminal setup, this may already be shown to you as part of the prompt, but if it is not then you'll want to use a command called pwd, which means "print working dir".

garrys@GAMBIT:~$ pwd
/home/garrys

Here it is telling me that I'm currently in the "/home/garrys" directory. This is my home directory, and is quite often your starting point for a new shell session. Don't worry about the "garrys@GAMBIT:~$". That's my Bash prompt telling me who I'm logged on as, the machine that I'm logged on to and the current working directory. "~" is effectively a shortcut for your home directory, but I'll get into that a little later.

Now that we know where we are, we'll want to get a look at our surroundings. The ls command is the *NIX equivalent of good old dir, and the source of much confusion for recent DOS converts. It stands for "list directory contents", and that's exactly what it does.

garrys@GAMBIT:~$ ls
amsn_received         Music                       squeak.image
argo.user.properties  My GCompris                 SqueakV39.sources
autosave.xmi          nautilus-debug-log.txt      temp
Desktop               paw.metafile                Templates
Documents             Pictures                    uml_generated_code
Examples              Public                      Videos
GNUstep               runtime-EclipseApplication  workspace
gpodder-downloads     squeak.changes

Now, there are a few arguments for ls that you should be aware of. The actual format of the ls command is:

ls [OPTIONS] [FILE]

where [OPTIONS] is, for the sake of this conversation, a string starting with "-" and [FILE] is a filter that you would like to apply to restrict your query. Both [OPTIONS] and [FILE] are optional. [OPTIONS] represents a series of options that you can apply to your command to affect the outcome. An important thing to note is that these options can be combined, which makes for a pretty powerful little tool.

One of the most useful options you can apply is the list option, "l". It formats the output in a one item per row list, and also presents additional information on each entry, including file size. You would execute it as follows.

garrys@GAMBIT:~$ ls -l
total 16500
drwx------  2 garrys garrys     4096 2008-05-13 20:10 amsn_received
-rw-r--r--  1 garrys garrys     1439 2008-07-04 09:42 argo.user.properties
-rw-------  1 garrys garrys    18067 2008-07-14 20:34 autosave.xmi
drwxr-xr-x 15 garrys garrys     4096 2008-07-04 18:44 Desktop
drwxr-xr-x  8 garrys garrys     4096 2008-07-14 18:01 Documents
lrwxrwxrwx  1 garrys garrys       26 2007-12-02 09:07 Examples -> /usr/share/example-content
drwxr-xr-x  3 garrys garrys     4096 2008-07-13 21:10 GNUstep
drwxr-xr-x  5 garrys garrys     4096 2008-07-05 19:55 gpodder-downloads

ls in it's base form tries to be helpful by hiding various files from you, such as those that start with a "." character. If you'd like to see these, you can use the "a" option (think "all", as in "show me all files"). Here we've combined the "a" and "l" options to show all files in a directory in an item per row list format:

garrys@GAMBIT:~$ ls -la
total 17868
drwxr-xr-x 138 garrys garrys    12288 2008-07-17 00:31 .
drwxr-xr-x   3 root   root       4096 2007-12-02 09:07 ..
drwx------   2 garrys garrys     4096 2008-04-20 23:58 .abuse
drwxr-xr-x   2 garrys garrys     4096 2008-02-22 20:17 .ActiveState
drwx------   4 garrys garrys     4096 2008-05-30 23:57 .adobe
drwxr-xr-x   4 garrys garrys     4096 2008-01-04 13:50 .alien-arena
-rw-r--r--   1 garrys garrys      224 2008-05-11 23:53 .alsamodular.cfg
drwx------   9 garrys garrys     4096 2008-05-28 01:31 .amsn
drwx------   2 garrys garrys     4096 2008-05-13 20:10 amsn_received
-rw-r--r--   1 garrys garrys      657 2008-07-15 22:09 .amSynthControllersrc
-rw-r--r--   1 garrys garrys   116060 2008-07-15 22:09 .amSynth.presets
-rw-r--r--   1 garrys garrys      159 2008-07-15 22:09 .amSynthrc
-rw-r--r--   1 garrys garrys     1439 2008-07-04 09:42 argo.user.properties

Notice all the files with full stops at the start? Normally we wouldn't see these (and rightly so, as they are mostly settings files), but the "a" option makes them visible. There are many more useful options, such as "t" to sort by the modification time and "S" to sort by size, but those should be enough to keep you going for the moment.

After specifying all your options you are able to add an optional filter to limit your results. These filters can make use of wildcards. You will probably find yourself reaching for the "*" character more often than the others. It basically means "match anything and everything", and is incredibly handy. Using this you could do something like the following to match all text files in a directory:

garrys@GAMBIT:~$ ls *.txt
nautilus-debug-log.txt

As you can see, only files ending in ".txt" were returned. Very useful.

Now that we can look at the contents of a directory, how do we move about? We use the cd command, which means "change directory". cd is fairly straightforward, as the syntax is extremely simple:

cd [DIRECTORY]

There are a few special directories that you should be aware of. The aforementioned "/", or root directory, is probably the most important. If you cd to here then you'll be sitting at the top of your file system. As previously mentioned, "~" is a shortcut for your home directory. If you cd to here from anywhere in the file system then you will be taken straight to your home directory, usually /home/yourusername.

Every directory always contains two entries you can navigate to, "." and "..". The first, ".",  refers to the directory itself, so if you cd to this then you're not going to go anywhere. This is actually extremely useful, as you'll find out later on, but for the moment we'll ignore it. ".." refers to the parent directory (the directory "above" your current location in the file system). Technically you could cd to ".." until the end of time, as once you hit the root directory it becomes just like ".", i.e. ".." in the root directory always refers to the root directory.

# Change directory to the root of your file system
cd /
# Change directory to your home directory
cd ~
# Stay in the current directory
cd .
# Move to the parent directory
cd ..

When moving to an actual directory you simply type the name of the path to that directory. You can either reference the directory from the root of the file system (an absolute path), or use a relative path, which is the location of the directory from your current position. For example:

# Move to the "etc" directory which lives directly under the root directory
cd /etc
# Move to the downloads/graphics directory which is in the directory I'm currently in. Note there's no leading "/" because we want the path to be relative
cd downloads/graphics

We can even get fancy and combine the parent directory ".." with other paths. This allows us to move up in the file system as well as down. For example:

# We're going to use two directories here: /etc and /bin. They both sit one level under the root directory.
garrys@GAMBIT:/$ cd /etc
#Then we can use a relative reference to move to /bin as follows
garrys@GAMBIT:/etc$ cd ../bin

You can also use wildcards with cd. It will pick the first matching path from the wildcard results and attempt to change directory to it.

# Get a list of all the directories starting with "D". The -d option on ls simply tells ls to only print the names of directories, rather than their contents
garrys@GAMBIT:~$ ls -d D*
Desktop  Documents
# Change directory to the first wildcard match, which is going to be the Desktop directory
garrys@GAMBIT:~$ cd D*
# Show our full path, just to prove exactly where we are (even though it's shown in the Bash prompt)
garrys@GAMBIT:~/Desktop$ pwd
/home/garrys/Desktop

The most important thing you can ever be taught is how to learn, and the best way to learn about commands on *NIX systems is the man command. It presents manual pages on commands, describing exactly what they do and what syntax you need to use when calling them. Using this command you can find out more information about all those ls options I neglected to mention in the above text.

garrys@GAMBIT:~$ man ls
LS(1)                           User Commands                           LS(1)
NAME
ls - list directory contents
SYNOPSIS
ls [OPTION]... [FILE]...
DESCRIPTION
List  information  about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort.
Mandatory arguments to long options are mandatory  for  short  options
too.
--SNIP--

The man command takes up the entire terminal, and pushing escape will not get you out of it, no matter how many times you try. "q" is the magic key to exit a man page. You can also use the arrow keys to move around, and space acts as a "page down" mechanism. One of the coolest things you can do is search within the man page. "/" followed by a character sequence will search the man page for that character sequence. Very handy if you're hunting through a rather lengthy file for one pesky option.

One of the best things about *NIX based operating systems is the majority of the content on your file system is in plain text format. Storing things like this is actually a key part of the philosophy that UNIX was based on, as it enables programs to play nice with each other on the command line (among other things). So you have all these text files sitting on your computer; how do you get at them? Well, there are a few options, perhaps the simplest being the cat command.

cat is capable of concatenating multiple files together and printing them out to the command line. Technically it sends them a stream called stdout, but that's a discussion for another day. Basically you give it one or more files (actually you don't even need to give it a file, but once again that's a little beyond our discussion here) and it will print the files out, one after another.

garrys@GAMBIT:~$ cat textfile1.txt
This is textfile 1
garrys@GAMBIT:~$ cat textfile2.txt
This is textfile 2
garrys@GAMBIT:~$ cat textfile1.txt textfile2.txt
This is textfile 1
This is textfile 2

That's fine for small text files, but what about large files? Well, for that you can use less. It presents information page by page, much like man; in fact, it has almost the same syntax as man (q to quit, space to page, "/" to search etc). You can check out it's man page for a full list of commands. You may also be interested in learning about more, which is basically the predecessor to less. It's worth knowing simply because you may see it pop up on the web and wonder just exactly what it is.

Most of the commands you've executed up until this point have been in your PATH. This means that they are in designated parts of the system that Bash is aware of and knows to look for executables in. A slight problem arises when you try to run an executable file that may be sitting on your Desktop or in your home directory somewhere;  namely it won't find the file you're after.It can be incredibly frustrating for new users, as the file shows up when using ls. The thing is, for various security reasons you need to provide a full path to any executable that's not in your PATH.

# List the executable I want, just to show that it's clearly in the local directory
garrys@GAMBIT:~/Desktop$ ls NVIDIA-Linux-x86_64-169.12-pkg2.run
NVIDIA-Linux-x86_64-169.12-pkg2.run
# Try to execute the file without providing a full path
garrys@GAMBIT:~/Desktop$ NVIDIA-Linux-x86_64-169.12-pkg2.run
#Bash tells me that this didn't work because it couldn't find the command
bash: NVIDIA-Linux-x86_64-169.12-pkg2.run: command not found
# The following will work, as I've specified a full command by using the magic "." directory that references the current directory. The added "./" at the start is the key to success here
garrys@GAMBIT:~/Desktop$ ./NVIDIA-Linux-x86_64-169.12-pkg2.run

This is a fairly big difference for people who are used to the Windows command line or DOS, but it's one that's extremely important to remember.

So now you can find out where you are, see what's in your current directory, move about, find out more information about commands and check out the contents of text files. See, the command line is not so scary after all! Next time we'll check out some basic file and directory manipulation commands and also explore the difference between Windows and *NIX style file permissions.

18Jun/081

Get Back

I've been using the Firefox 3.0 beta since I upgraded to Ubuntu 8.04, as it came as a standard package, but until now I had no idea that version 3.0 had a significantly different UI from 2.0. In fact, I only found out when I saw recent Flickr posts showing a Firefox comparison chart with a list of "advantageous" features. One in particular stuck out:

Large "back" button, the result of decades of market research

Large back button? I couldn't see a large back button on my Ubuntu install, even though I was running the latest 3.0 release. What were they talking about?

After installing Firefox 3.0 on my Windows 2003 machine at work I soon found out: They've enlarged the back button, presumably because it's the most commonly hit icon in the tool bar, and it looks pretty cool. I must say that I don't use the back button much, I'm more of a "delete key == back" kinda guy, but it's a nice touch.

Apparently there's a bit of backlash against this new feature, but at least they're trying. It's certainly less jarring than IE7's "hide the menu" approach to UI innovation, and it makes quite a lot of sense from a practical point of view.

I've now upgraded my Mac and XP machines to Firefox 3.0, and I'm enjoying the new UI. As an aside, and regardless of John Gruber's list of gripes, I still think that Firefox 3.0 on the Mac is a huge step forward in comparison to what they had. Versions 2.0 and 3.0 are like chalk and cheese. But I digress..

So why didn't my Linux install have this spiffy new button? Well, it turns out that Firefox 3.0 on Linux is one of the latest applications to get the Tango treatment.  Tango is an attempt to bring some order to the world of open source applications by giving them a sense of consistency. This is actually a great idea, and it's done wonders for applications such as OpenOffice.Org and The GIMP, which now look somewhat respectable. There's a showroom full of projects that have had a Tango related makeover, and most of the featured applications are much better off with the new icon set.

This is all well and good, but what about Firefox? It's probably the biggest open source project in next to Linux itself, and yet it's not yet mentioned in the Tango Showroom. Surely there's a reason for this?

Well, a potential reason becomes fairly obvious once you actually open up the browser. The very first page that pops up has a picture of what the new theme looks like on Windows Vista, which is a stark contrast to what you are seeing in your native browser window.

Mozilla on Ubuntu

See what I mean? The "standard icon" idea that has worked so well for OpenOffice.Org, The GIMP and VMWare Workstation has given us a fairly plain browser that has lost all traces of the innovation that the Firefox team were trying to implement. It looks pedestrian and boring, in fact if it wasn't for the deli.cio.us plugin icons I think I'd never get any work done, as a mere glance at my Firefox toolbar would send me straight to sleep.

It's sad that the most interesting, and therefore the one most likely to draw your attention at a casual glance, icon in the standard set now being the home icon. Although it is much more visually appealing than the plain forward and back arrows, it's a button that I can't remember ever clicking. Not even once. There are no paint brushes or printers to mix things up and keep your eye from settling on a useless feature that you've never wanted and will never need.

The great thing about Firefox is that you can apply a theme to get it to look however you want, so you would think that I would have no need to complain. I could just pick a theme from the Firefox website and would be happy, right? Well, yes and no. There's no "official" theme from Firefox that delivers similar functionality for Linux. There might very well be a 3rd party theme that will make my browser act like this (I did look for one without success, but that's another story altogether), but that still doesn't change the fact that the Firefox team have taken a vastly different approach to their Linux UI when compared to OSX and Windows, one which flies in the face of their obvious urge to innovate.

Alex Faaborg spoke about how they wanted to integrate with the host OS as much as possible on the proprietary platforms, and that didn't stop them from making the forward and back buttons look absolutely nothing like any native control on XP, Vista or OSX, so their integration manifesto couldn't have been that rigid. With Linux they have gone for total homogonisation, where as OSX and Windows have an "integrated, but with individual flair" feel. They haven't had all the life sucked out of them by a desire to conform to the nth degree. Standards are great, and are certainly needed on Linux given the diverse nature of the different window managers, but they shouldn't be used to stifle ideas and discourage creativity.

Tagged as: , , 1 Comment
30May/080

Maximize Your Potential

Up until tonight I was pretty happy with my switch to Thunderbird. I'd migrated over my RSS feeds, for which I was previously using the (admittedly rather cool, as the RSS feeds are almost done at an account level, rather than application level) Outlook 2007 RSS feature, and was busy searching for a replacement calendar application.

My state of mail related bliss was interrupted when I performed a system update involving a new version of GTK. Upon restarting my machine, I discovered that Thunderbird was stuck in full screen mode. Full screen mode involves an application filling the entire screen with no window adornments, so it can't be resized or even moved to another screen. This wouldn't have been so bad if it wasn't for the fact that all the secondary windows (preferences, new messages etc) seem to behave strangely when in full screen mode, often appearing under the main window and requiring a click on the relevant task bar item to get them to show.

After a bit of searching on the web I managed to find a bug entry on the Ubuntu's Launchpad Bugtracker confirming that I wasn't alone. Various Linux installs I've used in the past have allowed me to push "Alt-F11" to toggle  full screen mode, but that didn't seem to be enabled on my Ubuntu 8.04 install.

Figuring that it was an issue that could probably be solved by playing with some window manager settings, I went poking about in the CompizConfig Settings Manager. I found some interesting shortcut configurations under "Window Management > Extra WM Actions", one of them being a shortcut to "Toggle Fullscreen", which was disabled.

Compiz Window Settings

In about two seconds I had set this up to use the familiar "Alt-F11". I then tried it out on Thunderbird and my problem was solved. No more forced full screen mode. Now I could drag that little window around to my heart's content! Even better, I could now jump in and out of full screen mode for any application I wanted. I'm going to have to do a bit more digging in the Compiz settings to see what other useful features I can find.

28May/080

Evolution at Work

I very rarely see the Gmail front page, as I've usually got an active session kicking around on whatever machine I'm using. This means that I never get to see the Gmail blog updates that they feature on the front page. I'm far too lazy to actually subscribe to the Gmail Blog RSS feed (and I still haven't found a Linux RSS reader I like, so I won't be doing that for a little while), so I usually miss out on all the latest Google Mail related gossip.

Tonight I went to check my mail using Safari on an old Mac laptop we have floating about. It was the first time I'd used this particular account/browser combination to access Gmail, so I was confronted with the login screen.

Seeing as it was already in front of me, I gave the page a quick cursory scan to see if there was anything of interest. I'm glad I did, because I noticed the latest Gmail blog entry, which was centred around Gmail's IMAP support I must have seriously missed the boat on that one, because I didn't even notice that Gmail supported IMAP.

I set about trying to configure a mail client on Linux to work with this new-found IMAP goodness. I already had two clients installed; Evolution, the default Gnome email client, and Thunderbird, from the same guys who make the little browser that could, so I was determined to pick one of those, at least in the short term.

I'd used Evolution way back in 2002 when it was the only linux mail client that could connect to Exchange, so I thought I'd give it a go first up. Gmail uses a few funny ports for SMTP and IMAP, so I grabbed those settings from the IMAP client configuration page. They haven't made a specific page for Evolution, so I just picked "Other" and away I went.

Initially everything went great. All of my mail came down, and the test messages I sent to some of my other email accounts worked fine. Great! I was all but ready to mark this one off as a job well done. There was one little problem, though: whenever I tried to reply to a message, i got a nasty error message telling me:


Error while performing operation. Host lookup failed: myemailaddress: Name or service not known

Hmm. Just to make sure that there were no whacky Evolution settings to consider, I went and grabbed an Evolution specific tutorial. No luck. I even tried switching to my ISP's SMTP server. Still no luck.

Thunderbird's icon was calling me from the launch panel, so I thought I'd give that a go to see if it suffered from the same problem as Evolution. Google have made a specific guide on configuring Gmail IMAP for Thunderbird, so to avoid complications I followed it word for word. I wasn't going to risk some silly configuration mistake getting in the way of my inexplicable need for a thick client email solution.

It took around 20 seconds to have the entire account configured. I got all my mail, sent some test messages (both new compositions and replies to other messages), and it all just worked. Amazing.

So in the end, it looks like Thunderbird won by default. I could go back and try to fix Evolution, but I honestly can't be bothered. I'll give Thunderbird a go for a few weeks and see how I like it. I may even mode back to using the Gmail browser-based client. Or maybe I'll just start answering all my email via the Gmail Mobile client. Then I'd be able to fulfill my lifelong dream of developing  horrible thumb-based RSI from excessive predictive texting.

Edit: Looks like I spoke too soon. I'm currently having fun with this bug. After doing a GTK update last night, Thunderbird has been stuck in full screen mode. Oh well, I didn't move to Linux because it was easy!

24May/082

Chasing the Heron – Part 1

My Ubuntu box has actually been up and running since late last year, but I haven't starting using it as my primary desktop until recently. In its previous life it was a file server, subversion repository and web server. It started off as a 7.10 Gutsy Gibbon install, but I recently upgraded to 8.04 Hardy Heron just in time for my big migration.

I had never had much luck with networking on the machine. The wireless network dropped out when I put any decent sort of traffic through it. I would still have a signal, but would be unable to send or receive any packets. This wasn't a major issue when the box was sitting under a desk only being used to serve up files via ethernet, but as soon as I started taxing the wireless card, which I use for all internet traffic, it would start to flake out. I would only get around 45 minutes of usable internet access and then I'd either have to reboot or start playing with ifup/ifdown for 30 minutes, hoping that something would breathe life back into the connection.

Unhappy with the situation, I decided to do some digging and came up with a list of problems people were having with dodgy wireless cards. Some of the symptoms were remarkably similar to those I was experiencing, which at the very least told me that I wasn't alone.

Some posts suggested that there was a problem with the networking components of the OS itself, and made suggestions such as running DHCP manually. I tried every potential solution I could get my hands on, including replacing the default wireless network management software with the same handy KDE utility that my EEE PC uses, but to no avail.

Having had no luck with the OS side of things, I started to look for issues specific to my wireless chipset. Using lspci, a utility that lists information about PCI devices, I was able to find the chipset used by the onboard wireless card on my ASUS P5K-E motherboard. After adding this number to my google query I quickly discovered that there was a flaw with the wireless driver needed by my wireless card. This meant that I was not going to get it working properly, short of rewriting the driver.

Figuring that I wasn't going to get anywhere, I thought that I could just cannibalise the wireless card from my Vista box and pop that in. It turns out that there are no native drivers for the card I was trying to use, but NDISwrapper came to the rescue. NDISWrapper lets you use any Windows driver written to take advantage of the Network Device Interface Specification. NDISWrapper was amazingly easy to install and configure with the Windows driver for the wireless card I was trying to use. Then I simply reset my machine, disabled the onboard wireless in the BIOS and let the machine boot normally. My wireless network was picked up straight away by the new card and everything worked like a dream.

One lesson I did learn after all this was to never assume that a piece of hardware will work on Linux. Thankfully, the Ubuntu Community's excellent documentation surrounding wireless networking contains a list of supported wireless cards that should be helpful should I ever choose to put together another box.

19May/080

Linux or Bust

Growing up, I managed to take advantage of my older brother's love of computing to get access to a few different computing platforms at a relatively early age. He's two years older, so I managed to play around with an ORIC and a Commodore 64 before I was 7. Our''80s computing experience was less "green screen" and more "16 colour TV screen".

For the majority of the '90s we had an Amiga 1200 that looked like it had been on Pimp My Ride. It had, amongst other things, a 50Mhz 68030 expansion card with 16 meg of Fast RAM, a 2.5 gig hard drive and a SCSI CD-ROM. Kickin'! This machine was powerful enough, and Amiga OS was cool enough, that we managed to avoid having a Windows box at home until 1998. We only picked one up after 3D video cards became standard, as they enabled Wintel boxes to finally start making games that could beat Super Stardust in the looks department. The fact that all of our University software ran on Windows helped inform the decision just a little, too.

This early avoidance of the Wintel market instilled a love of "underdog" computing platforms in me. Unfortunately this love has not previously resulted in me shifting away from Windows as my main home computing platform. I seemed to always have at least one machine running an alternative operation system, be it Linux, Mac OS, or even Amiga OS via WinUAE, but my primary machine has always been a Windows box.

My day job used to give me an avenue for exploring the "other side" of computing, as I worked in a fairly heterogenous environment with no preconceptions about what platform an application should run on. Choosing "the best tool for the job" was encouraged, so I got to play with some cool stuff. I would create applications in everything from PHP to C# to C++ to Java, all on a variety of different platforms. I can even remember running Redhat 8.0 for 6 months on my work laptop way back in 2002. Sure, I ended up doing a lot of stuff with remote desktop to some Windows development boxes running Visual Studio, but I got by.

Eventually my work drifted firmly into the Microsoft camp, and I swapped platform independence for the world of .Net/MS SQL Server based enterprise application.

After using Windows all day at work, I'd come home and use Windows on my personal machines. Home started to remind me a bit too much of work, and quite frankly I missed the whole "underdog" vibe I got from using a non-mainstream computing platform. So I did what any sensible person would do; I purchased enough components to build a quad core box with 4 gigs of ram and put Ubuntu on it.

Traditionally I would have installed Linux on an old machine and bought a new one for my windows desktop, but seeing as I planned on making Ubuntu the centrepiece of my home use I thought I'd better act like I meant it.

The switch was no where near as bad as I thought it would be. I managed to find replacements for most of the common software that I was used to on Vista, although I'm still very much in the evaluation phase for a lot of them. The important thing is that I was able to continue working in much the same manner as I did before, minus the chance of insane due to repeated exposure to the Windows login sound.

The operating system wasn't the only thing that was getting me down. I really wanted to do something that wasn't C# when I got home; I wanted to get back into dynamic languages and C/C++.

I had looked at doing Win32 C/C++, but there's just too much other junk getting in the way. I'm sure creating typedefs for everything under the sun does a great job of decoupling the code from the underlying type system, but it sure doesn't make for readable code. Plus there's the proliferation of double underscores. I HATE double underscores. There seems to be a lower barrier of entry to cutting useful C/C++ on Linux environments, especially if you're just looking at command line applications. gcc and glibc tend to "just work" in the most uncomplicated fashion possible.

Speaking of gcc, the fact that it supports so many languages is quite simply amazing. If the urge took me I could start cranking out ADA code again. Any ECU computer science students who did any part of their course in the previous century will know what I'm talking about. If it's good enough for the US Military then it's good enough for me.

If you want to do any dynamic language development then Linux seems to be where it's at, too. I'm primarily interested in Python and Ruby at the moment, although I wouldn't mind checking out PHP 5. I last looked at PHP in 2005 when the majority of hosts still had PHP 4.x installed, but the improvements in the OO features look really interesting. I remember writing an Active Record implementation in PHP 4.x, which seemed push it's OO capabilities to the limit.

Finding an equivalent web browser was a no brainer. I'm a Firefox user on all platforms. Ubuntu 8.04, the version I'm currently running after running through the painless update process from 7.10, even comes with Firefox 3 beta 4 installed by default. Whether or not this is a good idea remains to be seen. The default browser and the controversy surrounding the PulseAudio sound server have certainly made 8.04 an interesting release. I'm not a big user of Firefox extensions, so I seem to be avoiding most of the issues surrounding version 3.

IRC plays a rather large part in my computing life. It seems to have turned into the event organisation hub for most of my closest friends, so without it I'd probably have a much larger phone bill. I've always been a big fan of mIRC on Windows, but I've also been an XChat user since we bought our first Mac back in 2005. I've continued using XChat on Linux, and have been pretty happy so far. There are a few niggling issues, (such as having the specifiy the # when joining a channel, e.g. /join #mychannel as opposied to /join mychannel), but it's been a good experience overall. I haven't tried to create any scripts for it yet, but I'm sure it's Python interface must be better than the horrid "language" used my mIRC.

I used Picasa on Vista for photo management. I'm not a big retoucher, I just like to browse my photo libraries using a decent UI. There's a version of Picasa for Linux, but that's basically the Windows client running under WINE, which I'm not so keen on. I also took a look at DigiKam and F-Spot, finally settling on the DigiKam because my 5 year old was able to navigate our photo collection using it. This was a BIG plus for me. It's pretty cute seeing her flicking through old photos with her little brother on her lap.

I use GarageBand on an old G4 iBook and a souped up G4 PowerMac that I have lying around. The closest thing I can find to that on the Linux side is Audacity. I've used this on Windows before, so I was not expecting the world. I do have a POD 2.0 now, so real time amp modelling is less important to me than it used to be, so hopefully I can get something decent sounding out of it.

I never got into the whole "music management" software on Vista. I had iTunes installed, but I only seemed to use it for podcasts. I had taken to using Winamp or Media Player and just using my well organised file system to sort through my music. I decided to give Amarok a go on the Linux side, just to see if I had a use for a searchable music tool. The only problem I've run into here is that Amarok has trouble scanning a few files in my music repository. I've got a feeling that the problem is being caused by some MP3s I made using iTunes that came from GarageBand songs I'd created. Apparently iTunes doesn't "play nice" with it's MP3s. Regardless, the Amarok scan process isn't 100% working for me yet, so I have yet to experience the wonders of a fully searchable music library. Maybe when I get time to sort out the dodgy files I'll have the epiphany about my music collection that has been promised, but I'll reserve my judgement until then.

I'm a big fan of Outlook 2007. I use it at work, and I had it installed on my Vista machine. I use Gmail for all my mail, and I traditionally POPped it onto my Vista box (leaving a copy on the server so I could still read my mail on my N95 using the Gmail Mobile Client) and read my mail via Outlook. The logical thing for me to do would be to migrate all my mail to Evolution on the Linux machine, but I haven't done that yet. I've actually been giving the GMail web client a go. Conversation based email is certainly an interesting way of approaching correspondance, and the GMail Notifier certainly makes life easier. My PST may yet be migrated over to Evolution, but I'll give the web client some time to grow on me before attempting that.

I thought that the move to Linux would bring an inevitable move to OpenOffice , then I realised that I just don't use word processing and spreadsheet applications all that much at home. Probably the only time I'd fire up Word or Excel would be to make changes to documents from work, as I don't tend to create personal documentation using an office suite.

I've promised myself that I'll learn TeX, at the very least start using LyX to create TeX documents. I've always hated the style system of Microsoft Word (one of my pet peeves is the use of straight formatting in a Word document without the use of styles. Another is the odd situation where you can't make a particular style apply to a specific area of text in Word because it's confused as to where previous styles finish), especially compared to HTML/CSS, and TeX seems to offer a similar level of style/content seperatation. It remains to be seen whether or not I start producing documentation in this way, but it does feel wrong to make the shift to Linux and not at least try to use Don Knuth's labour of love.

Visual Studio has been replaced by KDevelop for C/C++ and Komodo Edit for Python, Ruby and PHP. Interestingly, ActiveState, the company that makes Komodo Edit and Komodo IDE, have created an open source effort around Komodo Edit called OpenKomodo. I haven't had a chance to check it out yet, but it's definately on my radar. I've also got Eclipse on there for checking out Java code. I gave the C++ features of Eclipse a go, but in the end I found KDevelop to be vastly superior.

I was already using Subversion for source control, primarily with TortoiseSVN and AnkhSVN under Vista, so I've continued that practice on Linux. Considering I'm not doing any distributed development I've yet to jump on the Git bandwagon, no matter what Linus says. KDevelop integrates nicely with Subversion, and I'm using RapidSVN for general operations.

To be honest, I had delusions of granduer when approaching this project. I was all set to go back to non-IDE text editors, and was even planning on making the switch from my traditional text editor of choice, VIM, to Emacs. I even read most of the Emacs LISP manual in preparation, but the stories of RSI scared me off. Perhaps I was temporarily insane, but the concept did seem pretty attractive at the time. I'm still using VIM wherever I can, but I haven't gone so far as to start building an IDE out of it. Most of my actual coding gets done in one of the afformentioned IDEs.

Traditionally I've used Rational Rose, Sparx's excellent Enterprise Architect or even Visio for UML modelling. The closest thing I could find for Linux was a product called Umbrello. Despite the name, it has nothing to do with the Umbrella Corporation from Resident Evil. I've only just started playing with this, but it looks promising. I'm currently modeling a small project using it, so I should know how good it is soon enough. I don't expect to have the traceability features of Enterprise Architect, but then what does? The Sparx product is one of those "great if everyone on the project is using it" tools that, if you stick to a certain methodology, give you some really cool results. I don't think I'll be needing anything of that scale for home projects, so hopefully Umbrello will suffice.

For image editing on Vista I had been using the excellent, and free, Paint.Net. The most obvious Linux equivalent is The GIMP. I've tried to use it before, but that was on Windows, where the GTK implementation doesn't exactly blend in with the native OS. The application menus are especially horrible to use, which is one of the reasons why I've never switched to Open Office on Vista. I've found that the application is much nicer to use on Linux where the widgets are native. Still, it's no Paint.Net. I'm still hoping that it will grow on me

I know that others have spoken highly of Paint.Net, but I cannot stress this enough: If you are running Windows and do anything with images then you need Paint.Net. Get it. Now!

After all this I still have VirtualBox running a Windows Server 2008 instance in seamless mode on one of my desktops. The good folks at Microsoft were kind enough to give me two enterprise licenses at the recent Heroes Happen event, so I thought that I'd put one of them to good use. I've got Visual Studio 2008 on there just in case the need hits me.

I honestly cannot heap enough praise on VirtualBox. For starters, the default packages just work with 64 bit Ubuntu, unlike VMWare. The UI is intuitive, and the seamless mode is great. The fact that it's cross platform means that I can now use the same virtual machines on my Linux, Vista and OSX boxes, which is also an amazing feature.

One thing I've noticed is that a lot of the applications I've started using have been KDE native applications. I'm running KDE on my EEE PC, but my main desktop Ubunutu machine uses GNOME by default. I've never gotten into the whole GNOME vs KDE argument, and always tend to use whatever is installed on the system I'm using. Perhaps if choosing a windowing environment dictated the software I could install (e.g. if you couldn't run KDE applications on GNOME) then I'd put a lot more thought into it, but as it stands I really don't care enough to look into it. GNOME seems to just work, as does KDE. I'm not going to let something like the default menu or control panel stop me from enjoying my PC.

My experience in "switching" certainly hasn't been smooth sailing. In fact, several issues, such as multi monitor support, had me tearing my hair out. I've had so many issues that I could fill several posts alone just with those tales. But at the end of the day the experience of making the switch and using something which is totally outside the realm of what I do at work makes all the lengthy forum post reading sessions worth it.

   
Sharing Buttons by Linksku