BSNL online recharge (e-recharge) facility using credit card or net banking still a dream!

BSNL is India’s largest telecom service provider with unmatched infrastructure. Mobile or land line services provided by BSNL is extremely competitive in terms of price and features. BSNL has forced other private players to offer better services and reduce their prices. The same has been happening in broadband service area. In Kerala for example, BSNL forced Asianet dataline to upgrade their infrastructure and provide broadband service up to a speed of 2mbps (previously Asianet was providing 128kbps "broadband"!)

But again when it comes to billing or online support for its services, BSNL lags behind everyone. It is so pathetic that sometime you wonder whether there is a conspiracy behind it! I will give you some examples.

Online payment of BSNL land line phone bills

There is no unified online billing system for BSNL. Some of the local BSNL offices (Bangalore for example) provide independent online billing. But when you are in Trivandrum, you cannot pay BSNL bill through credit card or net banking services.

sbi biller facility for bsnl bill payments Currently there is only one way to pay your landline bills online. If you have online banking service of SBI (State Bank of India), you can register BSNL as a biller by giving your consumer number and phone number. If everything goes well (which will take sometime) you can start paying your bills through SBI. I am yet to pay a bill successfully!

If you go to any of the main BSNL offices you can see long queues of people trying to pay their landline bills! Building an online bill payment system will only cost peanuts as far as BSNL is concerned. But still it remains a dream…

Erecharge coupons for BSNL prepaid services

BSNL mobile services are good in terms of price and service. The only problem is recharging your prepaid mobile service. There is currently only way to do this. Buy a physical recharge card, scratch it, send the 18 digit number to *123*.  There is no way to purchase these recharge cards online and there is no way to do an e-recharge through credit card or net banking.  What is surprising is the fact that selling these recharge coupons through online facilities is only going to increase the profit per card for BSNL since there is no dealer commission to be paid!

What BSNL should do?

BSNL should look at complete integration of its services across the country. It should also look at single billing system. A single online system to manage all the services provided to customer is a must. For example, I should be able to enable caller id feature just by clicking a checkbox. For e-recharge or any other valued added services, a feature similar to what is seen in Indian Railways online reservation system (operated by IRCTC) must be provided. IRCTC payment system is very impressive and it supports a wide range of Internet banking services, credit card payments and other payment systems as can be seen below.

payment options on indian railway irctc online

I hope that this article becomes obsolete at least within a year of posting! :-)

July 3, 2008 | Posted in India | No Comments »

The PHP vulnerabilities, exploits and hacks in phpBB3, WordPress etc.

I have a couple of sites running under WordPress and phpBB3. When it comes to usability, these products have come a long way. The best part is they are completely free and since they are based on php language, all web hosting service providers support them. But the really ugly part is the vulnerabilities, exploits and hacks out there on these products. You need to constantly watch for any new updates and then apply the patch or latest version immediately. This sounds simple for a single site, but when you have more than a couple of sites it is a nightmare.

There are so many script kiddies out there that it is a matter of time before an exploit or hack is found even on the latest version of WordPress or phpBB. These exploits are usually based on SQL injection, remote file upload or cross site scripting. I briefly cover what each of this means.

SQL Injection attack - This happens when the attacker passes a block of SQL as a user input. This is of course the simplest form. In almost all cases the reason for this exploit is lack of validations on query parameters. This type of attack is the most common and they can be seen in thousands of WordPress plugins out there. The problem with this attack is simple. Once the hacker gets DB under his command, he can create administrative users, drop or add tables or do whatever he want on the application.

Cross site scripting attack - This attack involves methods which injects scripts inside the wordpress blog or phpBB3 site. The injected script may open popup or other browser windows with objectionable content or phishing sites. Assume that a request parameter is displayed on a web page. If someone passes a block of JavaScript as request parameter, it may get displayed and it may get executed as well. Now if someone can execute script on your site’s behalf, it means disaster.

File upload exploit - In this method attacker somehow manages to upload a php file to your hosting folders. Now that gives him complete power to do anything he wants. Typically this is used for spamming. The php file will have a list of email addresses and it will send spamming mail to each of these addresses using the sendmail feature of your server. Recently my web hosting account had a list.php in publi_html folder which was used for spamming and phishing attack.

Couple of my sites have been hacked in the last 2 years. Identifying what got hacked and removing it and then restoring your site to its original form is tedious and time consuming. I really hate script kiddies!

