The Ubuntu Interface

Well, I didn’t talk about the Ubuntu interface much in my first post.

The top-panel:

Well, its simple, clean and neat interface. You’ll find a panel on top of the screen (Yes, its called a panel). You have multiple menus on panel and you have the liberty to add more custom menus. By default, it has ‘Applications’, ‘Places’ and ‘System’ menu. The right side of the panel has the date and time along with other icons that are hidden. Its more like the taskbar of windows.

Applications: It houses all the executable applications that you have installed on your system so far. It has sub-menus for all the categories like Accessories, Internet, System tools, Sound and Video etc. I like the fact that all your applications go right into its respective category rather than cluttering in one place.

Places: It contains all the places you can go to. No pun intended there. By ‘places’ I mean the locations on network and on your disk. It has shortcut to all your sik partitions, your home folder, other common folders and network places. You also have the option to search for files in this menu.

System: As its name suggests, System has everything to do with how your Ubuntu works. You can modify the system settings and other application settings in this folder. This menu has two important sub-menus – ‘Preferences’ and ‘Administration’. In ‘Preferences’ you can modify different application settings as well as some hardware settings and system settings. In ‘Administration’ you can administer your system ie. create users and groups, test your system and install new software (the most important option). You also have option to shut-down, log-out and lock the system. You also have a help option here which contains basic to advance how-to’s for ubuntu and command reference.

When I first explored these menus, the applications were just a few. I knew for a fact that Ubuntu came with lots of applications pre-installed. I started to search for the option to display all the apps.

To-unhide the apps in the menus:

Right click any of the menu and select ‘Edit menus’. The interface is pretty simple and user-friendly. To unhide the apps, click the application under any sub-menu and checkmark it. You can add new menu and new items. As simple as that.

You can also add common applications directly on the panel, just like a quick launch (on windows). Just drag the app and put it there. Simple, eh?

The desktop/workspace:

You get enough a normal looking desktop with icons to mounted drives on them added dynamically when they are mounted. You can add all the icons you want here. Changing the desktop background couldn’t have been simple. Right-click on the desktop and select the option to change background. Select the file and its done.

Note that the background will revert to default if the background picture is in one of the other partition since drives are unmounted by default in ubuntu on start-up. I will write another tutorial to auto-mount the drives which solves this problem (find that tutorial here). Another temporary solution is to copy your wallpaper to your home drive and selecting it as the background.

The bottom panel contains all the running application, a button to show the desktop (by minimizing all the applications), button to trash folder and workspace buttons (one for each workspace for easy switching).

As you must’ve figured out, the interface is pretty neat and clean.

Though you might feel the workspace a much smaller than it looks on windows and the font to be really really ugly. Well, you can always change that.

Well, forgive me for my noob review of the interface and not posting screenshots but its only my 4th day with Ubuntu.

Finally this is my screenshot. Kindof messy, but this is it I’ve been able to achieve so far with the looks. Hey, not bad for the 4th day, is it?

Comments are more than welcome!!


Moving my firefox profile from windows to ubuntu

The only thing most of the people do on computer is surf the Internet. And for surfing Internet, the best browser, IMHO is Firefox (thankgod, someone made it). I use many plugins in firefox which make my life easier as well as help me in debugging my web applications.

I logged back into the windows (I didn’t want but there was no other way), and opened firefox. I already had FEBE plugin installed in firefox which is an awesome plugin which will back-up your bookmarks, extensions, themes, cookies, history etc, in one single archive. I backed up my profile and it took around 2 minutes to complete backup. I restarted and booted back in Ubuntu. I launched firefox, and installed FEBE and restored it by going to:
Tools menu -> FEBE -> Restore profile

I selected my backed up file.

Within 10-15 seconds, the profile was restored without any errors. I restarted my browser and found my firefox same as it was in windows.


My first day on Ubuntu – Installing Ubuntu

It feels so good typing this post in Ubuntu. Finally, I made it. After postponing installing Ubuntu for complete one year due to HDD free-space constraints, I finally dragged my lazy head and burned half a dozen dvds to get free space of 20 GB. I thought it was more than enough, so didn’t burn any more.

