Way to Change text colour of icon on Desktop|Ubuntu 12.04 desk

If you are jaded with text color of your icons on desktop, then you just need to make few changes. Here are steps:

Go to path:


This path is for Ambiance  (theme in my case), if you are using Radiance or something like that, don’t worry. Make a little change in your path. Replace Ambiance with a theme you are using.

Now, in apps you would find a file “nautilus.css”.

Look for a line:

color: @bg_color;

Replace the @bg_color with hex code of color you want. It would be better if you uncomment the above line and copy it to replace hex code of color.

/*color: @bg_color;*/

color: #FF0000;

Then you will get your own color .Enjoy !!



Drivers are up to date but the keyboard is still not working

So I encountered a weird error. I was installing VM but when I restarted my laptop, my keyboard stopped working K. So I ran Diagnostics to check if it is the hardware issue, which luckily was not. So I used the on-screen keyboard to log onto my system to check if I need to upgrade my keyboard drivers. There was the tiny yellow mark on the near my keyboard driver. And I downloaded newer one from the internet and but that didn’t help either. It said you already have the up to date driver.

I found a very useful link about it – https://support.microsoft.com/en-us/kb/256233

What they said is simple enough but one has to very careful while editing Registry Editor because any mistake can make you reinstall your operating system.

Using your onscreen keyboard, type Regedit in the run. This will launch a window as shown in the picture below.


On the registry menu, click computer and then expand HKEY_LOCAL_MACHINE. Then go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e96b-e325-11ce-bfc1-08002be10318}

Double click the upper filters to remove Lkbdflt2 value.

Then go to other location : HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e96b-e325-11ce-bfc1-08002be10318} and in upper filters  remove Lmouflt2.

Then close and restart your computer. Everything should work fine now.

Install graphics.h in ubuntu

For using graphics.h library in Ubuntu, you need to follow few simple steps given below:

First of all, you need to install few packages. For that, run command this on your terminal “sudo apt-get install libsdl-image1.2 libsdl-image1.2-dev guile-1.8 guile-1.8-dev”

Next you need to install libgraph package. Download libgraph-1.0.2.tar.gz from link:


Extract this where you want. Now navigate to the folder, where you just extracted your libgraph-1.0.2.tar.gz using cd command. Run these commands on your terminal.

> cd libgraph-1.0.2
> ./configure
>sudo make
> sudo make install
> sudo cp /usr/local/lib/libgraph.* /usr/lib

And if you got error message “configure: error: *** SDL version 1.2.0 not found!”, try installing it using: sudo apt-get install libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev”

Another error which you can get is: “configure: cannot find guile-config; is Guile installed?” Solve this by using command“sudo apt-get install guile guile-dev.

If this didn’t helped much, then we have another way to get it work in right way. Use synaptic package manager to install related files.


Now try compliling your C program.


int main()

int gd=DETECT,gm;
int i,x=10;
char str[3]=”0″;

setcolor(12); //outline heart

floodfill(50,50,12); //fill heart

return 0;



Using PostgreSQL on ubuntu 12.04 LTS

PostgreSQL is a powerful object-relational database management system and has  bindings for many programming languages such as C, C++, Python, Java, PHP, Ruby…

Before you use it, you need to install it, ofcourse. To install it run following commands on your terminal:

apt-get install postgresql postgresql-contrib

You can also download it from ftp://ftp.postgresql.org/pub/source/v9.2.4/postgresql-9.2.4.tar.gz and
After you have obtained the file, unpack it:

gunzip postgresql-9.2.4.tar.gz
tar xf postgresql-9.2.4.tar

For the rest of the installation procedure, you need to change into the directory, which you created while unpacking it.

Creating a Database
To create a database, you need to login as a postgres user.

gurpinder@gurpinder:~$ sudo -u postgres -i

To create a new database, issue following command on your terminal:

postgres@gurpinder:~$ createdb testdb
postgres@gurpinder:~$ psql testdb