One day I got a warning mail from the hosting provider saying that my account will be closed if I don’t stop spamming. It was a complete shock that someone else had managed to upload a file on my server and then use it on my behalf for illegal purpose! I changed all my passwords and then upgraded WordPress and phpBB3 to latest versions. But still I am very uneasy at the thought that even latest versions can have exploits.

Then another day I got  a mail from Technorati saying that my blog is hacked. I checked my web page and there was nothing wrong. When I looked at the HTML source I noticed billions of spam mails under hidden div tags! Someone had hacked into the theme files of WordPress and had cleverly inserted these links. It appears there are automated tools out there which scans for vulnerable WordPress blogs and then hacks them. So for the hacker there is no manual work!

How to minimize hacking/exploit attempts to your website/blog?

There is no 100% sure way to prevent vulnerability attacks. If you don’t use WordPress or phpBB3 you are in a very safe position! But then you miss some great tools. Here are some of my recommendations to minimize vulnerability attacks.

  • Use strong passwords for everything. Strong means it should have capital letters, numbers and special characters and should have a minimum length of 8 characters.
  • Ensure that all the software you use (WordPress/phpBB3 etc.) are up to date. You need to subscribe to mailing lists to know whenever a new version is out and then apply the patch ASAP.
  • Minimize use of plugins or mods. If you have to use a plugin, just use the most reliable and most widely used plugin only. The same applies for phpBB3 mods. Most of these mods and plugins are created by newbie programmers and there is a high probability that they contain SQL injection attack vulnerability.
  • Monitor your web folders for any unexpected new files or any file modifications. If you have shell access, you can write a simple shell script to list all files changed in the last week.
  • Backup your databases and your web site content regularly. This way you can delete everything and then quickly reinstall stuff if an attack is suspected.
  • Use you own custom content management system! - WordPress or phpBB3 is open source and hence people can look for vulnerabilities. If your requirements are simple, you can even look at writing you own stuff. Using custom implementation can stop a lot of automated attacks.
  • Access your web site using browser and then look at the HTML source. If you see spamming links or phishing links hidden in your page, you are hacked. Soon Google will apply search penalty and your site may disappear from its search index.  So delete everything, restore from backup and then upgrade everything to latest version. Then change all passwords!
| Posted in Tech Tips | 1 Comment »

How to close all open popup windows on logout action?

Many Web applications I have seen/worked before use HTML popup windows to handle editor/add new screens.  But unfortunately there are many issues (lack of modal dialog support for example) with popups and hence using them should be the last option. 

How do you close all the popup windows when user clicks on the “logout” link in the main page? I had hoped that there would be some collection in the window object which keeps track of the popups opened from it. But unfortunately there is no such thing. You can use window.opener to find the instance of the parent window, but not the other way around. The only option is to keep track of the popup windows generated using JavaScript.

Following is the approach I have taken. It is not perfect, but so far I haven’t come across any major issues. But if your application is already built and has a lot of window.open() calls, the following approach will affect a lot of source files.

1. Encapsulate window.open() method in a custom application method such as appShowPopup(). The method signature can be same as window.open. This is an important design technique. Whenever you access an important API, it makes sense to wrap it using a application level custom API.

var gblPopupArray  = new Array();
function appShowPopup(url,name,features) {
  for(var i=0;i<gblPopupArray.length;i++) {
    try {
      if(name==gblPopupArray[i].name) {
         gblPopupArray[i]   = window.open(url,name,features);
         return;
      }
    }
  }
  gblPopupArray[gblPopupArray.length]=window.open(url,name,features);
}

2. Inside appShowPopup() keep a track of all the popup windows using a global page level JavaScript array. Ensure that every popup window is named properly using the second argument. Before adding a popup instance check whether there are any instances in the array with same name. If there is one, replace it (instead of adding a new instance to array).

3. On logout, use the popup window array to close all popups. You will need to check the existence of a window before closing. An easier way will be to put the close() code in a try catch block.

function closeAllPopups() {
   for(var i=0;i<gblPopupArray.length;i++) {
         try {
           gblPopupArray[i].close();
         }catch(ex) {}
   }
   gblPopupArray  = new Array();
}
June 18, 2008 | Posted in Programming | No Comments »

How to assemble a multi purpose computer under Rs. 30000

