Monday, 14 May 2007

Ubuntu: Ruby on Rails

OK-for most people this will be irrelevant. Anyway if like me you have dabbled with Ruby on Rails you might have been disappointed to find that there is little support for Linux users looking to install it. This is probably because most people assume Linux users are perfectly capable of working it out for themselves (which in most cases they are).

Still I'm a Linux user and I am in the process of learning Ruby so I've done a quick search to find the best online install guide for RoR.

You can find it at:

If you too are learning Ruby let me know how you got on.

Sunday, 13 May 2007

Ubuntu: Setting up Amarok, a decent media player

So it's time to get Ubuntu playing me some music. Aside from browsing the web the main function my lap top serves is media player.

First of all I need to get all my old I-Tunes files off the 3 dvd's currently housing them.

After consideration I set my music folder up in the home folder (this is really the only place you can put it). Setting up the folder is a matter of navigating to my home folder and clicking new folder. Pretty frikkin easy.

Because i-tunes stores files as MP4s I'm going to need to make sure I have all the right codecs (things that let you play media).

Now add/remove won't let you get them because in some regions downloading these codecs might be illegal. So you need to get hold of an incredible application called: Automatix

This can be downloaded here.

Open it with whatever comes up as the default when you click on the link.

You open Automatix in Applications>System tools

Please note that you must not run Synaptic at the same time as Automatix (just make sure that you have not opened Add/Remove).

Click on Codecs and Plugins select all of them (unless there is a legal issue in your area) then click Start.

Go have a coffee or a smoke because this may take a couple of minutes.

I had to agree to at least one window and got a 'fatal error' regarding some swiftfox plugins I didn't have. Since my computer is still running I wont let this stop me and am going to go ahead and get Amarok.

Amarok can be got through Accessories>Add/Remove. Ensure that you have selected to Show: All available applications.

Simply search for Amarok tick it and then click OK then apply etc.

Amarok will then be available in Application>Sound & Video.

When you first launch it will ask what files your music is in. Choose the appropriate folder. It will ask about configuring an SQL database. I have used SQL but it's late and I'm not sure how SQL works on Ubuntu so I used the default sql lite option which sets Amarok to thinking and then BLAM my music player works.

UPDATE: The i-Tunes files that I bought from the store are not currently work, presumably because there is now no evidence I actually bought them-will let you know how I resolve this (if I do resolve it).

Why is Amarok so good-well I'll post more as I get used to it but it looks nice, supports multiple formats, works with I-Pods (allegedly) and pulls tonnes of information about the music you love.

This was a pretty painless install for me so obviously my relationship with Ubuntu is beginning to improve.

Thats it for tonight-tomt

A week on Ubuntu

It's now been a week on Ubuntu for me.

First off. Ubuntu does not work off the CD. Or it does but not as well as it should. I had real problems on my vaio getting wireless and wide-screen working.

Although I was able to resolve these problems the solution was far from easy for someone with no knowledge of Linux. The difficulty arises from the fact that all Ubuntu support either assumes that Ubuntu works perfectly for everyone because it is such a fantastic OS (which it is) or is written for and by Linux geeks (this is an honorific) who do not realise that some of us have never seen a terminal.

Despite all this I love Ubuntu. I don't know precisely why. I think the community is fantastic, the fact that add/remove puts a whole host of applications at your fingertips instantly.

The biggest part of my new found love for the system is the difficulty in using it. Under windows a wireless connection never made me jump up in the air screaming like a little girl, seeing wide-screen didn't prompt cheers of victory.

The fact is that all relatively intelligent computer users should know what the command line is, should understand the commands and structures that make their computer work. Ubuntu and the community that back it up make this learning process possible.

A week on I've resolved all my teething problems (although world domination has not yet been realised).

For the next week I'm focused on:

1. Getting some decent media playing capability
2. Find some decent blogging tools for Ubuntu
3. Customise my desktop with some handy productivity apps.

Later peeps.

Ubuntu: Enabling wireless on Vaio

Having set up widescreen my next challenge is to set up wireless.

