Close a program from terminal in Ubuntu

Step 1. Find “process ID” of the program

Each program/application in Ubuntu has a process ID. type the following command to get it’s process ID. In the example, I’m assuming the program is “jdownloader”

ps aux | grep -i jdownloader

Now you’ll get an output like the following image. Look at the process ID (marked by yellow background):

Step 2. Kill it!

Once you’ve grabbed the process ID, you can close it by this command:

kill -9 process-id-of-the-program

So, for our example where process id is 19641, we should issue following command in the terminal:

kill -9 19641

iPod iPhone (mp4) video converter for Ubuntu: DVD VOB, MPEG-TS, Matroska, AVI, mpeg-4 to MP4, MKV, and M4V

I’m talking about Handbrake. It has a GUI interface. It runs on windows, Mac as well!

Supported file formats: (copied from wiki)


  • DVD, DVD image, DVD VOB files, MPEG-TS, Matroska, AVI, mpeg-4, etc
  • Any DVD or Bluray-like source: VIDEO_TS folder, DVD image, real DVD or bluray (unencrypted — removal of copy protection is not supported), and some .VOB, .TS and M2TS files
  • Most any multimedia file it can get libavformat to read and libavcodec to decode.

Handbrake cannot at present encode from DRM-encrypted videos purchased from iTunes or found on DVD or Blu-Ray discs. However, if VLC is installed under a Unix-based system, encrypted DVDs can be read as well.[2]


Install on Ubuntu

For Ubuntu (9.10 & later) users: run in terminal:

sudo add-apt-repository ppa:stebbins/handbrake-releases
sudo apt-get update
sudo apt-get install handbrake-gtk

Ubuntu Older versions:

Click “Read about Installing” on this page

Loving Ubuntu 11.04 with customized Theme! (with Murrina-LemonGraphite, Equinox Evolution, JiniOrange)

I’ve downloaded Ubuntu 11.04 and already loving it. 😀 I installed my favorite themes, & once again, satisfied the way it looks.

Here is the detailed description of my customized theme:

Controls: Murrina-LemonGraphite

Window-Border: Equinox Evolution Rounded

Icons: JiniOrange

How To Install?

  1. Right click on your desktop, select “change desktop background”
  2. In the Themes Tab, Click “Install”
  3. Browse the downloaded file

Thus you can install these downloaded theme components. Once installed all the files, you can click “customized” to separately select Controls, Window Borders, Icons etc. 🙂

PostgreSQL with PHP in Ubuntu: Step-by-Step How To!

This document is for latest version of PostgreSQL: 8.4, but it should work in any newer versions, as long as you change the commands appropriately, replacing the version mentioned with correct version 🙂


Install PostgreSQL:

sudo apt-get install postgresql

Install GUI Administration application:

sudo apt-get install pgadmin3

Install PHP based Web Administration site (like phpMyAdmin for MySQL database):

sudo apt-get install phppgadmin

I found this helpful, because it installed all dependant packages required to access postGRE database from PHP 😉


Configure so that you can access via localhost:

gksudo gedit /etc/postgresql/8.4/main/postgresql.conf 

It witll open the file for editing, Add following line at the end of the file:

listen_addresses = 'localhost'

Save and close the file. Open another file for editing:

gksuso gedit /etc/postgresql/8.4/main/pg_hba.conf

Replace “local all all ident sameuser” with:

local   all         all                               md5

Change Password for root user

In PostGRE, root user is “postgres” which by default, does not have any password. Enter following line in terminal to set a password for it:

sudo -u postgres psql template1
ALTER USER postgres with encrypted password 'your_password';

Create a new User & a new Database

sudo -u postgres createuser -d -R -P new_username
sudo -u postgres createdb -O new_username new_database_name

This will create a new user, with username “new_username” and create a new database “new_database_name” and set “new_username” it’s owner.

Configure phpPgAdmin

I assume you already installed phpPgAdmin by:

sudo apt-get install phppgadmin

Then, configure Apache:

gksudo gedit /etc/apache2/apache2.conf

