Audacious Music player

Best Applications and Tweaks for Ubuntu 11.10

Ubuntu 11.10 (Alias : Oneiric Ocelot) released last week, If you are using an older version of Ubuntu or not using it at all (I mean you have never used Ubuntu or any Linux based OS, possibly you are a mac or Window user), then probably you are missing a lot of Fun and Joy! Better upgrade your existing version of Ubuntu to 11.10 or install Ubuntu 11.10 on a new partition (hey! non-Ubuntu user, just give it a try, you will love it; don’t think too much – it isn’t going to hurt anyway, as you can install it as Dual Boot without altering your existing operating system or even you can give it a try using Live CD or USB without installing it on your hard disk).

After a fresh installation of Ubuntu 11.10 you might be looking for some cool tips, tricks, hacks or customization tips so that you can enjoy Ubuntu in your own way. That’s a good thing and of course, this post will help you a lot, in customizing Ubuntu 11.10.

Just After fresh installation of Ubuntu 11.10

If you are new to Ubuntu, then you might have noticed that a lot of basic applications, codecs and plugins are missing (for example mp3 decoders – it means you can’t play mp3 files without it). Most of those programs/softwares are proprietary, that’s the reason why they aren’t included with default installation (Although from 11.04, there’s an option to install those package during installation) – to avoid copyright problems. Another obvious reason is, in order to make the size of installation file (ISO archive) as minimum as possible.

I’ve already written a post about the programs/downloads that is mandatory after a fresh installation of Ubuntu 11.10, so I’m not going to repeat that here, Just follow the link : things to do after installing Ubuntu 11.10 and come back when you’re done!

Best Free Applications for Ubuntu 11.10 users

Here are some cool and best open source applications that you must try on Ubuntu 11.10. It’s not necessary that the collection of best Apps will be in a harmony with your favorite ones but it’s worth trying as it is based on my few years of experience with Ubuntu and community ratings/reviews over the web. Anyway, if you have some cool apps to share then do share it through comment.

1. Audacious : The Best Music Player

Audacious is a simple and easy to use audio player with a lot of cool features. The look is very similar to Windows’s Winamp player specially when you will choose the appropriate theme in preferences option. You may try other music players such as Clementine or Amarok (for more sophisticated features) but Audacious works great and It just works!

sudo apt-get install audacious

Audacious Music player

2. Google Chrome : Best Web Browser

Although, Firefox’s performance has improved a lot on Ubuntu but Google Chrome(or try Chromium, it’s there in the Software Center) is the best web browser. Latest cutting edge features, a lot of plugins/extensions and other cool features makes Google Chrome the best. To install chromium use the command –

sudo apt-get install chromium-browser

or read more about installing google chrome in Ubuntu 11.10.

google-chrome-snapshot

3. VLC : Best Video Player

VLC is one of the most popular open source and cross-platform media player, the best thing is that – it is a some sort of All in One player. A lot of free plugins are available to add more functionality and features. It is available in Ubuntu Software Center so you can install it in one simple click or just type the command at terminal –

sudo apt-get install vlc

playing-vlc in Ubuntu 11.10

4. FileZilla : Best FTP Client

FTP(File Transfer Protocol) client is a simple GUI application that will allow you to upload/download or manage remote files, typically hosted on your shared or Private(VPS/Dedicated) web server. It is a must have application for web developers because it is very useful in editing remote files in real time, in nice and easy to use interface, with your favorite code editor such as gedit. FileZilla is cross-platform application. It also supports file transfer in secure(encrypted) mode i.e SFTP.

sudo apt-get install filezilla

filezilla-snapshot

5. gedit : Best Text Editor

gedit is the default text editor for most of the GNU/Linux distributions including Ubuntu, Linux Mint, etc. It is a simple text editor with a lot of powerful features, and flexible enough to make it suitable for any work you want. e.g I use gedit as a code editor for Ruby on Rails development, to make it look like Textmate (the Most popular rails IDE) – there is a plugin gmate, which tends to make it more programmer friendly (as it adds a lot of plugins for better productivity; like auto bracket completion, code snippets, highlighting embedded codes etc). To install gmate execute these commands –