The problem: I can see wireless networks but just can't connect to them.

Disclaimer: I know nothing about Ubuntu, Linux or networking. My approach to these problems is to keep "messing" up until eventually something works (hence F-U buntu). I'm using a Vaio. Follow my advice at your own peril.

Again I start by opening the terminal. Applications>Accessories>Terminal

I then ran the command "lspci" to find out what my computer is running on. You get a long list of nonsense. Right at the bottom you should see something like:

06:04.0 Network controller:

Followed by your network card. Which in my case is:

Intel Corporation PRO/Wireless 2200BG Network Connection

If you can't find it try looking right at the bottom of the list that is generated. If it still is not showing up than ubuntu probably isn't even detecting your wireless card and I'm not sure how your accessing this site at all, but I can't help you.

If you have a different card I don't know whether the following will help you at all. I suggest you try if you like, otherwise do a google search with the name of your card and Ubuntu. Good luck.

Right that should have got rid of everyone with no hope of ever accessing wireless again. Time for the fix.

We need to make sure we have all the tools we need. So in the terminal command ubuntu to go fetch them. First with:

"sudo apt-get install wpasupplicant"

and then:

"sudo apt-get install network-manager-gnome network-manager"

If you are running a recently installed version of Ubuntu feisty you should probably have these but it does not hurt to check ;)

