TechCentral

Tuesday December 11, 2007

Tweaking Ubuntu

By TAN KIT HOONG



Installing and configuring a Linux operating system like Ubuntu can be challenging. We show you how to get started the easy way.

I FINALLY decided to give Linux a spin after years of listening to Linux supporters extol the virtues of the open source operating system.

The opportunity came around when a friend who’s on a strict budget asked me to find him a second-hand computer and by chance I actually had an old machine lying around for him to use till he could afford his own.

Why not Windows XP? Well, the main reason is that this machine is a pretty old one, and only had a 450MHz Intel Pentium III processor and 256MB RAM.

In this case, Linux is a relatively good choice as it runs well even on very old machines and is also relatively more secure than a Windows-based PC for people who don’t know (or can’t be bothered) to install and maintain the battery of antivirus and anti-spam applications to keep a Windows XP machine safe.

As a virtual novice in the Linux world, I decided to download and try out the latest version of the popular Ubuntu, now in version 7.10, which is codenamed, rather amusingly, Gutsy Gibbon.

I’m not sure what the name really means, but my interpretation is that you’d have to have a lot of guts and no small measure of single-minded pig-headedness to install a Linux distribution.

We at In.Tech once had a reader write in to ask us to feature more stories on Linux and he made an observation that though there were little or no games for the platform, that the “OS is the game” – well, if so, it certainly wasn’t a very enjoyable game as I had to learn all kinds of arcane terminal commands just to get Ubuntu to do simple things I’d taken for granted with Windows.

That’s not to say that the operating system is bad, mind you, it’s just that it still has certain issues that hold it back from being a truly problem-free operating system to install and run.

For example, I tried running the Ubuntu LiveCD, which allows you to run Linux on your machine without actually having to install anything, and I had problems on four of the machines I tried it on.

Each machine I tried had one or two issues related to hardware.

One had a USB WiFi dongle which wasn’t properly supported by Ubuntu; the second machine had an integrated ATI-based graphics which caused Ubuntu’s bottom toolbar to display right in the middle of the screen; another machine couldn’t see my Promise-BIOS based RAID SATA drive; and the last machine couldn’t display properly on my 24in monitor at native resolution.

To be fair, most of these problems were resolved once you install the operating system, and update the machine via the Update Manager.

Before you think that this is a Linux-bashing article from a Windows user, I have to say that it is not – in fact, Ubuntu 7.10 is a very nice operating system to use and not only looks attractive, but once set up properly, it’ll run very well on older machines with an interface that is pretty easy to understand.

The intent of this article then is to help stout-hearted users willing to take the plunge and try out Linux to get the most out of it – for example, to play DVDs, or to connect to the Internet, or simply to put a Trashcan on your desktop, all of which, believe it or not, is not as simple as it is on Windows.

Installation: A non-issue
Ubuntu is freely available for download at www.ubuntu.com and comes as a roughly 650MB ISO file that you can just burn on a CD-R and start using straight away.

The current version is Ubuntu 7.10 and there are versions for 64-bit processors (like AMD Athlon 64 and Intel Core 2 Duo processors) as well as older 32-bit based ones – just download the appropriate version for your hardware, burn it on a CD-R and you’re ready to go.

Installation is a breeze – like Windows, you can just pop the Ubuntu CD into your CD-ROM drive and boot up with it and you can actually run the operating system from the LiveCD itself to try first and see if it will properly recognise your hardware (or at least the important bits of your hardware).

In fact, you should test it out extensively with the LiveCD first to make sure that at the very least, Ubuntu recognises your networking hardware and you can connect to the Internet.

To be able to connect to the Net is by far the most important thing because without a connection to the Net, it’s very difficult to fix or update Ubuntu to fix any problems.

Ubuntu will recognise, most if not all wired Ethernet connections and this is the best way to go –wireless 802.11b/g WiFi PCI cards are not always recognised and even less so for WiFi USB dongles.

If you have a router that automatically logs in to your ADSL (Streamyx) account, then you should have no problems at all.

If you only have an ADSL modem and you used to use your PC to login and connect to your Streamyx account, then read below.

Once you’re satisfied that your Internet connection works, you can just double-click on the Install Ubuntu icon on the desktop and Ubuntu will start the install process for you – it’s pretty easy and Ubuntu will even give you the option for partitioning and/or dual booting if you still want to keep your Windows installation.

For me, installation was a real no-brainer and in about 30 to 45 minutes, Ubuntu will be up and running.