Computer component prices are falling all the time and it is now easy to assemble a high end multi purpose pc just under Rs. 30000. When I say “high end” I don’t mean using the latest or the highest spec components. But rather a machine which can be used for decent gaming, media work and programming applications.

Since this machine is intended for gaming, you need a PCI Express card and that puts atleast an additional Rs. 5000 on the budget. So if gaming is not your passion, you can reduce the budget to Rs. 25000.

CPU - Intel E4600 (Rs. 5000) - Intel E4600 is a decent CPU which has a front bus speed of 800MHz and a processor speed of 2.4GHz.  But there is no virtualization support. If you can spare about Rs. 1000 more you can go for Intel E7200 which I highly recommend. E7200 features VT technology and can support bus speed of 1066Mhz.

Motherboard - Intel DP35DP (Rs. 5500) - Intel DP35DP  (which belongs to the media series) supports upto 8GB of RAM and also supports quad core processors.  Note that there is no built in video and you will require a PCI Express card for display. If you are looking for integrated video try DG31PR in the classic series.

Memory  - 2GB DDR2 800MHz (Rs. 2000) - 2GB of RAM is the minimum you need these days. For an optimum system I would recommend 4GB of RAM.

XFX 8600 GT ReviewGraphics Card - XFX GEFORCE 8600 GT 256MB PCI-E DDR3 (Rs. 6000) - XFX 8600 GT is a good graphics for a fair price. The advantage is that you can play almost all games in decent resolution. In future if you get more money, you can easily replace this with 9600GT which costs about Rs. 10000.  XFX 8600 GT supports dual DVI links (DVI to analog adapter is also included) and hence support 2 monitors at the same time.

Hard disk - Seagate 160GB SATA (Rs. 2000) - Personally I think 80GB harddisk is good enough. If you need more space you can buy an additional disk later. But again since the price difference is minimal, I would recommend 160GB disk.  Note that there are different categories of SATA drive which varies in price and performance.

DVD Writer/reader - Sony DVD (Rs. 1500) - Get the original Sony DVD writer which supports both CD and DVD writing.

Keyboard - Logitech Multimedia USB (Rs. 400) - Get a USB keyboard which works!

Mouse -  Logitech Optical USB (Rs. 300) - Get a USB mouse which works!

Computer display - Samsung 19” LCD 920 NW (Rs. 8000) - I have given Samsung just as reference. Explore a couple of different 19″ models before you purchase one. Most good dealers provide a peek at the monitors before you buy it. AOC is another brand which is very cheap especially for higher models (22″). But I am not sure how reliable those monitors are.

Computer cabinet with 450W SMPS (Rs. 1500) - 450W is the minimum you should look for. Again it is good to spend some more money to get a good cabinet.  Also ensure that there is enough fans for heat dissipation.

The total cost of all the above components is over Rs. 30000. But if you are good in bargaining, you may be able to get this config assembled under Rs. 30000! :-)  Wondering what you will use as operating system? Don’t think of spending Rs. 5000 on a Windows Vista. Instead download or get a copy of Ubuntu 8.0.4.  If you still require a Windows OS, go for Windows XP Professional with SP3.

Following list will give you an idea as to what you can do with this computer.

  • You can play Doom3 at 1280 resolution with anti-aliasing turned on. At around 60fps gameplay is smooth.
  • You can develop Web applications using Eclipse or Netbeans IDE and at the same time run a MySQL server on the machine.
  • You can play a divx/xvid video.  You can also encode a video into divx.
June 16, 2008 | Posted in Build a PC Guides | No Comments »

Installing nVidia drivers on Ubuntu 8.0.4 (Hardy Heron)

nVidia recently has released (May 2008) production quality device drivers for linux 64-bit systems. So if you have Ubuntu 64 bit installed with an nVidia card, download the latest driver from nVidia site.

1. Download 64 bit nVidia driver for Ubuntu. This driver supports the following cards,
nVidia drivers on Ubuntu

  • Quadro FX 3600M
  • GeForce 9800 GX2
  • GeForce 9800 GTX
  • GeForce 9600 GT
  • GeForce 9600 GSO
  • GeForce 9500M GS
  • GeForce 8400
  • GeForce 8400 GS

2. In order to install the latest driver, it must be compiled for the kernel you have. For this you need development tools such as make and gcc installed. You will also require linux-headers package for your kernel version. Packages pkg-config and xserver-xorg-dev are also required.