sudo apt-add-repository ppa:ubuntu-on-rails/ppa
sudo apt-get update
sudo apt-get install gedit-gmate

That was just one example, a number of free plugins are available to customize it as you want.

gedit-text-editor

6. Geany : Best Lightweight IDE for web developers

Although, there are number of sophisticated IDE (e.g Eclipse, Netbeans, Aptana, BlueJ etc) are available for Ubuntu but Geany is for you if you are looking for a simple and lightweight IDE that just works. It has a lot of good features (such as code completion, folding, embedded terminal etc) for web developers – php lovers will probably love it. It is there in the repository so if you want to install Geany IDE on Ubuntu (or other similar distributions), then fire up a terminal and execute –

sudo apt-get install geany

geany IDE

7. GIMP : Best Image Editor

GIMP : For Advanced user/graphics designers
If you’ve been using Adobe Photoshop and looking for an open source alternative on Ubuntu, then try GIMP Image Editor. It has lot of sophisticated features like Adobe Photoshop (Some Photoshop users might not agree here), and it’s very simple to use. Although, it doesn’t have a lot cool brushes/effects installed by default (unlike Photoshop) but There are lot of good plugins and brushes available there on Web – so just Google it. To install gimp, open terminal and execute –

sudo apt-get install gimp

gimp image editor

If you want some more brushes and plugins like Save for Web (image optimizer, may be useful for those who want to publish graphics work on web), then install that in one simple command –

sudo apt-get install gimp-plugin-registry

Pinta : For beginners
If you want to get started with image editing business then probably Pinta will be sufficient for you. it is far simpler than Gimp and it does have nice features. Its look is very similar to MS paint. To install Pinta on Ubuntu, execute the command –

sudo apt-get install pinta

MyPaint : For Digital Painters

If you’re a digital painter, then MyPaint is the best. It is an open source and cross-platform application, with a lot of cool features for painters. To install MyPaint, open terminal and execute the command –

sudo apt-get install MyPaint

8. Tomboy Notes : Best Note taking Application

Tomboy Notes is one of the coolest default application, included with Ubuntu 11.10 (may be it will also be available in the upcoming version – 12.04). If you have ever used Evernote or other similar application (such as Nevernote – an open source clone of Evernote) then you need no explanation about what really it is. As the name suggest – it’s a simple application that will allow you to take small notes, you do not need to hit save button or Ctrl+S, just write it on a note and you’re done. It will even synchronize it with the Ubuntu One cloud (or other local or remote location of your choice). I use it daily – for writing new post ideas or tips for this blog.

tomboy-notes

9. OpenShot : Best Video/Movie Editor

There are lot of open source video/movie creators/editors available for Ubuntu but OpenShot is the best one. It is very simple, stable and powerful. it has a lot of features such as Drag and Drop support with Gnome desktop, unlimited tracks/layers, a number of audio/video formats are supported, cool transition effects, 3D animated titles, digital zooming of video clips, high definition video support (HDV, AVCHDV), plus a lot of other features that you can expect from a modern video editing software. To install OpenShot, execute –

sudo apt-get install openshot

openshot-video-editor

10. Shutter : Best Screenshot program

If you want to take a screenshot of whole screen then a PrtScn button on your keyboard may do the job easily, but that’s not all you want always. In some cases, you will need to select a portion of the screen after a delay or some other complex case might occurs then you will need a dedicated screenshot program. That’s where shutter comes into mind. Shutter is the best screenshot program because of its ease of use and a bunch of cool features – multiple screenshot, delay, region selection with co-ordinates, editing features (to draw arrow or watermarks) and the most cool feature is effects (collection of plugins to apply some cool effects such as 3D reflection, Shadow etc). To install shutter – simply execute the command –

sudo apt-get install shutter

11. Handbrake : Best Video converter

handbrake

Handbrake is the most popular video converter application and it’s a cross-platform application. It has a lot of cool features which makes it the best, and of course it’s very easy to use (you don’t need to read a lot of manuals in order to get a video for your iphone or ipad or whatever). To install Handbrake, open terminal (Ctrl+Alt+t) and execute these commands –

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

12. Pidgin : Best Chat client

