E: Sub-process /usr/bin/dpkg returned an error code (1)

I recently ran into the following error in Ubuntu (v 13.10).

E: Sub-process /usr/bin/dpkg returned an error code (1)

Due to this error i was not able to run the update. Here is the fix to this error.

First run:

$ sudo apt-get remove install-info

Then run this command to clear apt archives:

$ sudo apt-get clean

Then finally run

$ sudo apt-get update
$ sudo apt-get upgrade

Setup Google App Engine Python SDK in Ubuntu

First of all download Google App Engine SDK for Linux.

Extract it anywhere within your local folder. It can be anywhere such as in your home directory or Documents directory.

Open terminal (ctrl+alt+t) and navigate to your home directory and open .bashrc to edit with this command:

$ sudo gedit .bashrc

At the end of the file, add these lines by changing the directory to your google_appengine folder. The first line is just a comment and in the second line /usr/local/google_appengine is the path to the google_appengine folder.

### Added for GAE
export PATH="/usr/local/google_appengine:$PATH"

Now restart your computer and then you should be able to use $ dev_appserver.py command from anywhere.

How to remove launcher icon from Gnome launcher Bar

Because i am not a big fan of Ubuntu’s Unity, i am using Gnome desktop environment in Ubuntu 13.10. I have a shortcut for Chromium, Firefox etc in the Gnome launcher.

remove gnome launcher

But when i tried to remove the launcher from there. I was not able to remove, when i right click on the icon i only saw Launch and Properties option.

Then finally i was able to remove it. To remove the icon from Gnome launcher just hold on Windows + Alt key then right click on the launcher icon. Now you will see Move and Remove from Panel option.

Click on Remove from the Panel then remove the launcher which you do not prefer to keep.

sudo: unable to resolve host Dell-Inspiron-3421 in Ubuntu

I was changing the hostname in Ubuntu 13.10 but after changing the hostname i got this error: “sudo:unable to resolve host Sudeep-Inspiron-3421”.

I got this error because we need to have same hostname in both the file(hosts and hostname). To fix this error type the following in the Terminal to open the file and write the same hostname in both the files (hosts and hostname).

sudo gedit /etc/hosts/

In this file generally the hostname in written in the second line. You will see the first two line similar to this:
127.0.0.1 localhost
127.0.1.1 Dell-Inspiron-3421

Next enter this in the terminal and write the same hostname written in previous file.

sudo /etc/hostname

Now restart your computer and you will not get the error.