3. Uninstall any existing nVidia drivers from your Ubuntu installation. This easier said than done. Following are some of the steps you can take to ensure that no obsolete nVidia drivers are used.

  • Remove the package nvidia-glx from the system.
  • Remove /etc/init.d/nvidia-glx and /etc/init.d/nvidia-kernel files.
  • Remove linux-restricted-modules or linux-restricted-modules-common packages.
  • Instead of disabling the above packages, you can edit /etc/default/linux-restricted-modules or /etc/default/linux-restricted-modules-common and add a line, DISABLED_MODULES=”nv nvidia_new”
  • Delete /lib/linux-restricted-modules/.nvidia_new_installed file if it exists.

4. Ensure that the downloaded driver installer file NVIDIA-Linux-x86_64-173.14.05-pkg2.run is executable. You can do this by,

sudo chmod +x NVIDIA-Linux-x86_64-173.14.05-pkg2.run

Then invoke the installer using the command,

sudo ./NVIDIA-Linux-x86_64-173.14.05-pkg2.run

5. The installer can also make the required changes to X server configuration file. Select the required options and continue.

6. Reboot the system. If everything went well, you will see the nVidia logo during the display initialization!

During nVidia driver installation, I encountered a strange problem. Immediately after the driver installation, I was getting complete access to nVidia features and the driver was working. But once I restarted the machine, the display driver was changed and the nVidia features was no longer available. Also the available resolution was reduced. I traced this problem to the existence of generic nVidia drivers still present in the installation. Once I removed every trace of them and re-installed the driver, everything was working in perfect condition!

| Posted in Ubuntu | No Comments »

How to create a cd/dvd iso image in Ubuntu

Recently I needed to backup a couple of cds to a single dvd. The best solution was to extract iso images from cds and then write all of them as data files to a single dvd. I could then use the dvd as a backup. Whenever I needed a cd, I can insert the dvd and then mount the corresponding cd iso image.

How to extract iso image from cd/dvd in ubuntu?

In recent versions of Ubuntu (Hardy Heron etc.), cd or dvd is automatically mounted when you insert them in the drive. So first you need to unmount using the following command (you can also right click on the mounted volume to unmount it),

sudo umount /dev/cdrom0

The above command is used in my system. In your system you may have to replace cdrom0 with dvd or scd0 or even cdrom1 (if you have multiple drives).

Now use the dd command to dump the dvd/cd image to an iso file,

sudo dd if=/dev/cdrom0 of=mydisk.iso

This command will create an iso file named mydisk.iso. Again replace cdrom0 with whatever device name you have on your system for the drive used.

After you have copied all the cd iso files, you can create a new dvd project (using Brasero tool) and then add these iso files as data files. This create a dvd containing these cd iso images.

How to mount a cd iso image in Ubuntu?

Now the question is how to mount these cd iso images when you need the data inside? Well in Ubuntu, it is as easy as issuing a single command,

sudo mount -o loop mydisk.iso /home/jayson/mydisk

Here /home/jayson/mydisk is an existing folder under which the iso image will be mounted.

How to burn an iso image to a cd in Ubuntu?

You can use Brasero tool to burn the iso image to a cd rom. Another option is to use the following command line,

cdrecord dev=/dev/cdrom0 driveropts=burnfree -v -data mydisk.iso
| Posted in Ubuntu | No Comments »

Configuring JNDI datasource in Tomcat 6

I was starting on a new project yesterday and I needed the MySQL connection to be configured as a JNDI datasource on Tomcat 6.  Tomcat 6 has a separate Web page detailing the steps required to configure JNDI datasource.

So following that advice, I copied the MySQL connection java driver (mysql-connector-java-3.0.17-ga-bin.jar) to TOMCAT_HOME/lib and then added the required entries in server.xml and web.xml as given below. Here xpc is the MySQL database instance I want to connect.

server.xml entry (under Context section)

<resource name="jdbc/xpc" auth="Container" type="javax.sql.DataSource"
               maxActive="100" maxIdle="30" maxWait="10000"
               username="root" password="" driverClassName="com.mysql.jdbc.Driver"
               url="jdbc:mysql://localhost:3306/xpc?autoReconnect=true"/>

web.xml entry

<resource-ref>
	<description>DB Connection</description>
	<res-ref-name>jdbc/xpc</res-ref-name>
	<res-type>javax.sql.DataSource</res-type>
	<res-auth>Container</res-auth>
