Tag Archives: 12.04 LTS


How to Login as root in Ubuntu 12.04 LTS

Root account is disabled by default, in Ubuntu and some other GNU/Linux distributions because the super user created by default (during installation process) can easily gain root privileges through the help of sudo (super user Do) command. But in some cases it might be good to have access to root power in GUI mode (or may be just for fun), although I’m sure most of such administrative tasks can be easily accomplished by sudo utility (which is installed by default in Ubuntu).

I had already written a post about Unlocking root account in Ubuntu 11.10 – most of the things are same and works as expected, in Ubuntu 12.04 LTS.

Unlocking Root Account in Ubuntu 12.04 LTS (Precise Pangolin)

Open a terminal (Ctrl+Alt+t) and execute the command –

sudo passwd root

Then enter the root password twice (followed by your login password). Then logout from the current session and choose root user at login prompt. Then you can enjoy root power in GUI mode. Or you can use su command to gain root power at terminal –


Then enter root password and Enjoy :)

NOTE : But actually you shouldn’t be using root account for administrative tasks. simply use sudo (if you want to gain root power in terminal) or gksudo or gksu for GUI applications such as File Manager. So if any command requires root power i.e gives permission denied error or something like that then just put sudo before that command.

sudo command_that_requires_root_power

Open Nautilus with ROOT privileges (it’s required unless you do file management over command line – in that case sudo will work fine)

gksudo nautilus

For KDE Desktop users KDESUDO utility is there (it’s a frontend for sudo) –

kdesudo gui_app_name
Set up ruby-on-rails

How to install Ruby on Rails in Ubuntu 12.04 LTS

Ubuntu 12.04 LTS (Long Term Support) – Precise Pangolin has already released, and you might have upgraded from 11.10 or installed Ubuntu 12.04 LTS. In this post you will learn how to setup Ruby on Rails on a newly installed Ubuntu 12.04 LTS.

Ruby on Rails is a very popular web development framework, it is based on the principle of  “Convention over Configuration”. Although, application development using Rails is quite easy and fun but setting up rails development environment may be difficult and frustrating, specifically for beginners. I had already written a post about setting up rails on Ubuntu 11.10  but few things has changed and need to be updated for the new version of Rails, Ruby and Ubuntu.

“Hassle Free” Rails Installer for Ubuntu 12.04

Although I’ve explained the installation steps in detail but if already know how these things work then better save time by running the script – that will install Ruby on Rails on Ubuntu 12.04 along with the dependencies and RVM.

Download the Rails Installer Script (From Github)

First change some settings in Gnome Terminal. Go to Edit -> Profile Preferences -> Title and Command and check the “Run Command as login shell”  box.

Login Shell - Terminal

Then make the script executable and execute it (you may have to enter the login password once) –

sudo chmod +x rails-installer.sh

If anything goes wrong then let me know through comments.

Step by Step Instruction for Setting Up Rails on Ubuntu 12.04 LTS

Just follow these simple steps and withing a couple of minutes you would be creating some nice applications (and of course using Rails).

step 1.  Install git and cURL

First of all, update your package repository.

sudo apt-get update

git is a simple, fast and efficient version control system. It is easy to learn, so even if you don’t have any experience with git you can try it in your next rails project (or any other project). you will love it.

sudo apt-get install git

Curl is a simple command line utility for getting file over web protocols, based on libcurl. To install curl simply execute –

sudo apt-get install curl

step 2. Install RVM and Dependencies

RVM is not strictly required but it makes ruby management a lot easier. You can try different implementations of ruby, different versions of ruby and all without any pain. So it’s strongly recommended. but RVM requires the command to be executed as login shell, so open a terminal and go to Edit -> Profile Preferences -> Title and Command and check the box that says “Run Command as a login shell“. (look at the above snapshot)

curl -L get.rvm.io | bash -s stable

Now, you must load the RVM

source ~/.rvm/scripts/rvm

Then install additional dependencies specified by the RVM –

rvm requirements

sudo apt-get -y install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion

Installing Javascript Runtime
In newer version of Rails, you also need a Javascript runtime. Although you could install it from the package repository but it’s very outdated. So I recommend installing it using the PPA. (and I’ll also update the script)

sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

step 3. Install Ruby

Now, you got RVM running, installing and running multiple versions or just one version of Ruby is very simple. To install Ruby just pass the version number to rvm install command (or some other implementation of ruby if you want; RVM also supports rbx, ree, JRuby, IRonRuby other than the default MRI) –

rvm install 1.9.3

Then select the Ruby version you want to use, (or make it default so that you don’t have to select it again in new session)

rvm use 1.9.3 --default

Now, you can check the version of ruby, you’re running right now-

ruby -v

step 4. Install Rails

RVM installs ruby as well as the gem utility (managing ruby libraries). To install rails, simply install it using the gem. It will automatically install the latest version unless you specify the version explicitly.

gem install rails

Now You’re ready to go.

rails new app_name
cd app_name
rails server

Now, open a browser and go to http://localhost:3000. :)

Voila :)

You should also check out this Ruby on Rails Interactive Video Course on Treehouse.