Oh yes, for complete Linux newbies, it’s good to mention here that Linux requires you to input a username and password to login and the same password to make changes that will affect the system, so it’s pretty important to put in a password that you can remember.

Connecting to PPPoE
Possibly the weirdest ommission in Ubuntu is the lack of a PPPoE miniport application which allows you to connect your PC directly to an ADSL modem and use the PC to negotiate the PPPoE logon.

Yes, these things are simple to do on Windows XP but it’s seriously NOT easy to do in Ubuntu – at least not obviously so.

To create a little auto-logon script for your Streamyx connection in Ubuntu, you really have to open the Terminal window by going into Applications/Accessories/Terminal.

Next, type “sudo pppoeconf” (without quotation marks, of course) – a sort of text-based wizard will open up allowing you to enter your Streamyx username and password.

Enter those and hit Yes for every option that comes along and if everything goes well, then it should connect to your modem and perform the appropriate login to your Streamyx account.

However, if it doesn’t connect, then you should consider at least borrowing or using an ADSL router to do the login for you.

Enabling repositories
Before you begin doing anything in Ubuntu, it’s best to enable more repositories in the Ubuntu distribution system.

Repositories are where all the free software and drivers are stored and managed online by the Linux community.

By default Ubuntu has only the main repository enabled, but you really want to be able to choose from a few more, especially the restricted repository which contains drivers and other software not considered strictly “open source” although they may be free.

To enable repositories, go to System/Administration/Software Sources and check any repositories you think you may need – you can check nearly all of them (main, universe, restricted, multiverse) although you probably don’t need to check the sources repository as it’s mainly for developers only.

You can also add in third party repositories which are popular but not directly affiliated with Ubuntu for even more choices – for example, try adding Medibuntu.

Third-party repositories are great but do be aware that third party repositories should be added at your own risk – while most are great there are a few which could mess up your system.

For example, you might want to add Medibuntu, a popular third-party repository not affiliated with Ubuntu but is the software source for most of the important third party applications such as Firefox, Skype and the DVD decoder for playing DVDs.

To add Medibuntu, go to System/Administration/Software Sources/Third-party software/ Add then add the name of your repository in the “APT line” field:

deb http://packages.medibun tu.org/ gutsy free non-free

Unfortunately, you will now have to open a Terminal window (the Linux version of a Command Prompt or DOS window) to download the required GPG keys to verify the repository to your system.

To open a Terminal window, go to Applications/Accessories/Terminal which will then open a window.

To download the Medibuntu GPG keys, type this into the Terminal exactly as shown, spaces and all:

wget -q http://packages.medibun tu.org/medibuntu-key.gpg -O- sudo apt-key add - && sudo apt-get update

Once you do this, you will have a large selection of drivers and software available to you for use and download should you need to.

Graphics drivers and visual enhancements
The advantage of using Ubuntu is that it has an automatic Update Manager that will prompt you when you have updates to your system, much like a Windows machine.

For example, once you enable the Restricted Drivers, you will probably get a little notification icon on the top toolbar to update your graphics card drivers to the restricted driver version.

You should do this as the restricted drivers are usually better than the basic drivers that come with the Ubuntu CD.

Now, if you have a new machine with at least a mid-range graphics processor, you might want to enable some advanced visual enhancements, which Ubuntu calls Compiz Fusion.

There are actually quite a number of interesting effects in Ubuntu 7.10 that you can enable, such as an effect called Wobbly Windows (quite self-explanatory) or even fire effects which look pretty cool.

To enable desktop effects, turn them on by navigating to System > Preferences > Appearance.

Under the tab Visual Effects you’ll find three settings: None, Normal and Extra. To turn Compiz on, choose either Normal or Extra.

If you want to customise your Compiz options and plugins, such as animations and the Desktop Cube effect, first install the configuration tool by going to System/ Administration/ Synaptic Package Manager and use the search tool to find a file called “compiz-config-settings-manager” and install it.

This should give you more control over the visual effects customisation options.

By the way, the Synaptic Package Manager might be something new to you if you’re a Windows user – the Package Manager is like Windows Update on drugs.

Not only can you find updates to the operating system and built-in software here, but this is also the place where you can have access to hundreds of free applications available based on the software sources you’ve added to your system.

Once the Synaptic Package Manager has downloaded and installed the application, you should be able to find it in System/Preferences/Advanced Desktop Effects Settings – just check or uncheck whatever effects you want.