Then, I googled if Ubuntu could be installed on NTFS and was disappointed to see that although it could be installed, it was highly unrecommended. So I needed to make unallocated space on my HDD so that Ubuntu could automatically make Ext3 partition on that unallocated space.


Unallocated Space: The space on HDD which has no filesystem applied to it.

To do this, I ran Powerquest Partition Magic 8. The resizing of partition required reboot and so, I did. An error occured so I was in trouble now. I searched for a free partition manager tool on google and most of the results pointed to easeus partition manager. Without thinking twice, I downloaded the setup and installed it. It required a reboot too for resizing the partition. I was doubtful that this would work. I rebooted and it did work. It took around 30-40 minutes to resize the partition. Although, it was slow, it did work. I now had to just install Ubuntu. I inserted the CD and proceeded with the install. When it told to choose the partition, I chose  ‘Use the largest continuous free space’. It took around 15 minutes for installation to complete. I rebooted into xp just to see if the xp still worked (I was paranoid, lol). It did work. So I booted into ubuntu and started exploring it. Although this wasn’t the first time I was using Ubuntu, it certainly was the first time I used installed Ubuntu on my laptop.

It looked good and fast. The first thing I did was check if my wlan worked, since linux have a tendency to not work with wlans, webcams, bluetooths etc. But to my amazement, all these things worked.  I connected to my AP and fired up the Firefox from the top bar.

Browsing was as fast with firefox. I now had to go to windows xp to backup my Firefox profile using FEBE and restore it in ubuntu using the same plugin but I didn’t want to go back to XP :P. I decided to do it later.

I logged into msn im, using Pidgin which was in the Applications->Internet by default. The Application menu looked scarcely populated which was unusual. There should’ve been lots of applications there. So I thought they must be hidden. I right-clicked on ‘Applications’ and clicked on edit menus. I checked all the applications in all the menus. The menu looked more complete now. I love this feature on Ubuntu/Linux where applications automatically are categorised into appropriate categories in Applications menu unline windows where the Menu gets extremely cluttered after few months. I hope this doesn’t happen with Ubuntu.

I tried my hands on installing new applications. I tried to install virtualbox. I downloaded the appropriate package from its site and double clicked the installation file.

I then tried my hand at installing few apps. I did install Sun’s virtualbox, Gyachi (yahoo messenger alternative), amsn (msn messenger alternative).

I will keep exploring for today.

For people who are new to Linux: Read this

Its an awesome article (I read it as recommended by Shantanu Tushar).


Get Auto Increment value from MySQL table

Many a times we require the next Auto Increment value from a MySQL table. Most of the people would do something like this:

$query = "Select MAX(id) from users";
$res = mysql_query($query);
$row = mysql_fetch_assoc($res);
$maxid = $row['MAX(id)'];
echo $maxid;

This would give correct results but if we delete the latest row, it will start to give wrong results.

We’ve got another query which can be used to get correct ‘Auto Increment’ values from the table.

$query = "SHOW TABLE STATUS LIKE 'users'";
$res = mysql_query($query);
$row = mysql_fetch_assoc($res);
$maxid = $row['Auto_increment'];
echo $maxid;

This will always give correct values for Auto Increment.

Re-detection of DMA mode in windows xp

My desktop computer was running extremely slow but it wasn’t like this before. Even formatting didn’t help, so I knew for sure that there was a problem with hardware. I was right on that, DMA mode wasn’t being detected by XP.

For your knowledge, DMA (Direct Memory Access) is a mode supported by modern hard-disks/DVD drives for much faster access times to device. To check if your HDD’s working on DMA mode, follow these steps:

1. Open Device Manager.

2. Expand IDE ATA/ATAPI Controllers to display the list of controllers and channels.

3. Right-click the icon for the channel to which the device is connected, select Properties, and then click the Advanced Settings tab.

4. Check the Current Transfer Mode: If it is in PIO mode, that means that it isn’t working in DMA mode. Try selecting ‘DMA if available’ from Transfer Mode and restart and recheck if the mode changes to DMA. If it doesn’t change, that means either your HDD doesn’t support DMA mode or the registry entries need to be deleted so that Windows XP redetects the mode on startup.

