Auto-start VIMTree when loading VIM

Goto Command Prompt

Go to Vimrc by typing              ~/.vimrc

and then add this  to the file

autocmd VimEnter * exe ‘NERDTree’ | wincmd l



open vim and VIMTree should start automatically


auto start RVM evertytime you start terminal on ubunu

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

From: ~/.bash_profile file

To: ~/.bashrc file


ok. here is (hopefully) a nice simple set of instructions for recent converts.

1) open up your prefered command console. I use yakuake (absolutly amazing program, but you can also use konsole or any other equivalent)
2) sign in as the super user by typing in “su” (enter) then entering your root password when prompted.
3) then go to the directory (folder) where the .tar.gz file is located. for example if it is in your home folder type in “cd /home/” and hit enter
4) type in “tar -zxvf ” and hit enter this will extract the files and create a new directory (folder)
5) go into that folder using “cd ”
6) enter in “./configure” into the command line. this will configure the files. (answer any questions asked)
7) when that’s done enter in “make” into the console.
when that’s done enter in “make install”

And you’re all done!!!

If you’d like to move the folder you may, but don’t delete the folder because it comes in useful if you’d like to uninstall the program

sample PHP


Make your linux ubuntu look like a mac – hardy heron

Make your linux ubuntu look like a mac – hardy heron

source :
MAC OS has been traditionally known for their impressive graphical interface and stability. Now even though i have been an avid Linux follower over the past 9 years I have been using Linux still i find my self attracted to MAC OS .Now even though these days it’s possible to run Hackintosh on normal Intel hardware but it’s not stable and well there are hardware compatibility issues . So well other alternative to using MAC OS is either to purchase MAC hardware(which would be naturally expensive) and run full fledged MAC OS or you could tweak and customize your Ubuntu desktop to look more like MAC OS X .

In this tutorial i describe step by step how to make your Ubuntu 8.04 desktop look more like MAC OS X Leopard 🙂 .
Installing Cursor , GTK and Icon Theme

To install cursor,gtk and icon theme first download the package from the link given below :

Now to install the theme package we have created in the above step , go to (System -> Preferences -> Appearance) and click Install and point to our newly downloaded Mytheme.tar.gz archive.

This should start installing the theme package (Cursors/Icons/Theme) once installation is completed . Chose Customize in theme and click on Customize .

You will find a window like this:

Customize Dialog Box

In this window in Icons chose LeopardX , in Controls Mac4Lin_GTK_Aqua_v0.3 , in Window Border Mac4Lin_GTK_Aqua_v0.3 and in Pointers White Cursor .

If you have followed the steps properly the theme and icons should have been installed , and you should be able to see the new theme applied to your default desktop .

Enabling Compiz Graphic Effects and installing Mac4Lin Theme

Ubuntu 8.04 comes with Compiz Fusion pre-installed and on supported hardware offers a wide array of Visual Effect . Now depending on graphic hardware of computer one could chose from three level of Visual Effect (From
System -> Preferences -> Appearance )

None : – This mode causes Ubuntu to use Metacity instead of Compiz Fusion , with no visual effect

Basic : – Has only simple visual effects like shadows , fading windows-menus etc

Advanced : – Recommended for PC with descent graphic hardware , enables effects like wobbly windows, transparency , animated workspace switching etc

Visual Effect Dialog Box

However , compiz-fusion is capable of much more and you can enable more desktop effects /customize compiz by typing the following command in the terminal window : –

sudo apt-get install compizconfig-settings-manager

After completing above step , you can customize compiz by going to System > Preferences > Advanced Desktop Effects Settings .
After installation is over , open Terminal from (Applications -> Accessories -> Terminal ) and issue the following command to install emerald which is necessary for using themes in compiz .

sudo apt-get install emerald

After installation is over download MacOS X Emerald theme from this link :

Now open (System -> Preferences -> Emerald Theme Manager )

After Emerald theme manager opens click on import and point to the downloaded theme package from withing the Theme Manager , you will find Mac4Lin Theme listed select the theme , click on refresh and quit the application .

Emerald Theme Manager

Mac like Dock with Avant Window Navigator

IMPORTANT : – To use AWN Compiz-Fusion should be up and running as mentioned in the step above

Avant Windows Navigator is cool little tool that allows you to have a cute looking dock at the bottom of the screen . Even though AWN is still very buggy, still because it is so feature rich and cool looking you could install it .