</resource-ref>

Then I wrote sample code to connect to MySQL and select a value from a test table. The code is given below. In this sample, JSP calls the Test class to print the value of temp_val from test table. This code also demonstrates how to connect to a MySQL database using JNDI lookup.

Test.java

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
 
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
 
public class Test {
	public static String t() {
		try {
			Context ctx = new InitialContext();
			DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/xpc");
			Connection connection = ds.getConnection();
			Statement stmt = connection.createStatement();
			ResultSet resultSet = stmt.executeQuery("select * from test");
			while (resultSet.next()) {
				String temp_val = resultSet.getString("temp_val");
				return temp_val;
			}
		} catch (NamingException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return null;
	}
 
}

Test.jsp

<html>
<body>
<%=Test.t()%>
</body>

But when I ran the above code, I got a strange exception give below,

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class ” for connect URL ‘null’, cause: java.sql.SQLException: No suitable driver
 

This came as a surprise since everything was configured as in the documentation. But after a couple of google queries, I came across the cause of this problem. The problem was that I was modifying server.xml instead of context.xml which is present in the same folder! One I copied the “Resource” configuration under Context element of context.xml DB connectivity was working fine.

If you are working on Eclipse, you can change context.xml directly from the “Servers” entry in the project explorer. In case of netbeans, context.xml is created inside META-INF folder of the project which can be changed to include the JNDI configuration.

How to connect to MySQL using JNDI from Tomcat6
1. Copy mysql-connector-java-3.0.17-ga-bin.jar to $TOMCAT_HOME/lib.
2. Add “Resource” entry in context.xml (under config folder of tomcat or under META-INF folder of project).
3. Add “resource-ref” entry in web.xml of the project.

| Posted in Programming | 1 Comment »

Instant domain search tool - 10xwhois ajax domain search

10xwhois instant domain search preview10xwhois is a domain availability checker / whois tool. Using this you can whether a single or a set of domain names are available. Just select your preferred tlds and then enter the domain name you want. Domain availability will be instantly shown. 10xwhois remembers your favorite domain extensions and you don’t need to select it again!

Features

