Sunday, June 28, 2009

SVN Proxy Settings

Subversion (SVN) is a version control system used to maintain current and historical versions of files such as source code, web pages, and documentation.

If you are behind a proxy you will have to set the proxy before using svn.

The procedure for the same goes as follows :

1. Open "servers" file located in ".subversion" directory in your home directory.

vi ~/.subversion/servers

2. You will find following lines of code located in the file

# http-proxy-exceptions = *,
# http-proxy-host =
# http-proxy-port = 7000
# http-proxy-username = defaultusername
# http-proxy-password = defaultpassword

Set the appropriate values and remove the '#' from the beginning. Make sure you don't leave any whitespaces at the front of the lines being edited.

After editing the code will look like

http-proxy-exceptions = *,
http-proxy-host =
http-proxy-port = 7000
http-proxy-username = username
http-proxy-password = password

3. Save the file and exit.

You are now ready to use svn.

Friday, June 26, 2009

Setting NumLock on automatically in Fedora

The NumLock is not activated by default at start-up (in FC-9/10). I am not sure of the fact in other distros. Everytime when the computer starts, you have to manually activate the NumLock key.

The following solution works :

Execute the following commands as root in a terminal.

1. Install numlockx

yum install numlockx


Install using numlocx rpm.

rpm -ivh numlockx*.rpm

2. gedit /etc/gdm/Init/Default

3. At the end of the file you will find a line like

exit 0

Above this line add the following code

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

4. Save the file and restart the computer.

You will find the NumLock activated by default at startup.

Wednesday, June 17, 2009

Booting Windows From Grub Menu

Many of you have tried installing Fedora or Ubuntu on your system. It gets installed very gleefully and when asked to reboot , you try booting to windows and it does not boot. Plain as that, you think that you have lost Windows completely , probably due to some wrong selection of drive while installing Linux.
But the battle is not yet lost. You can still boot windows from the grub command line. The thing is as simple as the following four commands-->
  1. grub> rootnoverify (hd0,1)
  2. grub> makeactive
  3. grub> chainloader +1
  4. grub> boot
Then again as I once faced the problem myself , the windows on your pc may not always be on the partition (hd0,1). In my case it was (hd0,4).So incase you have no idea where to find out where the Windows is installed , you can always open the grub.conf file in linux to see it or as I did in my case I tried hit and trial to find out it was 4 (the magic number).

This has worked for me everytime I have encountered this problem and I just hope It works for you too!.

Configure BSNL EVDO DATACARD on Ubuntu

Since BSNL has released its EVDO internet accessing data card, it has gained a lot of popularity amongst the users. Needless to say people may face many difficulties configuring it for ubuntu. But then again, it's these challenges that keep the linux users up and moving.

Cutting straight to the point, configuring it for ubuntu may be as simple as the following four steps:
1.In superuser mode, type lsusb at the shell prompt.
root@santosh-laptop: lsusb.

This will list all the usb ports on your pc.

2.Then at the shell prompt type in the command

If this works, it will say modem detected at some port.But life again ain't so easy.It may well not recognise any modem and give a output something like below:

Now to overcome the problem you have to make the following changes:

1.Remove comment on the below lines in /etc/init.d/
mkdir -p /dev/bus/usb/.usbfs
domount usbfs '''' /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount –rbind /dev/bus/usb /proc/bus/usb.

Note: The above lines will be found in the do_start() function.

2. Now type in the following command:
modprobe usbserial vendor=0x05c6 product=0xfffe

Now the vendor and the product id may be different for your data card. You have to find that out for yourself.

Hint: These numbers were listed in my lsusb output ---> 19d2 and fffe. Just add 0x before them to make them hexadecimal.

3. Now again type in the command wvdialconf at your shell prompt.This will edit the file /etc/wvdial.conf. Open it using any editor and make in the following changes:
type in--> Stupid Mode = 1 at the end of this file.
Also type in the username and the password infront of the username and password row. Type in your phone name as #777.

4.Now type in the command wvdial at the shell prompt:

Hurray !! your net has been connected and it looks something like this:

Acknowledgement: Thanks to Santosh Mukherjee ( for writing this post.

Thursday, June 4, 2009

Python ElementTree Fix for Ubuntu

Did you face the following unpleasant situation?

>>> import elementtree
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named elementtree

In case you've installed the elementtree package correctly
(python-elementtree) and you're using Ubuntu,the following
solution will most probably work:

instead of import elementtree, use
import xml.etree.ElementTree

( I believe you must've already figured out the cause of the import
failure and why the solution works.
In case you haven't, read on.
The import failure is due to the directory structure of the
elementtree files being different in Ubuntu. Usually the python
import modules are located in /usr/lib/python
The elementtree import file ( in Ubuntu however
is located at the path
Hence the above change in the import parameter is necessary )