To install AWN you need to add extra repositories, now adding any additional repository carries certain amount of risk of screwing up your system so follow these step at your own risk :

To add repository :

echo “deb hardy main” | sudo tee -a /etc/apt/sources.list


echo “deb-src hardy main” | sudo tee -a /etc/apt/sources.list

After issuing above command type the following command to update your repositories :

sudo apt-get update

anf finally to install AWN issue the following command in the terminal window :

sudo apt-get install awn-manager-trunk awn-extras-applets-trunk

Now after completing above mentioned steps AWN should be properly installed , To Launch AWN go to (Applications -> Accessories -> Avant Window Navigator )

Now you could customize AWN by choosing to add more applets , configuring 3D effects for AWN etc by going to AWN Manager ( System -> Preferences -> Awn Manager )

Three ScreenShots of AWN Manager

Though the theme which AWN comes with preinstalled is also good , you might like to try this it’s cool and very Mac like

you could install this theme through AWN Manager go to (System->Preferences->AWN manager) and go to themes there and click on “Add” and point it to the downloaded theme.

You will see a confirmation dialog box that theme has been added properly. Close AWN Manager and start it again and chose the theme just installed and press apply button to make this theme default theme of AWN.

This is how my AWN Dock looks(with the above theme installed) like : –


Desktop Widgets with Screenlets
Screenlets gives user a collection of impressive widgets that can be placed on desktop this is similar to feature available on Windows Vista and Mac OS X Dashboard , it gives impressive look to the desktop.

To install Screenlets type in the following command in the terminal window :

sudo apt-get install screenlets

Now , After the installation is over you can add Widgets/Screenlets on your desktop by going to (System -> Preferences -> Screenlets ) , you will find a dialog box like this from where you could add Screenlets onto the desktop .Also you might like to tick the checkbox “Autostart on login” so screenlets starts automatically when Gnome starts.

Changing the Log In Screen / GDM Theme

To change the Log In Screen/GDM Theme download the package from website listed below :

After downloading the package , open (System -> Administration -> Log in Window ) and there go to Local and click on Add and point to the downloaded theme package (osx-login.tar.gz) . Now you would find OSX-Login theme listed in the window , select OSX-Login and close the window . Logout and Login again you should find the new theme installed .

Log-in Window allows easy changing of the Login Screen Theme

Getting MAC OS X Leopard Wallpaper
Finally you can get MAC OS X Leopard wallpaper from the following website :

This is how my desktop looks after following all the above steps :