  • Provides instantantaneous domain availability status.
  • Over 25 tlds are currently supported. More will be available in future.
  • Supports multiple tld lookups at the same time.
  • For non available domains, whois service is available.
  • You can use dreamhost to register available .com, .org, .info and .net domains.
  • Saves your preferred tlds and you don’t need to enter them again (browser cookies must be enabled for this).
  • Use keyboard shortcut (Ctrl+S) to save your favorite domain searches temporarily during domain search.

Architecture

10xwhois is built using Yahoo’s JavaScript toolkit YUI. The domain availability is checked using Ajax request and is designed to be extremely fast.

10xwhois project is hosted on a dedicated server (slicehost). This application is built on J2EE stack but doesn’t use any frameworks such as Struts. This application is designed so that large concurrent requests for domain availability can be handled without excessive system resources such as memory. For example, the tld to whois server mapping data is preloaded and is cached at the application level. This ensures that all clients share the same lookup data.

Firebug on YUI download sizeOne of the problems with YUI is that it is heavy. The JavaScript files are comparatively big and over a dialup line it will take a while to download. So if you are using 10xwhois on a slow link, it will take a few seconds for the site to load. This is a one time delay since the JS files are cached by browser. The firebug screenshot on the right side will give you an idea about the download size.

As you can see the total size is over 160kb. Over a dialup line of 56KBPS it will take over 20 seconds for 10xwhois to load. Interestingly 10xwhois is using a very small subset of YUI. For a typical Web application built over YUI, the page download size will come around 1MB! This is an important trade off you need to keep in mind before deciding on YUI toolkit.

Version History

Version Date Change Summary
1.2 11th June 2008 Introduced additional tld support (nl, tw etc. which can be selected from a dropdown)
1.1 8th May 2008 Bugfix release.
1.0 26th Feb 2008 Initial release.
June 9, 2008 | Posted in My Projects | No Comments »

How to build a gaming computer under Rs.60000 ($1500)

Important Note: This article is written in June 2008. In desktop pc market things are changing very fast and hence this article will also be obsolete within a few months!  Also the prices quoted are probably highest in India (since I am in Kerala). You will be able get the computer components listed below at a cheaper price in places like Chennai and Mumbai.

I own multiple desktop pcs at home. Every year I am tempted to buy a new one because last year’s high end pc is this year’s cheap pc and suddenly it is affordable. This time I decided to go for a fairly high end system with a budget of around Rs. 60000 ($1500).  All my existing machines are AMD machines and hence this time I decided to buy everything from Intel. My current AMD machine is powered by an Asus M2A VM HDMI and when it is on my neighbours think that I am operating a drilling machine!

What is surprising is that even today it costs about Rs. 60000 to get a decent desktop pc. Another problem is that many of the top end motherboards/memory modules are not available in the market. Even the leading computer dealer in South India says that there is no demand for DDR3 and hence he doesn’t stock it!

In India, it is very difficult to find a good computer dealer. Most of them will recommend something that they stock even when you give him specific needs. When you ask for DDR2 800MHz memory, he will dump DDR2 667Mhz or lower.  When you say you want a logitech G5 gaming mouse he will say microsoft mouse is better (since it is in stock!). So finalize your computer spec and stick with it when you go for purchase. Identify atleast once replacement for every component (in case the main one is not available).

I decided to go with whatever is available in Kerala market and following is what I assembled,

Processor (Intel Q9300) - When I went for purchase I was thinking of getting Intel Q6600. But Q9300 was available for a slight premium and it offered FSB speed of 1333MHz compared to 1066MHz of Q6600. Q9300 is a 45nm chip with 2.50GHz clock speed and and an L2 cache of 6MB (Yeah, you are correct - I fell for the “dealer brainwash trap”).

Possible processor options you should check out are Q6600, Q6700 (price of which has dropped recently), Q9300 and QX9650 (which belongs to the extreme series).

Intel DP35DP ReviewMotherboard (Intel DP35DP) - I wanted to get hold of Intel MX48BT2 or MX38BT which belonged to the Extreme series and offers unmatched performance. But unfortunately it needs DDR3 which costs a lot (3 times or more than DDR2) and it was not even available in the local market! So the only option left was the Intel D975XBX2 which supports DDR2. Yet again availability was a problem and according to the dealer this board is obsolete.

Then finally I decided to go with whatever the dealer had in stock - DP35DP board which belongs to the Media series.

Memory - I had initially planned a purchase of 8GB of DDR2 800MHz. But I had to reduce it to 4GB after looking at my budget. Anyway you need a 64 bit operating system to get even the 4GB fully utilized.  On Ubuntu 8.0.4 (the 64 bit version), it is showing only 3.8GB as available RAM.

I wanted to buy a high speed version of DDR2, but it was not available. The one I bought was  Transcend JetRam 2GB.

Hard disk - For hardisk I decided to go with Seagate 7200.10 series with 320GB capacity. I initially wanted to buy 2 160GB disks to setup in a Raid 0 formation. But budget was a constraint. I have Ubuntu installed on this harddisk. If I decide to use Windows Vista in future, I will add a 160GB SATA drive. This will eliminate the need for dual boot setup on the primary harddisk. When I want to run Windows, I can just change the boot priority!

XFX 9600GT ReviewGraphics Card - This is one area where I didn’t spend much time. I wanted a new generation card which offered good performance for a price below Rs. 10000. The XFX GEFORCE 9600GT was the perfect match! It has two DVI outputs and hence can be easily used along with two LCD monitors for a dual display setup. It came with a full version windows game Company of Heros.

cooler master 690Cabinet (Cooler Master 690) - The leading market players in computer cabinet/chasis are mercury, iball and intex and I hate all of them. I agree they are cheap, but a badly designed chasis can bring death to your pc sooner than you think. The cooling is mostly inadequate with graphics processors and SMPS is noisy and sometimes unreliable.

Luckily I was able to get a premium chasis called Cooler Master 690. It is a huge chasis and it is easy to install components. There are two main fans which provides adequate cooling and it is relatively silent. There is no built-in SMPS.

Black Diamond 500W ReviewPower Suppy (Black Diamond 500W SMPS) - Most of the builtin SMPS modules which comes with chasis is of low quality. There is a lot of noise and most of them fail before reaching the rated power load. I wanted a quiet SMPS which can drive external graphics cards and two SATA harddisks etc. at the same time. Dealer suggested Black Diamond 500W and I immediatel fell for it. It is a sleek SMPS and delivers what it promises!

500W SMPS is the minimum you should look for when you are buying a gaming PC. If it is a cheaper brand you are looking for then increase this to atleast 600W. From my experience I highly recommend Black Diamond.

22LCD Monitor (Dell 22″ SP2208 WFP) - Don’t even think of CRT monitor now. LCD prices have fallen so much that you can get even a 22″ LCD monitor for Rs. 12,000 (AOC monitor) or less! I finally went with 22″ Dell which has a built in webcam. It is a premium model (response time of 2ms) and I was stunned when I compared it with a 17″ Samsung syncmaster. Man, dell 22″ SP2208 WFP simply rocks! The only downside is that it costs over Rs. 15000. SP2208WFP has 3 video inputs and it can take DVI and VGA inputs at the same time. Using a single button it is possible to switch to other displays.

You can attach upto 3 video sources to this monitor and they can be switched by using a single button on the monitor. One DVI input and one VGA input can be configured at the same time! So you can use this monitor to attach it to two different machines and can switch between them easily! No need for a KVM!

Logitech G5 ReviewMouse (Logitech G5 gaming mouse) - Logitech G5 mouse is one of the best gaming mouse available at reasonable price. It offers adjustable weight and sensitivity (up to 2000 dpi). If you are heavy computer user like me you should look for a gaming mouse like this one. For continuous use, mouse grip needs to be as comfortable as possible.

Logitech G15 ReviewKeyboard (Logitech G15 keyboard) - When you buy G5 mouse, you should naturally look for G15 keyboard! This features a gamepanel LCD to show you how many granades are left and other important information. It also features a six button programmable panel. The only down side is that it is almost 10 times costlier than an ordinary keyboard!

Operating System (Ubuntu 8.0.4 Hardy Heron) - I initially thought of buying Windows Vista, but after trying out Ubuntu, I decided I don’t need it. Ubuntu is a stable and friendly operating system and it meets all that I need from an OS. You may be wondering - why is this guy assembling a gaming pc if he is not using it for gaming!  A gaming pc is a high performance pc and that is what I want :-) and I also wanted to keep that option open - buy a windows vista/couple of kickass games and spend a week of vacation on it!