Pidgin is the most popular chat client (or instant messaging application) among Linux users. The reason is – it has cool features with lot of options and it is very simple to use. It supports a lot of protocols and allow you to chat using Google Talk , Facebook, AIM, IRC (Internet Relay Chat), ICQ, MSN, Yahoo, MySpace etc. The default chat application ‘Empathy’ is also good. To install pidgin, open terminal and execute –

sudo apt-get install pidgin

That’s all, now you can add an account to starting chatting with your buddies.

pidgin

13. Thunderbird : Best Email Client

Thunderbird is the most popular open source and cross-platform application for sending and receiving email right from your Desktop i.e it’s an Email client. You enter your email provider details and send/receive emails in one click. A lot of plugins are also available to extend the core functionality (according to your need). It is already installed in the latest version of Ubuntu 11.10 (in other versions of Ubuntu or other Linux distro search in Software Center or synaptic package manager).

thunderbird

14. K3b : Best Disc (CD/DVD) Burning Application

K3b is a great DVD/CD burning program for Ubuntu or other Linux distributions. It is specially useful for beginners. It has very simple and easy to use interface with default configurations that just works. To install K3b, open terminal and execute –

sudo apt-get install k3b

k3b - dvd burner
DeVeDe – To create video DVD/CD
If you want to create DVD for your DVD players, then DeVeDe is the best. Install it in one click from Ubuntu Software Center or just execute the command –

sudo apt-get install devede

What about Tweaks ?

I’ve already covered a post about that – so you are supposed to follow the link –

Tips, Tricks and Tweaks for Ubuntu 11.10 (Oneiric Ocelot)

Apache on Ubuntu

how to install LAMP – Apache, MySQL & PHP on Ubuntu 11.10

Ubuntu has become popular not only among desktop users but also among the web developers who uses Linux distribution to deploy their web application (on a VPS or dedicated host), although they preferred to use LTS (Long Term Support – typically of five years for Server Edition) version rather than a regular stable release because of obvious advantages – increased stability (Although, from the next release i.e Ubuntu 12.04 LTS, Desktop version will also get 5 years of support).

Despite of that fact, a lot of users/developers also use Apache server on their localhost for testing/development (e.g wordpress developers use it) and this post is written for those who want to get started with Apache, PHP, MySQL, phpMyAdmin etc with Ubuntu 11.10. Apache is the most popular web server on this planet (total share is above 65%). It is an open source and cross-platform web server. Apache supports a lot of server side language and the features is extensible using modules. PHP dominates the web scripting world and MySQL is the most popular open source database. Most of the websites (including the blog – you’re reading right now) are based on the great combination of Linux, Apache, MySQL and PHP (Commonly called as LAMP).

Setup LAMP in Ubuntu 11.10

step 1. Installing Apache

Apache on UbuntuOpen terminal (press Ctrl+Alt+t) and execute the command –

sudo apt-get install apache2

The above command will install some default modules, packages and libraries but you later install the ones you need. When installation is completed, type the address http://localhost in the browser address bar and you will get a default apache page like this –

 

apache-default-page

MySQLstep 2. Installing MySQL

Execute the command –

sudo apt-get install mysql-server

and enter the root password during installation procedure. I’ve already covered a post in detail about how to install MySQL on Ubuntu 11.10.

step 3. Installing PHP

Execute the command –

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

Then restart the Apache server to load php modules –

sudo /etc/init.d/apache2 restart

To test whether the PHP 5 has been successfully installed or not, create a file phpinfo.php and copy the following content (to the file) –

<?php
print_r (phpinfo());
?>

and put the file in root web directory (/var/www). Then open the address http://localhost/phpinfo.php, then it should display the php configuration details like this –

testing php on Ubuntu

That’s All.. Linux (Ubuntu is itself a Linux based OS), Apache, MySQL and PHP i.e all the components of LAMP has been installed successfully.

To manage MySQL database from a GUI, You may like to install phpMyAdmin – The MySQL web administration tool, a great application for managing – creating and maintaining MySQL database.

How to install phpMyAdmin on Ubuntu 11.10 ?

just execute the command –

