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 Havij in Ubuntu 12.04

Havij is SQL Injection tool and provides us with features for exploiting the SQL vulnerability.By using this software user can perform back-end database fingerprint, retrieve DBMS users and password hashes, dump tables and columns, fetching data from the database, running SQL statements and even accessing the underlying file system and executing commands on the operating system.

Havij runs on windows based operating system. However you can use Wine to get havij in Linux.Here are few steps for installation of havij on your ununtu machine.

Open your terminal and give a command to install wine.

            sudo apt-get install wine

Then, download Havij using command:

          wget http://itsecteam.com/files/havij/Havij1.15Free.rar

You can also download it from http://www.itsecteam.com/products/havij-v116-advanced-sql-injection/index.html.Now, Untar the file using:

           unrar x Havij1.15Free.rar

Right click on the Havij .exe file and Choose Open with Wine Windows Program Loader and install it.


Screenshot from 2014-03-03 11:45:37


Free version of Havij is limited in some features, one can purchase the commerical version at http://itsecteam.com

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

Know more about your installed Debian Packages

Here you will find all the commands which will tell you about your debian packages.

1. Now, if you are looking whether you’ve downloaded packages or not , then try these commands:

apt-cache search 'foo*'

That is how you tell apt to search the packages you’ve downloaded.

2. Another command which do the same in some different way is:

dpkg-query -l 'foo*'

3. Now, if you want to see the description of your package, use something like this:

apt-cache show postgresql

This displays what the package is designed to do, version info and so forth.

4. Now, if you are wondering which all packages are installed in your system, run this on your terminal:

dpkg -l

5. Now if you are thinking of viewing all installed packages along with there description, use this one:

dpkg -l \*
dpkg -l '*'

These list all packages. (Without the star glob, dpkg only lists installed packages.)

5. To Finds installed packages marked to be purged, put this on your terminal:

dpkg -l \* | grep ^pi

6. This lists packages marked for installation, that aren’t installed yet.

dpkg -l '*' | grep "^i[^i]"
dpkg -l \* | grep '^[^i]i'

7. And if you are looking for installed package with all its files(with full paths), then how about this:

dpkg -L php5
gurpinder@gurpinder:~$ dpkg -L php5

“You can have it all. Just not all at once.” ― Oprah Winfrey

Time is less,and I have really many things to do. I have to make up for the year I wasted. I’m really getting attracted towards everything related to computers. I have bookmarked many pages (thinking I’ll do them later). Yesterday, I started doing many things all together. And I shouldn’t forget to mention here thoughts revolving in mind- developing a plugin for QGIS, doing project in BRL CAD. And in evening, I end up doing nothing. 😦

So, today I didn’t even thought of doing hundred things together.

Everyday Parbhdeep calls me early in morning (sometimes even before I’m fully awake) saying that she is bit worried (sometimes with errors, and sometimes with project). Her phone just works as a boost to me though makes me sad sometimes. The thought, that I always take little longer than others to work with my errors, frustrates me. The project is almost complete now, though hundred small things are left and we learned thousand small things too. I’ll complete those small things soon.