Junk Food for the Brain

Open Source and Awesomesauce :)

Fedora 16 Save Iptables Rules

| Comments

Not sure if this is a bug only I stumbled upon, or im doing it wrongly, but when you try to save iptables rules in Fedora 16, you get this:- [root@fedora ~]# service iptables save Redirecting to /bin/systemctl save iptables.service Unknown operation save

An Easy Mercurial Tutorial

| Comments

Mercurial LogoFor people who want to dive in to mercurial fast, the following link works great.

He splits up the essential concepts of Mercurial into byte sized chunks.

Why do I use Mercurial? It’s easy to use, install and is programmed using my favourite language: Python. :)

AttributeError: ‘Flask’ Object Has No Attribute ‘Teardown_request’

| Comments

When you are trying the Flask flaskr tutorial, you may encounter this error:-

AttributeError: 'Flask' object has no attribute 'teardown_request'

I was initially stumped, but then realised the catch. I’m reading the tutorial for Flask v0.7.

I installed Flask v0.61 from pypi, which is the current stable version.


easy_install Flask==dev

This was already put in the github project page.

Where Is My Eth0 in Fedora 15 ?

| Comments

After installing Fedora 15, you may find your eth0 network card (NIC) is no longer present when you do an ifconfig. e.g:-

lo        Link encap:Local Loopback  
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:36008 errors:0 dropped:0 overruns:0 frame:0
          TX packets:36008 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3368266 (3.2 MiB)  TX bytes:3368266 (3.2 MiB)  
p34p1     Link encap:Ethernet  HWaddr 20:CF:30:0F:37:4A  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::22cf:30ff:fe0f:374a/64 Scope:Link
          RX packets:3010801 errors:0 dropped:1 overruns:0 frame:0
          TX packets:2249595 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4355046356 (4.0 GiB)  TX bytes:180163909 (171.8 MiB)
          Interrupt:69 Base address:0x2000 

What has happened is, from Fedora 15 onwards, they have implemented a new feature called Consistent Network Device Naming.

As a result, embedded NICs will be shown as em1, em2 etc, while PCI network cards will have the name pp.

As seen from the output of my motherboard, my eth0 is actually a PCI add on card number 34, and is using slot number 1.

But my card is built-in to the motherboard. Shouldn’t it be em1 or something?

This is by design of your motherboard. These cards are integrated PCI addons, done by the manufacturer itself.

Virtual Machines however, will have their cards remain as eth0 etc.

You can disabled this feature by appending the following into your grub.conf kernel commandline:


For more information, look at the Fedora 15 page.

When Is Centos 6 Going to Be Released?

| Comments

Centos Logo

When is the Centos 6 release date?

A question that keeps popping up for most people, as there has been much silence on this.

The good new is: Very soon! After lurking around their mailing lists, the QA team have started getting their packages / rpms / isos around since the 3rd of June 2011.

They hope to start syncing it to external (if QA passes) by 13th July 2011. So there’s a high possibility we may get it on the 14th of July 2011.

Lets keeps our fingers crossed ya?

Update: Sob Sob, due to some issues identified by QA, its currently targeted to be sync to external mirrors on the 4th of July 2011. :(

How to Install VirtualBox 4.0 for Fedora 15

| Comments

VirtualBox is a popular Virtualization product for Windows, Linux, Mac & Solaris. They have a RPM repository set up so people can alway get the latest version of it.

To install, first become root, and then download the repo file and save it in /etc/yum/repos.d.

wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo -O /etc/yum.repos.d/virtualbox.repo

Then install the dkms package to make sure your kernel gets host kernel modules each time the kernel is updated.

yum install dkms.noarch

Finally, install VirtualBox 4.0:

yum install VirtualBox-4.0

How to Change the Font in GVIM

| Comments

Gvim, the graphical version of vim is a pretty cool addition to your existing vim editors. However, sometimes the default font seems to be lacking and you may want to change it.

To do that, first go into your preferences and select the font you wish to use. In Windows, this is Edit -> Select Font.

Then, in command mode, type

:set gfn?

You should get something like at the bottom of this picture: [caption id=”attachment_309” align=”aligncenter” width=”300” caption=”Font name as described by GVIM”][/caption]

This step is important, as it tells you how vim sets the font name

In my case, I chose the Windows font Lucida Console at 12 pixels, so GVIM shows it as


What we need to do, is now edit your


and add the following line:-

set guifont=Consolas:h12:cANSI

The next time you launch GVIM, the default font should be Lucida Console.

How to Get a Root Prompt / Shell With Sudo

| Comments

Sometimes, just using sudo isn’t enough. You may need an extended session to do work as the root user. At times like this, the following command will save your day:-

sudo -i

The -i means interactive, and opens a root shell, assuming you have sudo priviledges.

Alternatives to Centos 6

| Comments

Centos LogoWhile we wait for Centos to release Centos 6, there are a few alternatives for the impatient.

  1. Scientific Linux - A distribution done by Fermilab, CERN & a few others. Its Red Hat Enterprise Linux 6 with a few additional packages, mainly targeted at the scientific community.
  2. PUIAS 6 - The Princeton University Institute for Advanced Study rebuild of RHEL6.

While they are good for the impatient who wish to try out the latest & greatest ‘stable’ builds of RHEL for free, I’d suggest waiting for Centos 6. Rumours? lurking around the centos mailing lists are that QA releases will be with the testers soon, so we probably might get them in a month or two.

As much as I’d like to try out the latest releases, I stand firmly by their decision to continue with updates for the existing Centos installed base first, before focusing on rebuilding a whole new distro.

Like they say, there’s an installed base of Centos 5 users, but you don’t see any Centos 6 users yet.

If you really need support, you should purchase a subscription from Red Hat. This helps their continued development of our favourite Enterprise Linux.

How to Change Font Size in Fedora 15

| Comments

With the release of Fedora 15, they have introduced a totally new GNOME. One thing long time Gnome users may find missing is the ability to change their font sizes.

Fortunately, GNOME has a nice little utility called the Gnome Tweak Tool.

Install is using:

sudo yum install gnome-tweak-tool

One of its many options is changing the font size. [caption id=”attachment_288” align=”alignleft” width=”150” caption=”Gnome Tweak Tool”]Gnome Tweak Tool[/caption]