sudo apt-get install phpmyadmin

When the installation is complete, move on to http://localhost/phpmyadmin and login (using the MySQL login username(default is ‘root’) and the password (you entered during installation)) to start using it.

Want to learn web server administration (with LAMP) on Ubuntu Server ?

Having apache, MySQL, PHP installed locally on your system is good for learning about the server administration and other cool/great stuffs related to Linux but VPS is very cheap these days so you may want to try Ubuntu (with Apache or other web server) on a VPS for much better (and real) experience – I’ve been using Linode VPS @ $19.95/month (512 MB RAM, 20 GB space and 200GB bandwidth) for a while, and I am loving it.

How to install Ruby on Rails in Ubuntu 11.10

Ubuntu (The latest stable version : 11.10(Oneiric Ocelot), released few weeks ago) is one of the most Linux based popular operating system and gradually becoming more popular among programmers and web developers. C/C++/Java programmers and web developers are rocking with the Ubuntu as it has a bunch of open source development tools available to increase the productivity at minimum or zero cost.

Ruby on Rails is one of the most popular framework for developing web applications using Agile approach. Rails (Latest version : 3.1) is based MVC (Model View Framework). Getting started with Rails has been little messy (On Linux platform) for beginners due to its installation/setup errors, probably due to some missing dependencies (e.g gems).Relax, it’s very simple, you just need to understand few basic things. This post has been written for those who want to get started with ‘Ruby On Rails'(commonly called as ROR) on Ubuntu 11.10 or the rails developers who want to develop cool application with Ubuntu 11.10.

To install ruby on rails in Ubuntu 11.10 (or other similar Linux distribution such as Linux Mint, Debian etc), just follow these simple steps. Although RVM is not strictly necessary but it’s strongly recommended – it will allow you to use multiple versions of Ruby, which may be be required in some cases.

step 1. Install dependencies

Install git : Git is the most popular (as well as fast and efficient; Linux kernel uses it; developed by Linux Torwalds, the same guy who developed Linux kernel) open source version control system. You can install it in one simple command to install it from the official package repository –

sudo apt-get install git

[You could also install git from the source (Download the source code, extract it and execute make && sudo make install) ]

Install Curl : Curl is a command line tool to get a file from FTP/HTTP/HTTPS server. To install, open terminal and execute the command –

sudo apt-get install curl

step 2. Install RVM (Ruby Version Manager)

Open terminal and execute the command (I assume you’ve already completed the step 1, otherwise first do that) –

bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)

Now, you might have to edit the bashrc file to load RVM in shell session. To do that type –

gedit ~/.bashrc

and add the following line to the end (and save the file)
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
Then reload the shell session using the command –

source ~/.bashrc

Now you can test whether the RVM has been installed successfully or not. Open terminal and execute the command –

type rvm | head -1

After executing above command you should be getting this output –
rvm is a function
That’s All.. You’ve successfully installed the RVM. Next, you are supposed to install few additional dependencies. To find out those programs type –

rvm requirements

After executing the above command, install the additional packages recommended by RVM –
sudo apt-get 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

step 3. Install Ruby

Now, it’s time to install the ruby version you want (you’re recommended to use either 1.8.7 or 1.9.2). The generic syntax is rvm use version_name. It will also install the associated packages such as RubyGems and Bundler.

rvm install 1.9.2

Then select the version, you want to use –

rvm use 1.9.2

If you aren’t sure about the ruby version currently being used, then type –

ruby -v

step 4. install Rails

Finally, you can install the rails gem using a simple command –

gem install rails

That’s All.
Now, create a sample application (just for testing) using Ruby on Rails.

rails new my_app
cd my_app
bundle install
rails server

Then open your browser and type the following address (to see the application running) –
http://localhost:3000

Learning Rails ?

Check out this interactive video course on Ruby on Rails at Treehouse.

Recommended Books/Tutorials for Beginners

Update 1. Fixed some typo in commands! and adds a link in resources!

Update 2. My Rails Application : Railyo – a private job board for rails developers/freelancers.

c programming in ubuntu 11.10

How to Compile and Run C/C++ program on Ubuntu 11.10

