Friday, 30 April 2010

Ubuntu 10.04 - Ambiance or Radiance?

Released yesterday, Ubuntu 10.04 comes with a stylish new look. Brown is no more!

The default theme called Ambiance is a stylish black theme whilst another optional theme available to choose is the new Radiance theme.

Ambiance, Ubuntu's new stylish black theme!



Radiance, Ubuntu's new stylish white theme!



Click on the pictures for a bigger view.

If you only hated Ubuntu because of its brownish look, what excuse do you have now?

Tuesday, 27 April 2010

Samsung Jet - Not smarter than a smart phone!

Marketed as smarter than a smart phone, the Samung Jet has to be one of Samsung's biggest flops of all time.

The hardware in this nice looking handset is excellent but it is crippled by the extremely poor operating system and support from Samsung.

  • There are no additional widgets / applications to download
  • Official firmware support is non existent
  • The Exchange sync software doesn't work with gmail
  • No text smiley's
  • Can't copy/paste text
  • GPS drains the battery
  • Java support is poor
  • Motion gate is useless
  • USB data connection charges the battery and can't be disabled
  • Memo's limited to 100 characters
  • The phone is buggy

And more....

There are also many unhappy Jet owners, http://forumuk.samsungmobile.com/ForumThreads.aspx?ForumID=136

Me included, hence the Nokia ads throughout this blog.

What has this got to do with Linux?

Well some good people are currently working on porting Google Android to this cool looking phone which will definitely make it one seriously smart phone!

http://code.google.com/p/jetdroid/

At least the Jet can take decent photos.

Beware of the Troll, he lerks on many forums. Hang on, that's the same guy who sold me the Jet!

Ubuntu 10.04 LTS - Release date 29th April 2010

So far screenshots look very promising, no more brown. Ubuntu is a very popular distribution and every release brings many improvments.

Will this be the distribution to make me drop OpenSUSE?


Ubuntu: For Desktops, Servers, Netbooks and in the cloud


http://www.ubuntu.com/getubuntu/releasenotes/1004overview

Thursday, 22 April 2010

Better looking fonts in OpenSUSE 11.2 KDE 4.x

You may be thinking the default fonts used by OpenSUSE in KDE are quite good already but it can be slightly better.

All you have to do is change the default fonts to the Liberation font set to experience slightly better looking text within your desktop environment.

Go to KDE System settings > Appearance > Fonts

System Settings - Fonts


Simply match the fonts in the above screenshot, set Anti Aliasing to enabled and the DPI to 96.

Finally click on the configure button and change the font hinting to full.


Anti-Aliasing Settings


Once you have finished, reboot for your changes to take effect.

Monday, 12 April 2010

OpenSUSE 11.2 - How to compile a Kernel for Newbies

There are many reasons to compile your own kernel, for example adding hardware support, improving system performance or just for educational purposes.

Methods vary across distributions and within distributions there are also different ways to compile the kernel.

I am going to show you how I compile a kernel on OpenSUSE 11.2.

Important: It is assumed proprietary ATi or Nvidia drivers are not installed. If you have such drivers installed and boot into your new kernel, X will crash!

Here we go...

First we need the kernel source and various development tools such as GCC.

Yast > Software Management > View patterns > tick 'Linux Kernel Development' > Accept

This will download and install what you need. At the time of writing the current OpenSUSE Kernel source was version 2.6.31.12-0.2.1, reference to such has been made throughout.

Open a terminal and type the following

su -
cd /usr/src/linux

We are now into our Linux source directory with root privileges and must create a config file for our kernel.

It is a good idea to use the same config that is being used by the OpenSUSE kernel which you are using right now, then fine tune it to your needs later on.

To use the same config file type the following,

make cloneconfig

With our config file we can now start editing the kernel by typing the following,

make menuconfig

This is the fun part, you can go through all the kernel options and change whatever you wish. I won't tell you what to change, that is completely down to you.

