Ubuntu 12.04 Quick User Review

Using Ubuntu 12.04 and quite satisfactory so far! I’ll update this post regularly as I continue using it!

Pros (+)

  1. It’s cool! My Notebook was getting extremely hot and was getting turned off in Ubuntu 11.10. The notebook (Dell Inspiron 14z) is remaining cool most of the time. Even if when it get’s hot, it cools down after some time.
  2. The Network Manager is improved. In previous versions of Ubuntu, network manager could not re-establish a connection if my wireless router was turned off by power failure. But in 12.04, network manager can re-establish WiFi connection after it gets disconnected from wireless router.
  3. The look-&-feel is improved. Window movement, animations are catchy. It’s really looks cool!

Cons (-)

  1. Like previous versions, it happens to freeze – so far it happened once in the week. Everything in the screen just freezes and I have to restart using Power switch.
  2. Skype hangs some time when starting, and after that, it closes. And the whole OS acts weird. I can not find apps searching in the launcher, the problem only solves after I log-out & log-in again.
Advertisements

Automount, Execute or Own File system/disc partition/drive in Ubuntu

Let’s say, you have an NTFS drive which you want to mount automatically every time you boot your Ubuntu machine. In addition, you want to execute files from that drive, or own that filesystem. For all these, you need to modfiy a file located as /etc/fstab

1. Identify the disc partition

Type in terminal:

sudo fdisk -l

This command will output all the partitions. Look a the first column, labelled as “Device”. Let’s say, your desired partition is /dev/sda2

2. Create a directory to mount the partition

You need to create a directory where the filesystem will be available. Typically, these directories are created in /media location. Let’s say,  you want your filesystem to be available at /media/myNewDrive location. So, type in terminal:

sudo mkdir /media/myNewDrive

3. Edit /etc/fstab file

We’re almost done! Type in terminal:

gksudo gedit /etc/fstab

This will open the file for editing. Add a line at the bottom of the file like this:

/dev/sda2    /media/myNewDrive    ntfs-3g    auto,user,exec    0    0

Wondering what it means? Please visit this link, all of the fields (columns –  you can see there are 6 columns in the line above sperated by spaces) are nicely explained. You will need one line like this for each of the partitions you need to automatically mount/execute etc.

4. Save & Reboot…

Save the file & restart your machine to see effects.

To see various options available, study materials at following links.

References

https://help.ubuntu.com/community/AutomaticallyMountPartitions

http://www.tuxfiles.org/linuxhelp/fstab.html

A sample /etc/fstab file

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 🙂

Installation

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 😉

Configuration

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';
\q

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:

pgadmin3

Access from Terminal:

psql

References

https://help.ubuntu.com/8.04/serverguide/C/postgresql.html

http://solyaris.wordpress.com/2008/08/09/setup-postgres-in-ubuntu/

https://help.ubuntu.com/community/phpPgAdmin

How to Install Java JDK & Netbeans in Ubuntu

Every time you make a fresh installation of ubuntu, you need to download large software packages again. So the best way to save time is to download the installer files and store it in a different hard-disk drive. Later, we can simply double-click the installer file to install the application!

This tutorial is not only for Ubuntu Netbook remix. It can be used at any version of Ubuntu 🙂

1. Install JDK

We will use OpenJDK as your default JDK. JDK is needed to develop applications in Netbeans. Alternately, you can use Sun JDK

To install OpenJDK, type in terminal:

sudo apt-get update
sudo apt-get install openjdk-6-jdk

2. Download Netbeans from Official Site

Now we will download Netbeans. Go to Download link below:

Download page. Choose options you need.

3. Install

When download is completed, you will find a .sh file waiting for you. Give it executable permission- Copy the file to your home directory. Then open a terminal and type:

sudo chmod a+x filename.sh

Now, Simply double click it to install.

Alternately, you can run it from terminal. Copy the file to your home directory. Then open a terminal and type:

sudo sh filename.sh

Of course, replace filename.sh with the filename you just downloaded.

Now, store the large downloaded file to a safe location so that you may use it later, when you re-install Ubuntu!

Repair Ubuntu boot (grub) after installing windows

After installing windows, you will find your Ubuntu wiped by windows! That means your ubuntu is not available at the Boot Screen also it is still in your hardisc.

  • 1. Boot from a Live CD,  use Ubuntu 8.04 or higher.
  • 2. Open a Terminal.
  • 3. Type ” sudo grub”  in the terminal. It makes a GRUB prompt appear.
  • 4. Type ” find /boot/grub/stage1“. You’ll get a response like “(hdx,y)
  • For example,  “(hd0,3)“. Here x = 0, y = 3
  • 5. Type “root (hdx,y)” note the space between root and (hd0,3).
  • 6. Type “setup (hdx,y)“. This is key. You may also type “(hd0)“, and that’s fine if you want to write GRUB to the MBR. If you want to write it to your linux root partition, then you want the number after the comma, such as “(hd0,3)”.
  • 7. Type “quit“.

That’s so simple!