You should see output similar to the following:

psql (9.1.9) 
Type "help" for help. 

Creating Tables
To create a table in your test database called “student”, issue the following command:

testdb=#  CREATE TABLE student (student_id int, first_name varchar, last_name varchar);

Now if you want  insert a record into the table, use this:

testdb=# INSERT INTO student VALUES (2, 'Gurpinder', 'Chahal');

Now if you want to see the contents of table, issue this command:

testdb=# SELECT * FROM student;

This would produce output similar to the following:

testdb=# SELECT * FROM student; 
 student_id | first_name | last_name 
          2 | Gurpinder  | Chahal 
(1 row)

To exit the psql shell, issue this command:

If you do not want to use your data anymore, remove it by:

$ dropdb testdb

For more knowlegde of PostgreSQL look here: http://www.postgresql.org/docs/9.2/interactive/index.html

How to change text color of icons on your desktop || Ubuntu 12.04

If you are jaded with text color of icons on your desktop, then don’t worry.

Here are simple steps which you can follow to change text color of icons on your desktop.

1. First go to path:


This path depends on theme you chose for your desktop. If you are using some other theme,then just replace my theme_name with yours.

2. Now, here you would find a file named “nautilus.css”. Just open it to make few changes.Look for a line (10th in my case):



3.Replace the @bg_color with hex-code of color you want. It would be better if you uncomment the above line and copy it to make changes.


4. Save the changes and enjoy new look of your desktop. 🙂

Why To Learn XML?

XML is everywhere and is now becoming very important for the web. I think there’s a hardly any field where you can avoid it. XML stands for eXtensible Markup Language and is designed to transport and store data.

A markup language is one which uses additional items (called markup) to create a document.

Now, you would be wondering what the word extensible mean here!!

XML is called extensible ( http://en.wikipedia.org/wiki/Extensibility) as it allows the author of the document to define the markup elements by their own.

This is really very easy to learn. For this, you need to have basic knowledge of HTML and javascript (these are one of the easiest languages in world).

XML is much like HTML. Here you must not confuse. These both languages are made for entirely different goals.

XML was designed to store as well as exchange data and HTML to display data. In XML, tags are not defined. You have to define your own.

Here you make all the commands (like a boss). So, you can call it a user made language.

XML does not DO anything, it is just to store and transport data. Infact, it is just information wrapped in tags.


Now, here’s question which usually comes into mind, why we need to learn XML then?


Its feature which really fascinated me is that it supports UNICODE. So every human language can be communicated using XML.

In XML, you can invent your own tags. Unlike HTML, you don’t have predefined tags here. XML is also platform independent and so technological changes doesn’t effect it.

A lot of new Internet languages are created with XML such as XHTML, RSS ,WSDL (for describing available web services ), SMIL (for describing multimedia for the web).


Now, if still these things dosen’t convince you, then I would say:

Why To Leave A Thing Which You Can Learn In About Half An Hour??


The only code which you need to learn in XML is:


<?xml version=”1.0″> and some grammar rules you need to follow.


Just take a look to this video to see what you can do in just four minutes 🙂




“He that can have patience can have what he will.” ― Benjamin Franklin

Though this post has nothing to do with my training, but still I learned a big lesson from my experience.On Tuesday, while coming back from Kamal’s home, wasp (or some poisonous insect)  stung me on eye. It hurts so bad you want to cry but instead I went to doctor , got a treatment in about one minute.

My eye, however, swelled shut and the whole side of my face swelled to the size of an watermelon.
Even my other eye got swelled too. I was unable to see anything from my one eye and it was irritating too.

I again went to doctor again and asked him to do something for my swelling.But he replied calmly that we don’t have a medicine for swelling (that was really more irritating) but has a weapon to fight with it, that’s the patience.He further said that you can thank GOD  for you are not born like this.Be patient and enjoy every moment of your life.

Though this wasn’t a good experience but from I learned a big lesson from it.