Next we are going to use the gedit command (this is the one that tells Ubuntu to disregard it's better judgement and let you mess with an important file) to change our network interfaces.

As a rule I backup any document that has to be opened with gedit (afterall if Ubuntu thinks it's a bad idea for you to open it, it is probably important and fragile) I have a folder entitled 'Things I might have broken' in my Home folder where I save these.

Create a similar folder then in the terminal input:

"sudo gedit /etc/network/interfaces"

Save this file as xxxbackup into your 'Things I might have broken' folder. Close and then run "sudo gedit /etc/network/interfaces" again.

The file that pops up will contain some couplets (pairs of lines) saying auto lo, auto eth0 or similar.

Put a # next to every line apart from:
auto lo
iface lo inet loopback

The # symbol basically tells Ubuntu to ignore the line-its referred to as commenting because geeky hackers can whack stuff in their code using the # symbol for other geeky hackers to read.

I have no idea why you comment the majority of this document. The tutorial told me to and if you can explain the logic please leave a comment below. Regardless the interfaces document should now look something like this:

auto lo
iface lo inet loopback

#auto eth0
#iface eth0 inet dhcp

#auto eth2
#iface eth2 inet dhcp

#auto ath0
#iface ath0 inet dhcp

#auto wlan0
#iface wlan0 inet dhcp

Save the file and close. (Do not alter the title of this file).

Now for the more involved bit-open Applications>Accessories>Text Editor (do not use open office!)

Input the following:


Then save it to your home folder with the title "wpasupplicant"

Next we are going to use a "sudo" command to give Ubuntu a kick up the backside and force it to move the file to where we really want it (the default folder which you can't normally save to).

In the terminal (if you don't know how to open this by now you are lost)..

Input the following command to change the location or path of the document:

"sudo cp /home/wpasupplicant /etc/default"

cp tells it to change the path (or location) of the document
/home/wpasupplicant lets it know the current path
/etc/default lets it know the new path.

Next input the following command-it sounds a little sinister and I have no idea what it does...

"sudo touch /etc/default/wpasupplicant"

(Make sure there is a space between touch and /etc-basic I know but I didn't the first time)

Once this has been done re-start your computer. I had an irrational fear that I wouldn't be able to get back online so I copied all the instructions I was using and saved them to my desktop-those with paranoid leanings might want to do the same.

When you log back in left click the network manager icon in the top right hand corner (you know, the one that looks like two monitors side by side. The one you have clicked about 50 times in futile rage before you found this site).

Select your network from the list. A menu will pop up asking you for your password -ensure you choose the right password type i.e. WEP or HEX (try and look up any info you have from when you first set up your wireless).

It will think for a while and then ask for a password to set up your 'keyring' this is some device that Ubuntu uses to store passwords etc.

Anyway this is all self explanatory and you should now be seeing some blue bars at the top of the screen which mean you are now connected to your wireless network.


I used the following tutorial as a basis for my post-if I have not been able to help you maybe they will.

If you find this useful please let me know a) what helped and b) what system you are using.

Thanks again to everyone who helped me crack this!

Ubuntu: Enabling widescreen on a Vaio

Currently my ubuntu only displays on 1024x768 which is very frustrating.

This post is going to walk through my attempt to resolve the problem.

(I use a Sony Vaio with an intel graphics card. if you don't I have no idea whether this will work for you)

Open Applications>Accessories>Terminal and input the command "lspci" This lists the specs of my system and tells me I'm running an intel graphics card. If you have another card i.e. nvidia this probably wont work.

Input into the terminal: "sudo apt-get install 915resolution" this basically tells Ubuntu you are in charge of the system so run along and get me whatever the hell it is I need to make you work on my whole screen. Beatch.

Still in the terminal tell Ubuntu to list the resolutions it currently has available-with the following: "sudo 915resolution -l" again you are telling Ubuntu that you wear the trousers (with Sudo) and then asking it to list the resolutions it thinks it has available:

Intel 800/900 Series VBIOS Hack : version 0.5.2

Chipset: 915GM
Mode Table Offset: $C0000 + $269
Mode Table Entries: 36

Mode 30 : 640x480, 8 bits/pixel
Mode 32 : 800x600, 8 bits/pixel
Mode 34 : 1024x768, 8 bits/pixel
Mode 38 : 1280x1024, 8 bits/pixel
Mode 3a : 1600x1200, 8 bits/pixel
Mode 3c : 1920x1440, 8 bits/pixel
Mode 41 : 640x480, 16 bits/pixel
Mode 43 : 800x600, 16 bits/pixel
Mode 45 : 1024x768, 16 bits/pixel
Mode 49 : 1280x1024, 16 bits/pixel
Mode 4b : 1600x1200, 16 bits/pixel
Mode 4d : 1920x1440, 16 bits/pixel
Mode 50 : 640x480, 32 bits/pixel
Mode 52 : 800x600, 32 bits/pixel
ModeIntel 800/900 Series VBIOS Hack : version 0.5.2

Chipset: 915GM
BIOS: 54 : 1024x768, 32 bits/pixel
Mode 58 : 1280x1024, 32 bits/pixel
Mode 5a : 1600x1200, 32 bits/pixel
Mode 5c : 1920x1440, 32 bits/pixel
Mode 60 : 1280x770, 8 bits/pixel
Mode 61 : 1280x770, 16 bits/pixel
Mode 62 : 1280x770, 32 bits/pixel
Mode 63 : 1280x800, 8 bits/pixel
Mode 64 : 1280x800, 16 bits/pixel
Mode 65 : 1280x800, 32 bits/pixel

I don't understand any of it. Never the less I'm going to tell Ubuntu to replace mode 3c: Mode 3c : 1920x1440, 8 bits/pixel

With the resolution I want-1280 x 800. Why replace 3c? No idea, thats what the tutorial told me to do.

This is achieved with another 'whose the daddy' command in the terminal:
"sudo 915resolution 3c 1280 800"

With the change made we get Ubuntu to list the available resolutions again using:
"sudo 915resolution -l" and we should see that 3c has changed to meet our spec.

Now we need to test that the change has taken effect...this bit is tricky because you need to open a pseudo terminal (this is a black screen with text only input)

WARNING: When you open the pseudo terminal you wont be able to see this page or anything but the pseudo terminal so note the following instructions down on paper-the first time I tried I hadn't written down the instructions and had to just turn off my lap top : (

Open the pseudo terminal by pressing CTRL+ALT+F1

Input your username and password to login.

Kill all gdm (think this might mean graphic display modes or something) by typing:
"sudo killall gdm"
Then launch the gdm again by typing:
"sudo gdm"

Doing this should bring you out of the pseudo terminal and back to the regular desktop which will appear in Widescreen (if the above has worked). If your anything like me you'll then dance around for a bit and admire your newly honed 'programming' abilities.

At this point you will want to come back to this site to find out how to finish the job-(so save the page)

Now you just need to make sure that Ubuntu remembers this setting everytime you boot. Open the terminal again (applications>accessories>terminal)

"sudo gedit /etc/init.d/"

gedit is a way of telling ubuntu that frankly you don't give a monkeys whether or not it thinks you should be changing this file, you own the computer and you will do what you please.

Anyway once this has run you should get a window of complicated text that seems to dictate what ubuntu does when it boots.

First of all save a back up copy to your desktop just in case you break it. Then close and repeat the Gedit command above. Scroll down until you reach the section:

. /lib/init/"

and input the line:

"915resolution 3c 1280 800"

Note if you cahnged 5c or 38 then obviously use that instead of 3c.

The script should now read something like:

# Provides: bootmisc
# Required-Start: $local_fs hostname $remote_fs
# Required-Stop: $local_fs
# Default-Start: S
# Default-Stop:
# Short-Description: Miscellaneous things to be done during bootup.
# Description:

. /lib/init/

915resolution 3c 1280 800

do_start () {
# If login delaying is enabled then create the flag file
# which prevents logins before startup is complete

Save and close. Then restart Ubuntu and hopefully everything should be working.

If this doesn't work. Try the Ubuntu support irc channel, browse the web a bit more, go back to windows or buy a mac. Sorry I can't help you.

I used the following tutorial to help me solve this problem (though it was written for someone with marginally higher Linux IQ than mine).

Thanks to everyone who helped me crack this.

Saturday, 12 May 2007

Upgarding to Ubuntu and saving files from Windows partition

Initially I had Ubuntu installed on a partition with the safety net of being able to run my old Windows XP OS.

I am now only running Ubuntu. The transition from partition to full hard disk domination was tough.

Although there are all sorts of guides on using Gparted to resize various partitions and squeeze out Windows all of these guides invariably involved -sudo and mount/unmount commands. I may now be a linux user but I'm still a moron so I employed the following solution.

1. Use the file browser to access read only versions of files on window partition
2. Burn them to CD or shove them on a usb.
3. Insert Ubuntu boot CD
4. Turn off computer
5. Turn it back on
6. Boot ubuntu from CD
7. Select install then full disk install
8. Make a coffee
9. Spend an hour or so finding and reinstalling all my old ubuntu apps
10. Pull files off CD's and USB
11. Doubt wisdom of decision when I can't access wireless network

So thats it no more windows for me.

Don't try the above unless you are prepared to permanently lose all your windows apps and files-if you do not own (by own I mean you paid for it) your PC this is not for you.

Installed beryl, urban terror still no wireless :(

In the last day I got beryl working on my desktop.

beryl is basically a very slick desktop manager that allows you to open multiple desktops arranged in cubes and applies many fun effects to your windows. This is certainly something I'll be showing off to all my friends stuck on XP or Vista.

Download Beryl (only available on Linux as far as I know)

Excellent tutorial on using Beryl at ArsGeek

UPDATE: I have now removed Beryl because I needed to reinstall Ubuntu. I didn't put Beryl back principally because it does chew up a lot of resources and I spent most my time flipping round the cube admiring my desktop.

I've been wasting a great deal of time playing Urban Terror-a quake mod that plays like Counter Strike.

Download install files.

To install you need to download both the ioUrbanTerror file and the chunky UrbanTerror file.

Once downloaded extract the io file, then extract the UrbanTerror file to the Linux folder within ioUrbanTerror.

Open the Linux folder in ioUrbanTerror, right click ioUrbanTerror.1386 select properties. In the properties open the permissions tab and check the execute option (see below)

This done you will be able to launch the game! Prepare to get pwned.

Unfortunately my wireless connection is still not working :(. This is the one aspect of Ubuntu I am hating. Having been used to easy wireless anywhere being stuck plugged into the router is pretty frustrating.