Changing some options may cause a broken kernel and / or Kernel Panic!

Tip: Highlight any option and press h. This will show information about the selected option.

When you have finished playing around, exit and save your changes.

Remember to give your kernel a different name, edit the following kernel option

General Setup ---> Local version - append to kernel release

Type anything you wish, for example

-modified

Building the Kernel

This part can take a while depending on your processor. Compiling also puts a high load on your processor as well as stressing the system, causing temperatures and power consumption to increase.

If you are unable to successfully compile a 100% default and unchanged kernel due to a compilation error, there is a high possibility your system has a weakness.

It could be due to many things, for example a hot running processor, motherboard chipset, PWM circuitry, memory, combination of all these, faulty memory, poor power supply.

To build your kernel as an RPM package type the following,

make rpm

You can watch the compile if you wish, maybe have a cup of tea...and biscuits!

When the compile has finished, the new kernel needs to be installed.

cd /usr/src/packages/RPMS/x86_64

If you are using the 32-bit OpenSUSE the new kernel will be located in the i386 folder.

cd /usr/src/linux/packages/i386

If you type in dir, you will see an rpm file, for example kernel-2.6.31.120.2modified-1.x86_64.rpm

To install it type the following,

zypper install NAME_OF_FILE.rpm

example, zypper install kernel-2.6.31.120.2modified-1.x86_64.rpm

Once it has been installed, type

cd /boot
mkinitrd

Now if you type dir whilst still in the /boot directory you should have the following 2 files,

vmlinuz-2.6.31.12-0.2-modified
initrd-2.6.31.12-0.2-modified

The NAME_OF_KERNEL in this example is 2.6.31.12-0.2-modified

The final part, is to edit the grub loader (using your favourite editor) to add our new kernel.

gedit /boot/grub/menu.lst

Example menu.lst

# Modified by YaST2. Last modification on Thu Apr  8 16:21:47 BST 2010
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader

default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,0)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title Desktop -- openSUSE 11.2 - 2.6.31.12-0.2
root (hd0,0)
kernel /boot/vmlinuz-2.6.31.12-0.2-desktop root=/dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJ1KSB14195-part1 resume=/dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJ1KSB14195-part2 splash=silent quiet showopts vga=0x31a
initrd /boot/initrd-2.6.31.12-0.2-desktop


###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.2 - 2.6.31.12-0.2
root (hd0,0)
kernel /boot/vmlinuz-2.6.31.12-0.2-desktop root=/dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJ1KSB14195-part1 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x31a
initrd /boot/initrd-2.6.31.12-0.2-desktop

Use the default OpenSUSE kernel entry as a template. In the above example menu.lst the green text will be our template.

Modify it to suit your needs.

###Don't change this comment - YaST2 identifier: Original name: linux###
title Desktop -- openSUSE 11.2 -
2.6.31.12-0.2
root (hd0,0)
kernel /boot/vmlinuz-NAME_OF_KERNEL root=/dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJ1KSB14195-part1 resume=/dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJ1KSB14195-part2 splash=silent quiet showopts vga=0x31a
initrd /boot/initrd-NAME_OF_KERNEL

The red parts must be changed with the exact name of your kernel.

For example, 2.6.31.12-0.2-modified

The orange bits can be left alone but to avoid confusion I suggest you change them. It can be anything you wish.

Then add the new entry to the menu.lst file.

# Modified by YaST2. Last modification on Thu Apr  8 16:21:47 BST 2010
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader


default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,0)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title Desktop -- openSUSE 11.2 - 2.6.31.12-0.2
root (hd0,0)
kernel /boot/vmlinuz-2.6.31.12-0.2-desktop root=/dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJ1KSB14195-part1 resume=/dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJ1KSB14195-part2 splash=silent quiet showopts vga=0x31a
initrd /boot/initrd-2.6.31.12-0.2-desktop