Automatic method for deletion of registry keys:

Download this vbs script:

Execute the script and everything will be done automatically. This is the recommended method.


Manual method for registry keys deletion:

1. Open RegEdit.

2. Navigate to the following KEY:

3. It will have subkeys such as 0000, 0001, 0002, 0003, and so on.

4. Inside each key, delete all entries of the following values:

5. Restart the computer. Windows should now redetect the DMA settings.

[Solved] Absolute positioning and screen-resolution problem

Absolute positioning is great for positioning items anywhere on a page but it does not mix well with screen-resolution. It might look fine on your resolution but it might look completely different on another resolution. Element placement changes upon changing the screen resolution or even when resizing the browser window. It is because items positioning is measured from the browser’s window.

To always display it correctly, you can put relative or absolute positioning on the parent element.


Hello World!


Edit registry without windows

Many a time you will want to edit your registry when you get your windows screwed and it refuses to boot up.
You know what changes should be made in the registry to fix the problem, but you don’t have any way to fix it. I had a similar problem and I used this tool to edit registry:

This is a non-GUI bootable app. You should be familiar with the command-line and how it works before using it otherwise you may get into deeper problems.

This is another tool which I found while googling:

I hope this helps all you people who are thinking to reformat your computer because of registry errors.


Debugging Javascript In Internet Explorer

Internet explorer has always been a programmer’s nightmare. You have finished a wonderful looking site, full of javascript effects just to find out that it doesn’t work in Internet Explorer. Its a real pain in the neck to find out which part of the script is causing errors in Internet Explorer.

In Firefox, we have tons of debugging option including the default error-console, firebug, etc which are very good tools. But in IE, the default error reporting mechanism shows wrong line no. most of the time, so its pretty useless.

I searched for debugging tools for javascript in IE and came across JS Companion. Its a pretty good addon for IE which can help you debug javascript easily. It solved my problems in seconds. They also have other addons for IE which gives pretty much same functionalities as firebug gives in FF but they aren’t free.


The best way to earn online

I’ve come across many sites, forums and blogs teaching thousands of methods to earn online. Some would really zoom past your head if you don’t know basic marketing tricks. There are Paid To Click, Paid to Post, Paid to Read, Paid to Write and Paid To *insert anything here*. XD

Anyways, I’ve tried various methods but succeeded in none of them. Maybe because I get bored easily and don’t have so much patience. People would wait for months to earn 10$ from a Paid To Post forums. I just can’t do that. I can’t really post to get paid. If I feel like posting, I will… if I don’t, I won’t. So, these methods were pretty useless for me.

The method that worked for me the best was Freelancing. No, freelancing just doesn’t mean programming. You can freelance for almost anything including writing, designing, programming.. anything you are good at. Freelancing is something you’d love to do. It’d make utilizations of your skills and earn you some money. It will help you earn much more than any other method. Many people do full time free lancing and easily earn their living with it.
Their are many websites offering freelancing services to users all around. Some of them the best are:





There are hundreds of more sites like these just a Google away. You can try your skills on these sites and monetize your talent and earn 1000s of bucks weekly/monthly depending upon your capability.

Stop wasting time in other online earning programs. Instead, take some time to develop skills and get on these sites to earn lots of money. No need to start websites or clicking on ads. Just exploit your talent.


Happy earning online!

Searching for a text string in all files and directories recursively in PHP

Sometimes you need to edit some part of your website and unfortunately it isn’t made by you. You will, obviously, need to search for the file in which that particular part of site exists. In CMSs/forums/blogs, it get really hard to search it manually.

I was having a similar problem. I needed to edit the footer of my site but I didn’t know which file, out of 100s, had that particular part. I just made a script for that.



$query="find . -exec grep -l $query {} ;";



Save this file as textsearch.php in your root directory. Now visit the site

And voila! You get the results.


DisclaimerPlease note that this should be used only by webmasters as a quick tool to find specific strings within all files without having to download all the files to local computer. While this method is not recommended, this can be used as a temporary tool only. This file (textsearch.php) should be deleted as soon as your work is done with it for security reasons. I won’t be held responsible for any damages caused.