Add following line at the end of the file:

Include /etc/phppgadmin/apache.conf

All done! Restart to reflect changes…

sudo /etc/init.d/apache2 restart
sudo /etc/init.d/postgresql-8.4 restart

Access phpPgAdmin

type http://localhost/phppgadmin in your browser & log in by the username you just created (new_username)

Use GUI Administration application

Run following command in terminal:


Access from Terminal:



Download & Install Sun Java Jdk in Ubuntu 11.04

I had to install Netbeans & JDK in some PCs with no internet connectivity. That’s why, I needed to know how to install Java JDK properly and configure it. Though I mentioned Ubuntu 11.04 version, it should work with any version of newer Ubuntu.

Download Sun  JDK

Download the .bin file from official site.

Create Installation + Configuration Scripts

  1. Copy this code to a file name and put it in the directory where you put the downloaded jdk. When I prepared this script, jdk version was 1.6.0_25, if you install an upgraded version edit line #4 accordingly in this script.
  2. Now Copy code from this link & save it in a file name, put it in the same directory where you downloaded jdk.

[Note: I copied the original script from the link provided at the end of this article]

Install “java-common”

I’ll find an offline installer of this package and add later. Till then, you can install it by :

sudo apt-get install java-common

Ready to Install!

Right click all the three files (the JDK, & and select properties. In the Permissions tab, put check mark on “allow executing file as program”

Then open a terminal, go to this directory where all these files exist (to avoid trouble you can put all these files in your home directory) and type:


That’ll do 🙂


Canon Lide 100 Scanner in Ubuntu with sane: Installation & Permission Fixes

At last I managed to make my scanner (Canon canoscan Lide 100) work in my Ubuntu (10.04). I was having a lot of problems and was having problems with permission. I don’t know if I was having problem with installation, either. So, rather finding out what fixed the problem, I’m describing all I did.

Note: Though i mentioned canon Lide 100 at the title, the tutorial is applicable for any scanners supported by sane-genesys 5! You may check here whether you’ve a supported scanner.

Compile SANE

We will use sane-genesys as backend for scanning, which now supports Lide 100 along with a lot of different scanner models. You can check if your scanner is available, by using this page.

This portion is copied from the links i mentioned at the end of this article. Open a terminal and paste following:

sudo apt-get install libusb-dev build-essential libsane-dev
sudo apt-get install git-core # Only if you don't have git installed
git clone git://
cd sane-backends
cd sane-backends
export BACKENDS="net mustek mustek_usb genesys"
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
sudo make install
sudo gedit /lib/udev/rules.d/40-libsane.rules

Gedit will open a file for editing, paste these lines at the end of the file:

# Canon CanoScan Lide 100
 ATTRS{idVendor}==”04a9″, ATTRS{idProduct}==”1904″, ENV{libsane_matched}=”yes”

Save the file and close gedit, reboot your machine.

Or, Install from PPA.

Now, you should see your scanner listed by the following command:

scanimage -L

If you find nothing, try:

sudo scanimage -L

If now you find your printer listed, skip to next section. Otherwise, execute following command:

sudo cp ~/sane-backends/backend/ /etc/sane.d/genesys.conf

Now, check again by typing sudo scanimage -L; if it still says it cannot find the scanner, check by typing sane-find-scanner in the terminal, the scanner should be listed under available USB scanners. If you don’t find it listed here, you’ve done something wrong while installing SANE or the scanner may be disconnected/malfunctioning 😦

Setting Permissions

If you don’t set permission for general users, only the root will be able to scan (which is considered dangerous). First run the following command:

sudo scanimage -L

This will give output like:

device `genesys:libusb:XXX:YYY‘ is a Canon LiDE 100 flatbed scanner

Now execute following line in terminal replacing the parts as colored.

sudo chmod 0777 /dev/bus/usb/xxx/yyy

You’ll be able to enjoy your scanner now! Test by running some GUI front-end, like xsane or Simple Scan (you can find these at Software Center)

Note: You may change permission every time you disconnect & then connect your scanner.

Links those helped