###Don't change this comment - YaST2 identifier: Original name: My custom kernel###
title Desktop -- openSUSE 11.2 - 2.6.31.12-0.2-modified
root (hd0,0)
kernel /boot/vmlinuz-2.6.31.12-0.2-modified root=/dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJ1KSB14195-part1 resume=/dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJ1KSB14195-part2 splash=silent quiet showopts vga=0x31a initrd /boot/initrd-2.6.31.12-0.2-modified

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.2 - 2.6.31.12-0.2
root (hd0,0)
kernel /boot/vmlinuz-2.6.31.12-0.2-desktop root=/dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJ1KSB14195-part1 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x31a
initrd /boot/initrd-2.6.31.12-0.2-desktop

Exit the editor, reboot your machine.

When you see the grub menu, select your new kernel. If you want it to load by default, change the default option in the menu.lst file to 1.

I have highlighted the default option in purple.

0 corresponds to the 1st entry, 1 will correspond to the 2nd entry and so on.

Before recompiling another Kernel

If you wish to compile again, issue the following command whilst in the /usr/src/linux directory

make mrproper

This will clear any rubbish left from the previous compile and is necessary to prevent a make error.

How to remove your custom Kernels

You can use zypper to remove your kernel by typing,

zypper remove NAME_OF_PACKAGE

example, zypper remove kernel-2.6.31.120.2modified-1.x86_64

The .rpm at the end is not required and will result in a package not found error.

Next delete the initrd file created when we issued the mkinitrd command,

rm /boot/2.6.31.12-0.2-modified

And finally delete the now obsolete entry in the /boot/grub/menu.lst file.

Enjoy compiling your own Kernels!

Friday, 9 April 2010

Adobe Flash Player 10 for 64-bit Linux

Those who have been using a 64-bit Linux distribution for a while may recall the early days when plugin support for 64-bit web browsers were non existent.

This created a big problem since many websites feature flash content. So if your browser lacked the required flash support then browsing such sites is either impossible or very restricted.

For a while the solution was to use a 32-bit web browser and the 32-bit flash plugin on your 64-bit Linux distribution.

However then came nspluginwrapper, a web browser plugin that allows the use of 32-bit plugins (particularly flash player) on 64-bit web browsers.

To this date it is still used, for example by OpenSUSE x64 11.2 and Ubuntu 9.10.

Here is a screenshot showing the process information when I visited a flash enabled website on OpenSUSE 11.2 x64.


KDE System Monitor

npviewer is part of the nsplugin package and is handling the flash content.

Also open up Firefox and type as the address, about-plugins.


Firefox about:plugins

In the past the combination of the 32-bit flash player plugin and nsplugin with a 64-bit browser such as FireFox has been a bit buggy. I remember having many issues on flash enabled web sites specifically with control elements.

Even to this date some users are experiencing problems with this setup.

The good news is Adobe have released a 64-bit Flash Player plugin for Linux which has been around for quite a while, since 2008. It is currently a pre-release version but works extremely well in my experience.

All the problems I have experienced in the past or to date with the 32-bit Flash in combination with nsplugin have always been resolved when switching to the 64-bit flash player.

http://labs.adobe.com/technologies/flashplayer10/64bit.html

See, Linux is ahead of Windows, as of yet there still isn't a 64-bit Flash player for Windows!

Installing Flash Player 10 64-bit on OpenSUSE 11.2 x64

Unfortunately OpenSUSE automatically sets up Flash support and nspluginwrapper when you update your system for the first time.

So before installing the 64-bit Flash player I remove the 32-bit version and nsplugin wrapper.

You can leave nspluginwrapper installed but I have nothing else that requires it.

In a terminal type the following,

su -c 'zypper remove nspluginwrapper flash-player pullin-flash-player'

*pullin-flash-player is responsible for triggering the online update / installation of flash player on OpenSUSE, hence it is a good idea to remove it.

Now we have to download the 64-bit Flash player plugin. You will find it at the below URL,