Enabling desktop icons
If you’re moving to Ubuntu from Windows, you might have noticed that the Trashcan icon is now a teeny-tiny icon on the bottom toolbar of Ubuntu.

Now I don’t know about you, but I prefer a larger Trashcan icon so it’s easier to “hit” the target when you’re dragging files and folders to be deleted into the Trashcan.

Well, there is a way to enable desktop icons – all you have to do is go to Applications/System Tools/Configuration Editor and then on the left-hand pane, navigate to apps/nautilus/desktop.

On the right-hand pane, you should be able to see a number of options with check boxes next to them which will allow you to enable the icons for the Trashcan, Network and Computer if you want to.

Check whatever you want and then close the Configuration Editor and you should see the options you selected appear on the desktop.

Next, if you want, you can remove the Trashcan on the bottom toolbar by right-clicking on the trash icon and choosing “Remove from panel.”

By the way, if for some reason you don’t see the Configuration Editor in the System Tools menu, you can look for it and install it using the Synaptic Package Manager.

Playing DVDs and other video files
One of the most surprising (and not to mention irritating) things about Ubuntu 7.10 is that due to DVD licensing issues, DVD playback is not supported out of the box.

Though certainly not the fault of the Ubuntu developers, not being able to simply pop in a DVD into your DVD drive and have it play a DVD is going to put off most people.

Luckily there are ways to be able to do this. First off, you should just uninstall the default basic Totem player that comes with Ubuntu and install the Totem Movie Player from the Synaptic Package Manager – look for a file called “totem-xine” and install that.

Support for Windows Media Video, RealMedia and other formats has been bundled into the w32codecs package. This package is not available from the Ubuntu repositories due to licensing and legal restrictions.

However, if you’ve already added Medibuntu as a repository source earlier, then all you have to do is open a Terminal window by going to Applications/Accessories/ Terminal and typing this:

sudo apt-get update

Once the update is complete, you can install the codecs with this command:

sudo apt-get install w32codecs libdvdcss2

To make even more sure, try installing one more thing by typing this into the Terminal:

sudo apt-get install libdvdread3

sudo /usr/share/doc/libdvdread3 /install-css.sh

After installing those codecs you should be able to play most of the popular video formats and best of all, you should be able to pop a DVD movie into the DVD-ROM drive and have the movie playing automatically.

Updating Firefox
Firefox is the default web browser that comes with Ubuntu, and while Ubuntu itself does periodically update the browser via the Update Manager, these updates often don’t come out as fast as Mozilla releases a Firefox update.

However, unlike in Windows versions, Firefox doesn’t update itself and the option to “check for updates” in the Help menu is greyed-out.

To update Firefox to the latest version, make sure all Firefox windows are closed, then open a Terminal window and type in:

gksudo firefox &

This command opens Firefox in administrator mode and when you click on the Help menu of Firefox, you will notice that the “check for updates” option is no longer greyed-out and you can click it to update the browser.

Enabling NUMLock
After installing Ubuntu 7.10 you may have noticed the NumLock is always off by default.

While this is a minor issue, this can be pretty irritating especially if your logon password consists of a series of numbers, and you are used to typing via the dedicated number keys on the right of your keyboard.

So you go looking into System/Preferences/Keyboard to look for the setting to enable NumLock by default, right? Wrong!

For some strange reason, the NumLock in Ubuntu and most Linux distributions is off and there is no easy way to turn it on by default.

Instead, what you have to do is open the Synaptic Package Manager, then use the Search button to look for an application called “numlockx” – select it then hit Apply to install the package.

However, the work doesn’t end there. Next, you need to get it to work for you and for Numlockx, there are no menus or settings you can get to.

Instead, open up a Terminal window from Applications/ Accessories/ Terminal and then type in the following “sudo gedit” (without the quotation marks) and enter your administrator password when prompted.

When you do this, the gedit window will open – this is the text editor you will need to edit what you want to enable numlock.

In gedit, click on the Open icon, then enter this into the Location field:” /etc/gdm/Init/Default” (without the quotation marks).

Once the file is open in gedit, look for a line that says, “exit 0” and above this line add these lines exactly:

if [ -x /usr/bin/numlockx ]; then

/usr/bin/numlockx on

fi

Once done, save the file and close gedit. Next time you reboot your machine, you should have the NumLock on by default.

  • E-mail this story
  • Print this story