Category Archives: Cent OS

Firefox 3.6 crashing X Server in CentOS 5.3

I recently did a yum update firefox. This caused my FF to be updated to 3.6 from the earlier 3.0.
Very soon i noticed that while browsing certain sites, i was getting logged out from the X server. The FF seemed to crash my X server.

One such site was this:

A quick google search reveals that this is a known issue with the the video driver.
The solution was to update the CentOS to the latest 5.5.

However, a quick fix can be done,
Add the following line to the ‘Device‘ section of your xorg.conf file (/etc/X11/xorg.conf).
Option    "XAANoOffscreenPixmaps" "true"
Restart X by Ctrl-Alt-Backspace

Check out the problem page again.

In some computers it might also be required to add this line too
Option     "AccelMethod" "XAA"

Adding an initialization file for XBoard in Linux

You can set the different startup options as X resources (typically in your .Xdefaults file) or in a file named XBoard in your home directory.
A typical option sometimes has two names; a short name and a long name. Short names cannot be specified in the initialization file, they are used by typing them on the shell command line you use to start xboard.

The format of the file contains, one option per line like,
XBoard*longOptionName attributeIfAny

For Boolean options it is,
XBoard*longOptionName: True

My XBoard file,

[tony@localhost ~]$ cat XBoard
XBoard*searchDepth 5
XBoard*searchTime 0:5
XBoard*showThinking: True
XBoard*showCoords: True
XBoard*internetChessServerInputBox: True
XBoard*ponderNextMove: False 

The full list of available options can be found in man Xboard

If you play over ICS (Internet chess server) frequently, you could create a .icsrc file in your home directory so that XBoard feeds the file’s contents to the ICS as commands upon connecting.
Usually the first two lines of the file should be your ICS username and password. This will automatically log you in to ICS upon connecting.

Here is mine,

[tony@localhost ~]$ cat .icsrc

The third command games just prints a list of the ongoing games.

Btw it may be also very useful to create an application launcher (shortcut icon).
In GNOME, Rightclick on Desktop > Create Launcher
Type : Application in Terminal
Name: XBoard ICS
Command: xboard -ics -icshost

Ok done. 1.E4 E5! ;)

To test the speed of your DNS server

Modern webpages reference resources from many domains. So time for DNS lookups can cause significant delay in browsing.

These days i was having slow internet speeds, and i suspect its due to bad performance by my ISP’s DNS server.

The speed of DNS lookup can be determined by the dig command combined with a time command,

[root@localhost ~]# time dig @
......    148     IN      A
real    0m0.607s

replace with your DNS server’s IP address.

you could also use nslookup instead of dig

[root@localhost ~]# time nslookup
real    0m0.366s

Here i am checking the resolution time taken from GoogleDNS

You could compare the performance of your DNS server with some of the free open DNS servers like, GoogleDNS(, OpenDNS(

Make sure you test with less commonly used domains as the common ones will be already cached in the DNS server’s cache.

Mount an .iso image in linux

I just wanted to extract the USB boot image from the .iso of the CentOS DVD image that i downloaded.

Now i mounted it by

[root@localhost ~]# mkdir /mnt/iso
[root@localhost ~]# mount /home/dloads/CentOS-5.2-i386-bin-DVD.iso /mnt/iso/ -t iso9660 -o loop,ro

ro mounts it read only so that we dont accidentally make no changes.
loop is required to mount it as a loop device (so as to access the file as a block device).

Resized my root filesystem online

Wanted to increase the size of my root filesystem. I have my CentOS 5.3 in an LVM

[tony@localhost ~]$ df -h /
Filesystem            Size  Used Avail Use% Mounted on
16G   11G  3.8G  75% /

Decided to use a less used NTFS partition. (i have a Linux/Windows multiboot system)

The steps i did,
1. Created a new Physical volume using the spare partition

[tony@localhost ~]$ su -
[root@localhost ~]# pvcreate /dev/sda8
Physical volume "/dev/sda8" successfully created

Use pvdisplay to see the newly created physical volume, if required.

2. Extended the Volume Group to include this physical volume.

[root@localhost ~]# vgextend CentOsVG /dev/sda8
Volume group "CentOsVG" successfully extended

3. Now, Enlarge the size of the Logical volume and then the filesystem.
I knew i have to use lvextend command, but got confused after reading the man pages, so finally decided to use the Graphical Utiliy. :-D
System > Administration > Logical Volume Management
Clicked on my volume group and then, the required logical volume and ‘Edit Properties‘.
Set the size to use the ‘Use Remaining‘ and Ok
The system prompted for enlarging file system size, and it was all over!

Later i figured out that i should have used the command,
lvextend /dev/CentOsVG/CentOsVG-RootLV /dev/sda8
lvextend /dev/CentOsVG/CentOsVG-RootLV/ -l +100%FREE

And perhaps increase the size of root filesystem by using resize2fs

Shouldn’t this require an umount of the /? And so use a ‘rescue environment’ or live CD?
No! Online increase of ext3 partitions are available from kernel 2.6.10

Finally checked the size of the root

[tony@localhost ~]$ df -h /
Filesystem            Size  Used Avail Use% Mounted on
25G   11G   13G  47% /