http://labs.adobe.com/downloads/flashplayer10_64bit.html

The next part assumes that by default all downloads are saved to the Download folder in /home/yourusername/Download

This is default behavior in OpenSUSE 11.2 when using Firefox.

Open a terminal and type,

tar -xf ~/Download/libflashplayer-10.0.45.2.linux-x86_64.so.tar.gz

su -c 'mv libflashplayer.so /usr/lib64/browser-plugins'

That's it, done.

Now open up Firefox, Go to a flash website and enjoy.

If you view the process information when viewing flash content you should no longer see npviewer.

And if you type about:plugins, notice the difference.

You can also use the 64-bit Flash player plugin on other distributions but installation will differ.

Tuesday, 6 April 2010

Gentoo, sweet dream or a beautiful nightmare?

The Gentoo penguin, the fastest underwater swimming bird capable of reaching speeds of 36 km/h or 22.3 mph, but in the world of Linux Gentoo is another distribution with some very interesting differences.

http://www.gentoo.org/

Your average distribution consists of many software packages which have already been compiled from source and ready to install.

The distribution vendor is responsible for compiling all the software packages from source and grouping it together to create the distribution you download.

This also applies to software updates, the distribution vendor compiles the updates from source and stores it on a server ready for users to download.

One big disadvantage with this approach is all the software packages are compiled with very generic options and optimizations so that they are compatible on as many systems as possible.

As a result performance is sacrificed in favour of compatibility.

Another problem with your average distribution and I quote from the Gentoo Manual,

"Most distributions compile their packages with support for as much as possible, increasing the size of the programs and startup time, not to mention an enormous amount of dependencies"

Unfortunately this is standard practice with most distributions.

Is there an alternative?

Distributions could be provided in more flavours giving the user the choice to download a version which has been specifically compiled with optimizations for their processor architecture only.

Typically with your popular distribution you can download either an x86 or x86_64 bit version but why not provide more specific choices within these categories?

Hang on a minute, how many different processor types are there?

A quick look at the GCC (compiler program used to compile most Linux source code) documentation reveals, quite a bit. I count 39.

http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html

We can therefore conclude the practicality of providing more specific fine tuned distributions and software packages is far from practical.

The distribution vendor would have to provide 39 different operating systems to download and also maintain a software repository containing 39 variations of the same piece of software for updates.

In addressing the second issue of compiling programs with much support as possible, given that all code is compiled in a generic fashion it just makes sense to follow the trend of compatibility and to support as much as possible.

So is there an alternative, at this point you would be right to think no.

However you would be wrong. There is an alternative and it is called Gentoo.

Gentoo addresses the above issues because it is not supplied in a ready to use compiled state.

Gentoo is a source based distribution.

When you download Gentoo, you get a live installation setup CD / DVD. You then have the joy of setting up your system from near enough scratch.

Part of the Gentoo install process involves compiling all software packages and the kernel from source!

Prior to compiling, you have to setup the GCC compiler options meaning you can tune the compiler to compile all source code in a way that is optimized for your processor.

You can also set various USE flags used to compile software, so you can decided overall what your software should support and avoid doing what most vendors do, to make software packages support as much as possible.

Sounds cool?

It does indeed but there are very big disadvantages with the Gentoo approach.

It is very time consuming, compiling a complete system with a graphical desktop environment can take a number of hours or days depending on your processor and available memory.

You must know what you are doing.

And whilst not a disadvantage, does the optimization benefits justify going through this long process, are the speed improvements worthwhile?

There is only one way to find out.

I have never tried Gentoo before, so this will be quite interesting. Is it really as good as some people say?

After consulting the manual I proceeded to download and create the Gentoo 10.1 installation DVD.

Booting from the DVD takes you to a KDE desktop environment. I used Konqueror web browser to open the Gentoo manual and followed the procedure.

Was it straight forward?

