Home page of this blog

Friday, December 4, 2009

Using google public dns along with local dns cache in Ubuntu Karmic

Here is the info about Google public dns


Here is the configuration instructions for enabling google public dns


In the above link, when I followed there was a small problem I encountered. For Ubuntu, there is a small correction in step 2, it should be as follows after correction

sudo vi /etc/dhcp3/dhclient.conf

After I made the changes and tested, here is what my observation

Google dns feels fast

coupled with local dns caching in Ubuntu, it is even faster than before

Here is the link for enabling local dns caching in Ubuntu


To have both local dns caching and google dns, we should modify the above link's instruction to have /etc/dhcp3/dhclient.conf to have following line

prepend domain-name-servers,,;

The above change should be done inside /etc/dhcp3/dhclient.conf

To test the changes, goto command line (if you have local dnscache using dnsmasq/bind then restart dnsmasq (sudo service dnsmasq restart) )

dig google.com


dig google.com

the second one will be considerably faster than the first, which indicates, if you visit page from same domain again and again, it will be served extremely fast!!

Here is a screenshot of dig in my Ubuntu gnome terminal


Tuesday, November 24, 2009

Using vesa driver in Fedora 12 live CD instead of nouveau

Fedora 12 includes a reverse engineered nvidia driver called nouveau which did not work properly with my nvidia card (9800 GT).

I could not login properly, nor see how Fedora looked/worked.  Somehow I wanted to try Fedora 12. I tried blacklisting nouveau and forcing fedora use vesa to see how it looks.  It worked and,

Here is a textual summary of what I tried which I hope may help someone

When I booted from live USB, I was greeted by "Automatic boot in 10 seconds"

I pressed tab. This brought me to Boot menu. I pressed tab again and added the following


(and pressed return key after appending above to boot)

After some time, nouveau failed to load as expected as there was no param called blacklist in nouveau (we can give any xyz in place of blacklist to force the module not to load into the kernel!, see the last screenshot)

I was greeted by a blank screen. Great. I am not scared by that

I gave Ctrl + Alt + F2 and gave root as the user name. It logged in without prompting a password. I brought down failed X-Server by issuing

init 3

(init 3 brings down runlevel to 3 without graphical UI)

I confirmed if nouveau was loaded by mistake by lsmod and grep as follows

lsmod | grep nouveau

(if loaded, nouveau wont get unloaded easily, no rmmod will work on it, it is tightly bound, so is this prevention mechanism to not allow nouveau from loading)

I used Xorg to configure my Xorg Server as follows

Xorg -configure

which created a new file xorg.conf.new under current directory

and here is how I edited my file to substitue vesa in place of nouveau using sed editor

sed -i s/nouveau/vesa/g xorg.conf.new

and copied the modified file into /etc/X11/ folder using cp command

cp xorg.conf.new /etc/X11/xorg.conf

To start and test X-server I used


and I was inside gnome with vesa driver running (which of course did not crash or corrupt my display like nouveau driver, alternative solution is using init 5 and logging in as liveuser, which is a hit and a miss, but startx works always)
In case X-Server flickers due to misconfiguration, it is again easy to fix, by giving Ctrl + Alt + F3 or Ctrl + Alt + F4 ... and then stopping X-Server by init 3

Fedora 12 rocks, even when running vesa driver, it is fast fast ....

Some Fedora 12  screenshots running with vesa driver (last screenshot shows dmesg output, showing how Fedora got confused while trying to load nouveau as I appended blacklist param to boot, which I used to my advantage to stop nouveau from loading, any loadable module can be stopped from loading into kernel using this technique)