Article Written by : Ambuj Varshney (
For Desktop on Linux Blog ,
(C) 2008 , Ambuj Varshney


Lately I’ve been using ubuntu 7.10 for all my projects/daily work.
As a web developer i should have LAMP on my machine and now i would guide you through installing it on yours.

This guide is divided into 3 steps: installing/tesing Apache, PHP and finally MySQL.

Lets start with Apache:
1. Open the terminal (we will be using it through most of my guide) from Applications > Accessories > Terminal
2. Install apache2 using apt-get by typing the following

sudo apt-get install apache2

Note that you should know the root password.
Now everything should be downloaded and installed automatically.
To start/stop apache2 write:

sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 stop

Your www folder should be in: /var/www/

If everything is OK you should see an ordinary HTML page when you type: http://localhost in your firefox browser

Finished with Apache ? lets conquer PHP:
1. Also in terminal write:

sudo apt-get install php5 libapache2-mod-php5

or any php version you like

2. restart apache

sudo /etc/init.d/apache2 restart

This is it for PHP D
Wanna test it ? Just create an ordinary PHP page in /var/www/ and run it.

sudo gedit /var/www/test.php

and write in it: < ?php echo “Hello World”; ?>

Now run it by typing http://localhost/test.php in firefox… You should see your ” Hello World ”

66 % is over, lets continue to installing MySQL:
1. Again and again in terminal execute:

sudo apt-get install mysql-server

2. (optional) If you are running a server you should probably bind your address by editing bind-address in /etc/mysql/my.cnf and replacing its value ( by your IP address
3. set your root password (although mysql should ask you about that when installing)

mysql> SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(’xxxxxx’);

4. Try running it

mysql -uroot -pxxx

where xxx is your password.
Note: You can install PHPMyAdmin for a graphical user interface of MySQL by executing

sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

5. restart apache for the last time

sudo /etc/init.d/apache2 restart

Congratulions your LAMP system is installed and running D
Happy Coding

Due to the large number of people emailing about installing/running phpmyadmin.
Do the following:

sudo apt-get install phpmyadmin

The phpmyadmin configuration file will be installed in: /etc/phpmyadmin
Now you will have to edit the apache config file by typing

sudo vi /etc/apache2/apache2.conf

and include the following line:

Include /etc/phpmyadmin/apache.conf

Restart Apache

sudo /etc/init.d/apache2 restart

Another issue was making mysql run with php5
First install these packages:

sudo apt-get install php5-mysql mysql-client

then edit php.ini and add to it this line : ”” if it isnt already there

sudo vi /etc/php5/apache2/php.ini

Restart Apache

sudo /etc/init.d/apache2 restart

Ubuntu 8.04 Rails Server Using Passenger 6

So before my monstrous OpenSolaris 2008.05 post on setting up a Ruby on Rails server I decided to write a guide on setting up a Ubuntu 8.04 server guide for all you Slicehost users! I decided to write this guide because of the new optimized kernel that was added to Ubuntu Server 8.04 for virtualized environments. I also wanted a complete guide that would be a solid reference and now just have bits and pieces for upcoming sysadmins will get lost when reading.For simplicity I will start with a black machine and build upon that. Use the comments section for specific questions or starting points. I will try to do my best at answering any and all questions.


This section will go over the simple requirements of the entire setup.


Ubuntu 8.04 Server – This could be anything below:

  • Slicehost
  • VMware
  • Bare Metal Install


  • Apache 2.2.8
  • MySQL/PostgreSQL/SQLite3
  • Git
  • Ruby
  • Rubygems
    • Rails
    • Capistrano
    • RSpec
    • Ultrasphinx
    • Passenger

Installation of Software

First thing before we start installing anything on this machine we must update the server. This is very simple with Ubuntu, it is two simple commands and you are all set. You only need to reboot the machine if a kernel was installed.

sudo apt-get install update
sudo apt-get install dist-upgrade

Now that the machine is updated we must install some essential tools in order to build software on this server. Once we are done with the setup it would be a good idea to remove these tools to increase security on our server.

sudo apt-get install build-essential

Now we are all set with the preparation of the server and we can start installing the software we need to get going.

Web Server

For the web server I chose to use Apache 2 because of the new Passenger gem or (mod_rails). This gem is great because of the simplicity to deploy new applications.

sudo apt-get install apache2 apache2-dev

Database Server

The database server that should be used is completely up to your preference. My recommendation is PostgreSQL. PostgreSQL is a very robust and fast database server that is rock solid. It does use a lot of resources so for Slicehost it may not be the best choice. A major player for a slim and fast database for Slicehost should be SQLite3. It is a wonderful database and should be thrown out so quickly because of its lack of a client/server architecture.

For this tutorial I will install MySQL because of its popularity with the Rails community.

sudo apt-get install mysql-server

When prompted enter a root password, make this complex and write it down.

Version Control

Git is the most sexy version control system every created. I will never look back to subversion again. Now that capistraon and redmine both support git I have no reason to even thing about those awful three letters.

To install git is yet another apt-get command away. Run the following command in the terminal of your new server.

sudo apt-get install git-core curl *gitweb*

gitweb is an optional web frontend for your applications. I do not use it because I use GitNub a RubyCocoa application for the Mac.

Once that finishes git is completely installed and ready to go.


Installing Ruby on Ubuntu 8.04 is quite simple. Just another apt-get and you are all set… almost. Since the inception of Ruby 1.9.0 distributions have been naming the current stable release of ruby “ruby1.8” That being said we will make a couple symlinks.

Ruby 1.8.6

To install all the tools you will want on this server run the following command:

sudo apt-get install ruby1.8 ruby1.8-dev rdoc1.8 ri1.8 libopenssl-ruby1.8


I refuse to install Rubygems with apt-get. This is such a terrible idea in my opinion. There is no reason to install rubygems with a package manager because it can update itself. I will go over how to update rubygems later in this howto.

tar -xzf rubygems-1.1.1.tgz
cd rubygems-1.1.1
ruby setup.rb

Optional: Once you are done with install just run the next three commands to make using gems and Rubygems just as before.

sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby
sudo ln -s /usr/bin/irb1.8 /usr/bin/irb

Recommended Gems

Here is a list of recommended gems that should be installed once rubygems is installed. At the very least you must install rails and passenger.

sudo gem install rails
sudo gem install capistrano
sudo gem install rspec
sudo gem install ultrasphinx
sudo gem install passenger