Here is the final configuration along with the prices (*as of June 2008),

Component Model Price*
Processor Intel Q9300 Rs. 11500
Motherboard Intel DP35DP Rs. 5200
Memory 2GB Transcend DDR2 800 Mhz Rs. 2000 each
Harddisk 320GB Seagate SATA Rs. 3000
Graphics Card XFX GeForce 9600GT Rs. 9800
DVD Writer HP SATA Rs. 1200
Power Supply (SMPS) Black Diamond 500W Rs. 2600
Cabinet (chasis) Cooler Master 690 Rs. 3800
LCD Monitor 22” Dell SP2208WFP (with webcam) Rs. 15800
UPS V-Guard Vismaya Rs. 2835

I am not planning to buy a machine for next 3 years.

PS :- Choosing a desktop pc configuration for your needs is hard. If you are planning to assemble a PC and need any help, you can contact me.

| Posted in Build a PC Guides | 4 Comments »

How to create a new partition in Ubuntu to use free space on harddisk?

During Ubuntu installation I had left some space on hard disk unpartitioned. Later I wanted to use the remaining space as a separate partition mapped to a folder “mywork” inside /home/jayson. Here is what I did to create a new partition and mount it.

First use gparted to create a separate partition out of the free space on the disk. If gparted is not installed use “apt-get install gparted” to get it installed. In gparted I have selected “primary partition” and type as ext3. This type should match the one you will add later in fstab.

sudo gparted
sudo apt-get install gparted

Now edit /etc/fstab file using the command “sudo vi /etc/fstab”. Add a line similar to the following,

/dev/sda4 /home/jayson/mywork ext3 defaults 0 0

sudo vi /etc/fstab

In the above commands, ensure that you replace /dev/sda4 with the new partition created by gparted and /home/jayson/mywork with an existing folder where you want the partition to be mounted. An entry in fstab ensures that this drive is automatically mounted during bootup.

Run the following command to mount the new partition,

sudo mount -a

Now you will see that the new partition is available as a folder. But you will not be able to create anything inside it. Use the following commands to give necessary permissions to create files in the new partition.

sudo chown -R jayson /home/jayson/mywork
sudo chgrp -R jayson /home/jayson/mywork

Now your new partition is ready for use!

June 4, 2008 | Posted in Ubuntu | No Comments »