1. vesa is a minimal X driver which should work in any situation.
2. Xorg -configure is the command to configure Xorg manually in Fedora
3. lsmod lists the loaded modules and |grep nouveau lists a line if there is a match (grep stands for regular expression)
4. sed -i  edits file in place and s///g searches a pattern in the first // and replaces with pattern from second //
5. init 3 to go into runlevel 3 (and fedora supports classic runlevels unlike ubuntu where restarting Xorg is a bit different http://duopetalflower.blogspot.com/2009/10/new-way-to-stop-or-start-gdmx-in-ubuntu.html )
6. init 5 brings to graphical desktop manager

Monday, November 16, 2009

screenshots of openSUSE 11.2 and ubuntu karmic 9.10 running in seamless mode

Here are the screenshots of ubuntu 32 bit on virtualbox-ose in openSUSE 11.2 under seamless mode. You could see the fuse of gnome menus  and KDE menus in second screenshot and fuse of openSUSE 11.2 and ubuntu package managers running side by side!!

Saturday, November 14, 2009

I am running ubuntu karmic 32 bit in 64 bit openSUSE 11.2 KDE

openSUSE 11.2 KDE4.3.1 is awesome, extremely fast and very beautiful. I started loving it. Neither can I miss my favorite ubuntu , nor can I miss openSUSE 11.2 KDE 4.3 after getting a feel of its speed, power and beauty. So here is what I did and I am not that good in explaining how I configure. But let me try explaining thinking the reader in second person

If you have a core 2 duo or a quad core PC you need not miss either! Why? Because core 2 duo or quad core processors are coming with hardware virtualization. By default hardware virtualization is disabled in bios. If it is disabled you can enable it in bios. Hardware virtualization makes the guest OS run with near native speed. see X86 Virtualization in wikipedia

I installed openSUSE 11.2 and consider it as a powerful host for hosting guest OSes. As the kernel is very much optimized for desktop use, virtue of  64 bit openSUSE 11.2 kernel with 1000Hz frequency ( unlike ubuntu karmic 64 bit which is 100Hz frequency kernel and that is the main reason I dumped 64 bit ubuntu)

I installed virtualbox-ose, and using virtualbox I have ubuntu karmic running as a guest OS. virtualbox-ose has two parts host and guest

host is the OS which is powerful enough and can host other OS on top of itself, guest is any OS which should be able to run in virtualmachine. ubuntu 32 bit felt light on top of virtualbox and it is a good guest OS


The powerful openSUSE 11.2 with 1000 Hz frequency kernel is my host. To install virtualbox in openSUSE 11.2 is just a click away. Goto yast and install it, suse will resolve all dependencies. Or if wanted to do it command line it can be done as follows

sudo zypper install virtualbox-ose virtualbox-ose-kmp-desktop


By default after installing ubuntu ran well, but graphics acceleration was not good . So I installed guest additions from the virtualbox menu (Devices --> Install Guest Additions)

Then rebooted and now ubuntu ran well as a guest

Here are the screenshots for your enjoyment (if you view this from a tabbed browser, right click the following images and open in new tab to get a full view)


Here is the virtualbox settings I configured as an image

I ticked the following in system menu while configuring

1. Enable ACPI
2. Enable IO APIC
3. Enable PAE/NX
4. Enable VT-x/AMD-v
5. Enable Nested Paging

and ticked enable 3d acceleration in display menu while configuring

and I configured networking as bridged

Why virtualbox?

Because, virtualbox has a open source edition and it offers 3d acceleration in guest OS, kudos Sun Microsystem for such a great product

To look further, there are numerous articles about virtualization in internet. To get virtualbox with full USB support, download and install it from virtualbox.org instead of installing ose edition from repository

Friday, November 13, 2009

Installing adobe 64 bit flash player in openSUSE 11.2

Download 64 bit flash player alpha from adobe site,


see screenshot below

In the page, goto last link "Download 64-bit Plugin for Linux" and right click and save as see screenshot below

Goto file manager and extract the zip (or use command line if you wish)

See screenshot below

Goto command line (konsole or gnome-terminal) and change directory to Download by giving cd Download

Then use sudo command and copy the shared object into lib64/browser-plugins under /usr folder as follows

sudo cp libflashplayer.so /usr/lib64/browser-plugins/

you will be prompted superuser password (in suse, sudo command prompts super user password)

see the screenshot below how the copy command executes in konsole

That is it, you have installed 64 bit flash player in opensuse11.2

To check if the flashplayer is installed, goto firefox and type about:plugins

You should be seeing a new flash plugin, which you installed now

64 bit flash player in action (along with sound of course), how simple, isn't it ?


Tuesday, November 3, 2009

Ubuntu Karmic 9.10 with droid font looks crisp and beautiful

I installed the droid font which is the default android font coming with android mobiles. Ubuntu repository has this droid font and can be installed as follows

sudo apt-get install ttf-droid

After changing the default font to Droid serif, every text looks better and crisper in Ubuntu (atleast to my eyes)

Here is how to change the default font

Right click on empty area of desktop and select menu Change Desktop Background  and select Fonts tab


System --> Preference --> Appearance --> Fonts

Change the default font to Droid Serif (and not Droid Sans) and choose the size as you like

Here is the screenshot showing my font defaults

Another screenshot showing nautilus displaying folders, see the Applications menu, nautilus menu, text under folder, everything feels better with droid serif font

I hope you will also be able to get a better font experience like this

Tuning Ubuntu 9.10 Karmic for speed and better internet connectivity

After installing Ubuntu Karmic 9.10, I changed the following tunables

swappiness and vfs_cache_pressure

swappiness --> If we have large RAM, there is probably no use for a swap file and we can decrease the swappiness to a very low value without fear. If the RAM capacity is 512 MB or less than 1 GB RAM, then Ubuntu or any linux uses swap as a swapfile. The default swappiness is normally 60 (but I have seen 40 in case of Fedora 11 after updates). Do not touch the swappiness and cache pressure unless you have atleast 1 GB of RAM

If we decrease swappiness, speed of opening programs feels faster

to get current swappiness of system

sudo sysctl -q vm.swappiness

to change swappiness to value 20, which is low

sudo sysctl -w vm.swappiness=20

to increase the speed of browsing files and folders again and again, we should decrease vfs_cache_pressure. Default vfs_cache_pressure is 100, if we decrease it, kernel virtual machine (vm) caches files more and more

to get current vfs_cache_pressure

sudo sysctl -q vm.vfs_cache_pressure

to set vfs_cache_pressure

sudo sysctl -w vm.vfs_cache_pressure = 50

You can read original tuxradar article about improving speed by clicking this http://tuxradar.com/content/make-linux-faster-and-lighter

Sometime today morning when browsing irctc and opening some news sites, youtube, Ubuntu took a very very long time. Then I remembered that old debian lenny errata page and followed it and tweaked tcp window scaling settings. If you ever feel that you are not able to visit some sites or browse properly, follow this debian errata

Debian Errata, see buggy routers may cause problem





If you are bored to read the above and continue reading here, what I did, here is what I did after following the above errata page

 Hit the site you are having trouble viewing, if you feel there is problem open terminal and change the system param as follows

sudo sysctl -w net.ipv4.tcp_rmem="4096 65536 65536"


sudo sysctl -w net.ipv4.tcp_wmem="4096 65536 65536"

 If you don't feel the same browsing/network issue you faced before setting these two tunables, then proceed below to make the changes permanent

To make above changes permanent upon reboot(speed increase and net improvements) 

Add these lines to end of /etc/sysctl.conf by editing it (sudo vi etc/sysctl.conf)

#decrease swappiness
#improve file/folder browsing speed
#debian tcp window scaling errata fix
net.ipv4.tcp_rmem=4096 65536 65536
net.ipv4.tcp_wmem=4096 65536 65536

Note: sudo sysctl -p reapplies all the settings from /etc/sysctl.conf and can be used

A screenshot showing how my /etc/sysctl.conf looks after above changes

Thursday, October 29, 2009

Connecting to network before logging into gnome in Ubuntu Karmic 9.10

I always wondered how to get connected to wifi/network in Ubuntu even before logging into gnome. This is useful because in case of some problem in Ubuntu, we can atleast ssh to the box from another system if it is connected to network.

Today I accidently figured out how to do this in Ubuntu Karmic 9.10

The simple answer is using wicd

wicd is an alternative to network manager applet. If we install wicd ubuntu karmic offers to remove existing network manager. If we proceed, ubuntu offers our user to be added to netdev group. I checked my user to be added into netdev group and then clicked forward. Done, wicd got configured. Following screenshot shows the debconf option for adding user to netdev group

Now I logged out (of course, I still use Ctrl + Alt + Backspace) and logged back in, to see a small wicd applet in place of network manager applet. Clicked it and configured my wifi settings. To ensure we are connected to wifi router even before gnome logs in, we need to check "Automatically connect to this network"

After this I checked if I am connected to network by rebooting Ubuntu Karmic 9.10. When I went to virtual console before logging into gnome and pinged google, I was able to ping it.This is it, the easy way to connect to network before even logging into gnome

Here are the screenshots

Screenshot showing how to make wicd connect to network automatically

Screenshot showing how to configure WPA passphrase in wicd

New way to stop or start gdm/X server in Ubuntu Karmic 9.10 using service command

Today I was trying to install nvidia drivers manually on Ubuntu Karmic 9.10 (got installed using daily build of Ubuntu) as version 190.42 allowed controlling power options of nvidia card from nvidia settings.  see http://news.softpedia.com/news/Nvidia-190-42-Linux-Display-Driver-Has-Support-for-OpenGL-3-2-125389.shtml

First I removed nvidia drivers from Hardware Drivers (System --> Administration --> Hardware Drivers)

After removing the drivers given by Ubuntu which were old (185.36), I gave Ctrl + Alt + F1 and tried to install nvidia drivers as mentioned in softpedia. But nvidia kept complaining my X is running and I bruteforced by killing X, gdm using killall. None of them worked as ubuntu somehow managed to respawn X/gdm again with login prompt sound.

Then after trying for another 2 hours by searching in /etc/init.d folder I figured out the new interesting way to start or stop X/gdm at will in Ubuntu Karmic 9.10

This is how it is to be done and it looks cool and very easy

To stop gdm from virtual console (after going to virtual console by giving Ctrl + Alt + F1)

sudo service gdm stop

To start after installing nvidia drivers or whatever we did in console, to start it is as simple as stopping

sudo service gdm start

Here are the screenshots of the new powermizer settings of 190.42 nvidia driver settings after I managed to stop gdm, install nvidia driver manually and start gdm. Wow, I love ubuntu

Caution: Don't ever stop gdm from gnome-terminal as gnome-terminal is inside running gdm/gnome and you will be abruptly seeing a blank window. Please use Ctrl + Alt + F1 to goto first virtual console or Ctrl + Alt + F2 to second virtual console, login using ur credentials into ubuntu and you are set to call sudo service gdm stop/start

Wednesday, October 21, 2009

Fedora 12 Beta, nouveau graphics driver and screen corruption

I tested the fedora 12 x64 Beta. I was very happy, it ran very fast. After playing sometime, I opened firefox when the stupid display corruption occurred.

To the very new guys to fedora and nouveau, here is the summary. Nouveau is a open source driver for nvidia cards and Fedora 11 and Fedora 12 uses nouveau driver by default if you have nvidia cards in your system. The open source nouveau driver is very good, but somewhere in some scenario corrupts the screen display and hangs the system. Hope this bug gone and Fedora 12 rocks as usual when it releases

I could not take the screenshot of the corrupted screen as everything hung. I took photograph using my digicam and they are attached here. I will raise the bug in bugzilla soon (may be this weekend) which I already raised for Fedora 11 (https://bugzilla.redhat.com/show_bug.cgi?id=505853)


If you want to read more about how I booted into Fedora 12 and used vesa driver instead of nouveau, you can have a look by clicking the following link


Tuesday, October 20, 2009

openSUSE 11.2 rc1 has a fast, optimized, premptive kernel

openSUSE 11.2 release candidate1 is very surprising. I think it is one of the fastest in linux world. openSUSE  has optimized their kernel very much for desktop needs and feels as fast as an arch linux kernel.

The live experience of openSUSE 11.2 RC1 feels super fast and very very snappy. How snappy? when I clicked dolphin, it was there in an instant. I clicked some icon, the program was running. It is so very fast. Even firefox 3.5 opens extremely fast and that too inside a KDE environment

It is very exciting, when openSUSE 11.2 releases, a linux with monstrous power, a beast unleashed awaits my machine

It is a preemptive kernel and can be verified by giving the following command when running openSUSE

uname -a

I saw the above when playing with KDE4.3 live cd of openSUSE 11.2 rc1. Ubuntu Karmic does not have a preemptive kernel like openSUSE 11.2

Upcoming Ubuntu Karmic x64 kernel frequency

If you thought that the generic kernel frequency of x64 (amd64) architecture in Ubuntu Karmic is 250 Hz then you are there for a surprise! It is just 100Hz (no no, I want 1000Hz without using a rt kernel). This might change with final build or release candidate build of Ubuntu Karmic

I am having upcoming Ubuntu Karmic 64 bit installed in my system (using its daily live CD)

I checked what is the kernel frequency by using grep on the kernel config file in /boot directory

cat /boot/config-2.6.31-14-generic | grep HZ

 It is still very very snappy with just 100Hz. I checked the kernel frequency in an IBM thinkpad which has 32 bit karmic, but it shows 250Hz (It is an irony that a 32 bit kernel has a 250Hz freq and a 64 bit kernel has 100Hz freq)

This might change with upcoming release candidate of karmic or  final build of karmic

Sunday, October 18, 2009

Downloading Ubuntu daily build livecd using zsync

zsync is a program with artistic license v2

zsync can be used to just download only the diff/partial/delta of a big file from a server instead of downloading the entire big file again. For this to work, server should provide a .zsync file which is also called control file (actually a diff file)

The real advantage of zsync is we don't need to download the entire blocks (chunks or bits) we already have in local,  again from server. This saves bandwidth as the difference (between the local file which is old and new file in server) which we download will be very small compared to a big download. Actually in the following example, I downloaded only around 100 MB instead of downloading 700 MB

In this example I will explain how I downloaded daily build of Ubuntu livecd using zsync. (from http://cdimage.ubuntu.com/daily-live/current/)

I already have a  64 bit ubuntu karmic live cd downloaded on 17/Oct/2009. Now I can download the daily build 18/Oct/2009 ubuntu karmic live cd again or just download the delta and rebuild the 18/Oct/2009 using zsync

The first thing I did was installed zsync

sudo apt-get install zsync

Then I went to http://cdimage.ubuntu.com/daily-live/current/ and located the .zsync file. The .zsync file is also called the control file and it should be present on the server (The server should support .zsync for this to work)

I created a new directory called Oct18 and saved the new sha256sums for the 18/Oct build  inside it (http://cdimage.ubuntu.com/daily-live/current/SHA256SUMS)

Then, I copied the 17/Oct/2009 daily build karmic-desktop-amd64.iso to this new directory named Oct18

In command line (gnome-terminal) I went to the Oct18 directory gave

zsync http://cdimage.ubuntu.com/daily-live/current/karmic-desktop-amd64.iso.zsync

The above command took care of calculating what missing portion of the iso it needed to download and started downloading the difference. zsync takes care not to overwrite the original file until it completely downloads all the missing portion and rebuilds the new file. It puts all the missing blocks inside a .part file and is quite powerful that it will continue from the last time where it left, if closed in the middle. Here is a screenshot of zsync in action

After downloading, I checked if zsync successfully downloaded 18/Oct livecd, using sha256sum command and SHA256SUMS (http://cdimage.ubuntu.com/daily-live/current/SHA256SUMS) for 18/Oct livecd   (Ubuntu started providing sha256sums along with md5sums for ubuntu iso's and is considered the best hashing which can't be mimicked)

sha256sum karmic-desktop-amd64.iso | grep 36b3674b3542f03691365a27b6e6f98406c0f0842c047dacc2c5dca392355740

The  following screenshot shows that it was a success!!

Ubuntu Karmic 9.10 can boost volume above 100 percent

I downloaded daily build of Ubuntu Karmic 9.10 yesterday (17/Oct/2009). When I was playing with Ubuntu Live CD, I saw that it can boost sound above 100%

Below are those screenshots

In the following the tooltip shows 150% volume after increasing the output volume

Thursday, October 8, 2009

Ubuntu Karmic has option for turning off bluetooth

I have Ubuntu Karmic in netbook (Lenovo Ideapad S10). After installing updates (update manager called it partial upgrade) I see a new option to turn off or turn on bluetooth from the bluetooth icon in top panel

Below screenshot shows bluetooth turn off option

Below screenshot shows bluetooth turn on option

I have Ubuntu Karmic in my netbook installed along with Arch Linux. I have shared my home directory between Arch Linux and Ubuntu Karmic so used a different user name (a yaksha my favorite character in Mahabharat who questions King Yudhistira) to avoid conflict!

Wednesday, October 7, 2009

xPUD linux boots within 5 seconds inside VirtualBox

I ran xPUD which is just a 56 MB linux (with full fledged firefox 3.5.3 and flash plugin) in Sun Virtualbox and netbook.

I allocated 256 MB for xPUD in Virtualbox and xPUD booted within 5 seconds!! though this is a development build

You can watch the video uploaded by me in youtube http://www.youtube.com/watch?v=fW9PAtZ193Q

Here are the screenshots of the beautiful xPUD running inside Sun Virtualbox

xPUD boot screen

xPUD first screen

xPUD has firefox 3.5.3

xPUD has flash plugin preloaded

xPUD playing youtube video

xPUD terminal showing kernel version

xPUD settings menu

xPUD file menu

xPUD website http://xpud.org/

xPUD poweroff options

xPUD release on distrowatch

When I ran from netbook (Lenovo Ideapad S10) it took 14 to 16 seconds to boot and after the latest snapshot build wifi works out of the box.

Here is the snapshot build along with broadcom wireless drivers done by penk (Chen, Ping-Hsun) ultra fast developer of xPUD (see comments 2,3,4 and 5)


It is 56MB and it's

MD5: 814c37c9a132a8a9bf924af8f776157f