Note : When your Rails Application is ready, you may want to deploy it to a real server, I recommend Digital Ocean (@$5/mo, you get 512 MB RAM, 20 GB SSD and 1TB Bandwidth, cool, isn’t it.) for that, also checkout the Digital Ocean review if you want to know more about them. If you need any help then read this article about Deploying Rails Application to VPS.

Update 1 : Added a video as a reference for Rails Installer Script.

Update 2 : checkout my new rails application: Railyo – Rails freelancing jobs for cool developers!


Alternative Desktop Environments for Ubuntu 12.04 LTS

Ubuntu 12.04 LTS – Precise Pangolin uses Unity Interface as the default user interface. For any reasons you don’t like Unity (although Unity has improved a lot – so you may want to try cool keyboard shortcuts in Ubuntu 12.04 LTS to get the full experience of Unity) then don’t be panic – there are other desktop options are available for you – you just need to try out and choose one.

If you didn’t like the Unity from first day then you could install other flavors of Ubuntu (instead of the default one) – called as Ubuntu derivatives. But basically they are all same – the only difference is the set of applications, installed by default.

Unity Desktop in Ubuntu 12.04 LTS

Alternative Window Managers (Desktops)

Here are few cool alternatives – Gnome Shell and KDE are as sophisticated as Unity while XFCE, LXDE and Openbox are lightweight/simple desktop environments for the users who wants to get things done very fast (without the unnecessary clutter).

1. Gnome Shell


Gnome shell and Unity both are based on GNOME 3 core but they have totally different look. Gnome Shell is also very popular and many distribution uses it as the default UI. To install Gnome Shell on Ubuntu 12.04 LTS, simply type the command –

sudo apt-get install gnome-shell

You are also recommended to install gnome tweak tool, for customizing advanced options for Gnome desktop.

sudo apt-get install gnome-tweak-tool

2. KDE


KDE is a qt based desktop environment that provides a simple and easy to use Desktop environment. Since KDE looks very similar to Windows (prior to 8) it suits well to the users coming from windows. Due to the recent changes in Gnome, KDE has become the default choice for many Ubuntu users.

sudo apt-get install kde-standard


Xfce Desktop

XFCE is a simple and easy to use desktop, very well suitable for those who are tired of those bloated desktops. It is fast, it uses less resources and allow you to focus totally on your computing tasks instead of eye-candy.

sudo apt-get install xfce4


Lxde Desktop

LXDE i.e Lightweight X11 Desktop Environment, as the name suggest, it’s lightweight, simple, fast (and energy saving). It has been designed for optimal use of resources, so it’s well suitable for low hardware resources.

Install LXDE in Ubuntu 12.04 LTS

sudo apt-get install lxde

5. Openbox


Openbox is another lightweight window manager, optimized for speed and simplicity. it’s highly configurable, you can customize the every bits of the desktop, you can even create a new way to interact(use/control) with your desktop. You can also run it inside GNOME or KDE.

Install Openbox in Ubuntu 12.04 LTS

sudo apt-get install openbox

6. Gnome Classic

Gnome Classic is a GNOME 3 desktop trying to simulate the look/layout of GNOME 2 desktop.

sudo apt-get install gnome-session-fallback

Upgrading to Ubuntu 12.04 LTS from 11.10

Now, Ubuntu 12.04 LTS has arrived with some cool new features and surprises. Different flavors of Ubuntu i.e kubuntu, Lubuntu, Edubuntu, Xubuntu, Mythbuntu etc is also available along with the primary release.

If you’re using 11.10 then you can upgrade it (if you want, but recommended because the new version is an LTS release). You can upgrade to Ubuntu 12.04 LTS in many ways – from terminal or update manager or you could download an ISO and upgrade using a bootable media (CD/DVD/USB). The first/second method is dead simple so we would go for that but if you’ve very slow Internet connection then it’s better to upgrading using bootable media.


Upgrading Ubuntu 11.10 to 12.04 LTS

0. First of all, create a backup of all your important files. It’s really important!.

1. Start Update Manager

2. Then check for updates. Then you would see the upgrade information about the new release.

3. Now, click on Upgrade button to continue (you will have to confirm it in a new window) and wait while upgrading process complete.

From Terminal

Open a terminal (Ctrl+Alt+t) and execute –

sudo apt-get update
sudo do-release-upgrade
Cheese Webcam Booth

Webcam Driver/Software for Ubuntu 12.04 LTS

Ubuntu 12.04 LTS has released and now it’s time to install the necessary programs to get things done like drivers for graphics card or sound card (if required), webcam, printer/scanner etc.

If you’re new to Ubuntu 12.04 then you may like my previous post explaining the basic things you must do after installing Ubuntu 12.04 (precise pangolin) or you can install what you’re looking for i.e a good webcam software on Ubuntu 12.04, because it’s likely that you couldn’t get the native driver from the webcam manufacturer.


Cheese – best Webcam software for Ubuntu

There are lot of softwares available for webcam but Cheese is the best one! It just works (look at the above snapshot). Cheese has lot of features – Photo/Video/Burst mode at various resolution settings, additionally you can also apply some cool effects (for fun).

Install Cheese Webcam Booth in Ubuntu 12.04 LTS

Fire up a terminal (Ctrl+Alt+t) and execute the command –

sudo apt-get install cheese

or you could search in Software Center or synaptic package manager.