Gentoo provide enough documentation and a good wiki but it is assumed you have the relevant experience and/or knowledge.

Going through the Gentoo install process requires using the terminal with root access. The live DVD does not allow you by default to use the KDE environment with root access but does default to root access in the virtual terminals.

So if you want to consult the manual online in KDE and use a root terminal you have to keep switching between a virtual terminal and graphical environment (KDE).

However the way around this is to enable root access in the KDE desktop environment so you can have Konqueror open to view the manual and use the KDE Konsole to setup your Gentoo install.

I simply typed in the virtual terminal, passwd. It will ask you to enter the new password for root.

Now switch back to KDE (Ctrl-Alt-F7) and you can become root using the password created above. As a result you can view Konsole and Konqueror side by side.

And that's an example of where knowledge is assumed. Would I even have thought about this as a newbie?

Another benefit due to the above is that rather than using command line to create your disk partitions you can now use the Kpartition application on the Gentoo DVD, which is a nice GUI interface.

Less typing on the keyboard means you are reducing your chances of developing RSI.

Creating partitions

When is comes to setting up your disk partitions the manual uses the example of creating the following,

/boot (ext3)
/root (ext3)
swap partition

A more preferable setup would be to create a separate home partition as follows,

/root (ext4)
/home (ext4)
swap partition

I went for ext4 because it is default for most recent distributions and better than ext3 in terms of design, performance and reliability.

As a result of choosing an ext4 filesystem, I had to enable ext4 support in the kernel.

Compilier options

The most interesting part for me during the install process was setting up the compiler options. As a first time Gentoo user I have never done this before and had to spend a bit of time researching GCC.

If you want your Gentoo system optimized for your system the compiler options must be selected accordingly.

With my current system featuring an AMD Athlon II X2 250 AM3, I worked out the appropriate -march type was amdfam10.

Here are the options I used.

CFLAGS="-march=amdfam10 -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j3"

Kernel Configuration

Configuring the Kernel is something I have done many times. Mainly to tweak things or just experiment. In my early days with Linux I set myself little missions :-)

How small can I make the kernel without having any negative impact on my system, what happens if I do this, what does that do.

I remember during Fedora Core 4 I was playing around with Dazuko and AntiVir, which required setting the default Linux capabilities in the kernel as a module in order for Dazuko to work. It may sound so easy now but back then it was a great learning experience.

Back to Gentoo, the manual states you have two options regarding the configuration of the kernel. First, manual configuration and second is using GenKernel.

You can guess I went for a manual.

I left most of the kernel options to their default values as at this stage I am more concerned with getting Gentoo up and running rather than tweaking the kernel which can be done well after install at any time.

I did set the processor type and also noticed the kernel was set to compile with the option 'optimize for size' which means passing -Os to the gcc compiler. Not something I want, so this was changed.

After the kernel compiled, its just a case of setting up various things.

Grub, manual is safer

Again with the grub configuration I went for a manual approach, I have two hard disks in the system and wanted to ensure no mistakes.

After the grub configuration your Gentoo install is more or less complete.

Rebooting the system 'should' take you to your nice new Gentoo base system.

After my first reboot I noticed an error message about dchp cant find eth0 and no network module was present. I realized I must have missed out the appropriate module in the kernel configuration.

The great thing about this was I was able to quickly sort the problem by recompiling the kernel and updating the grub.conf to point to the newly compiled kernel a few minutes.

So what next?

As a desktop user a monitor displaying a black terminal isn't very useful. So we need to install a desktop environment such as Gnome or KDE.

During the install process you are asked to choose a system profile for your Gentoo system, I chose desktop.kde.

The profiles are geared towards making your system more tailored for a particular use, as in my case KDE and it sets appropriate use flags when compiling KDE and applications.

The first step to getting a working KDE environment is to install the X server which is the graphical backend for Linux and is used by desktop environments such as KDE and Gnome.

Consulting the Gentoo documentation provides much needed guidance.