Ubuntu 11.10 (Oneiric Ocelot) is one of the most popular operating system for programming because there are lot of great open source applications, tools, compilers, debuggers, IDEs are available free of cost. Some of them are  – GCC – The greatest compiler for C language (from FSF (‘Free Software Foundation’ by Stallman); Linux Torwalds used GCC while developing Linux Kernel), Eclipse IDE (The most popular ‘Integrated Development Environment’ for Java programmers), Netbeans, KDevelop, Codelite  etc.

C/C++ language is a high level programming language (although the term high and low is used in relative sense e.g C is a high level language as compared to Assembly but if we compare it with java then C is a low level programming language; the term high or low basically describes the closeness with hardware). Most of the operating systems has been written in C language. This post has been written for beginners who just started learning C/C++ or the programmers who have migrated from Windows to Ubuntu (although the commands are almost same for all Linux based operating system).

Compiling and Executing C program in Ubuntu 11.10

1. Write and save the program

c programming in ubuntu 11.10

Open a simple text editor (e.g gedit), IDE (Eclipse) or command line code editor (Nano or Vim). I’ll be using gedit as it is very simple to use and it’s recommended for beginner programmers. Right Click on Desktop or any directory (Browse File using Nautilus) and select create new File – hello.c (.c extension is used to indicate that it’s a c program). Then write a simple program like this (and save the program press Ctrl+S)

#include<stdio.h>

void main()
{
	printf("Hello! This is my first C program with Ubuntu 11.10\n");
	/* Do something more if you want */
}

2. Compile the program

GCC (GNU Compiler Collection) is installed by default, in Ubuntu. To compile the program, open the terminal and move on to the target directory type the command – (where gcc implies compiler name, then it asks for the file name of the source program while -o option specifies the file name of the output program)

gcc hello.c -o hello1

If there is no syntax/semantic error in you program then the compiler will successfully generate an executable file, otherwise fix the problem in your code.

3. Execute the program

To execute the program, you need to run –

./hello1

running a C program in Ubuntu 11.10

Compiling and Executing C++ program

The steps are almost same as above but you need to install g++ compiler, the file extension should be .cpp and in compilation phase replace gcc with g++. To install G++ compiler, execute the command –

sudo apt-get install g++

If you have any problems then share it through comments. One more thing, This video might help you in running your first C program in Ubuntu 11.10(I’ve recorded it in Gnome Shell interface) –

upgrading to ubuntu 11.10

How to Upgrade to Ubuntu 11.10

Ubuntu 11.10 final version is out now. You can either install the Ubuntu 11.10 (oneiric ocelot) on a separate partition without affecting the current version 11.04 (Natty Narwhal) / 10.10 (Maverick Meerkat) / whatever version you’re using right now, or just upgrade the current one to its latest stable version i.e Ubuntu 11.10.

If you’re using Ubuntu 10.04 LTS (Long Term Support) on a production machine (for example as a VPS server), then it may not be necessary to use the latest version (and there may be some unknown critical bugs), so upgrade is not required (in fact it’s not recommended unless you know what you’re doing). On the other hand if you’re a desktop user then you may want to try some new and exciting features of Ubuntu 11.10 – specially Gnome Shell, for Next Generation Desktop Experience.

upgrading to ubuntu 11.10

Upgrading (ubuntu 11.04/10.10/10.04/..) to Ubuntu 11.10 in few simple steps

step 1 

Attention! => Before any Upgrade create a backup of all the important Files

When you’ve created a backup copy for your important data (it will save you from any failure, so don’t forget to create a backup first), you can start upgrade process. You must be connected to internet because during upgrade process a lot of packages will be fetched from Internet.

step 2

Open terminal (press Ctrl+Alt+t) and execute the following command(s) to start the update manager (you can also start Update Manager from Apps list).

update-manager -d

Then click on Check Button to check for updates, it may take few minutes to fetch the latest details about the distribution/packages.

update-manager

step 3

In update manager window, you will get a notice like ‘New Ubuntu release ‘11.10’ is available‘. Click on Upgrade (button near that), then again confirm it in a new window and wait for the upgrade process to complete. Now, restart the system and enjoy the new version of Ubuntu!