http://www.gentoo.org/doc/en/xorg-config.xml
http://www.gentoo.org/proj/en/desktop/kde/kde4-guide.xml

Both those parts took a very long time, as everything is compiled from source. I would estimate the total time was 6 hours to compile.

I was quite excited when my KDE 4.4.2 compiled and install was complete.

All I had to do was create a new user account, type a few commands and login.

The first KDE 4.4.2 login, the big moment!

It was hard to assess if compiling the base system with optimizations for my system was faster or more responsive, there isn't much that can be observed apart from a blinking cursor.

I was hopeful that in a desktop environment such as KDE I would observe the benefits.

Sluggish and poor system response is something I have experienced on a number of distributions, past Fedora releases in particular (unless you disable SELinux) have been a bit sluggish although Fedora 12 seems quite acceptable.

Something Windows continues to do better than Linux, Windows 7 is the most responsive operating system on my PC and Laptop.

When I first logged in KDE 4.4.2 on my Gentoo system the first thing I noticed was how quiet my hard disk was. The loading was very minimal compared to other distributions.

Working with the GUI, clicking on icons and launching programs was quite responsive. More than I have ever experienced on any Linux distribution.

Overall I can feel the difference, the system is more responsive and the hard disk isn't loading as much. It is a pleasant feel.

However more needs to be done with my Gentoo install, currently there is a lack of applications. No K3b, Kaffeine, Amarok, Open Office...

I did also encounter some minor issues, the OpenGL performance in KDE was slow and I could not enable compiz. A quick Google searched revealed the solution posted on the Gentoo forums, 'eselect opengl set nvidia'

Is it worth using Gentoo over other distributions?

With Gentoo I like the following,

Every software package is compiled and optimized for your system

It does not run a crap load of services that someone else thinks should be running and runs what is needed for your system.

As above but with respect to applications, it starts with a minimalist approach and you have to decide what you want.

The kernel is lightweight by default

The system response is nippy

Extremely customizable and good documentation.

What I do not like,

Unpractical time consuming process

Whilst contradicting my earlier point about documentation, perhaps some more hints and tips could be included to help less experienced users.

You need to know what you are doing.

In addressing the what I do not like category, Gentoo is aimed for the experienced Linux user, and taking that into account the only real problem with Gentoo is its time consuming installation process.

But if you want optimized, responsive and total control then Gentoo seems like the solution.

To answer my question, would I use it over anything else?

Yes and No.

It is very tweakable, I like that but the time to setup vs performance is a big issue and has other consequences.

Compiling puts a high load on the processor.

On my Desktop PC I do not mind leaving it overnight to compile packages or updates. I can do so knowing nothing will go wrong as the cooling my custom built PC currently has is excellent and well up for the job.

My Laptop however, Gentoo is simply one way to shorten its lifespan. Over 6 hours non stop compiling will take its toll and is not something I am prepared to do.

OpenSUSE or Ubuntu would be more practical in this instance and I am happy to live without the performance gain Gentoo can provide.

I have seen many differing views on Gentoo, some say it is a complete waste of time, others say it makes no difference and some its the best thing since transistors.

As with anything Linux, its all about choice and using what your like.

Is it the fastest Linux distribution, available?

Well, with a name like Gentoo the developers believe this to be the case but from my point of view it is the fastest I have ever used in terms of system responsiveness and application load times.

After adding a few more applications, like Open Office, Opera and K3b, I did notice their start up times were quicker compared to other distributions.

Final thoughts

If you have the time, experience and patience then give Gentoo a go, it will be a good learning experience.

If not, stick with your current distribution or use something else as the speed improvements are small and for most people not worth the hassle.

Gentoo is like a high performance car, we like the performance but when you consider the more important issues like fuel consumption and maintenance, it may not be practical.

Screenshot of Gentoo 10.1 with KDE 4.4.2

Gentoo, a beautiful nightmare!