Installing Codecs on Ubuntu Linux

Many of the ubuntu newcomers might be left in a fix when they discover that their system has lost its capability to play media. Actually its not so, those media formats which you might be trying are proprietary ones which requires you to install codecs from a third party. Since ubuntu is shipped with only those packages which are free, according to the policy it has adopted.
You must have tried to play the media with Totem Player. Actually you need to install the gstreamer framework. These are packages from third party. We can adopt two methods for installing them.
Command Line: Just open your Terminal. Applictions> Accessories> Terminal
Type this command, enter your password when prompted.

sudo apt-get install gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-ffmpeg.

You need an active internet connection for downloding them.
GUI Method: Open Synaptic Package Manager. System >Administration> Synaptic Package Manager. You will be prompted for your password.
Now Click on Packages on menu bar. Select in Software Sources. Now select multiverse and restricted so that all four universe, main, multiverse and restricted are selected.
Click on Search. Search for these packages and install them. You need an active internet connection

gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-ffmpeg.

Installing and configuring Tomcat on Ubuntu

This documentation owes its credits to the Ubuntu Community (Docs) and the book: Java-The Complete Reference by Herbert Schieldt where I learnt the basics of Java and Servlets. Let’s begin.

Before starting you need the Java Development Kit (JDK) and not Java Runtime Environment (JRE). Download it from http://java.sun.com as a .bin file and install it on your system or use the command:

sudo apt-get install sun-java5-jdk

Then set the Java Runtime variable

$ export JAVA_HOME=”Your java path”
$ export PATH=$PATH:$JAVA_HOME /bin

e.g. on Dapper

$ export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.06

Now use the following command to install Tomcat

$ sudo aptitude install tomcat5 tomcat5-admin tomcat5-webapps

Now its Done….

To Start, Stop and Restart the server

$ sudo /etc/init.d/tomcat5 start
$ sudo /etc/init.d/tomcat5 stop
$ sudo /etc/init.d/tomcat5 restart


You can access the root directory via port 8180 and the server listens to the address 127.0.0.1 So type 127.0.0.1:8180 in your web browser to access the server.

A word of precaution: It’s better to avoid running Tomcat as root.
There are many other setting within Tomcat, I think the user should better try them out themselves. Some are:
1) Making Tomcat to run on port 80.
2) Turning off Directory Listings like Index Manager.
3) Check out the Tomcat configuration file and try out something of your own. Only precaution required is that you should not be logged in as root.

Enabling root login in ubuntu

Many of you must have noticed that root login in ubuntu is disabled in default. Even su doesnt work. The ubuntu documentation says that “ubuntu is shipped with root account is locked“. Actually its a good move. The newcomers to ubuntu do not want to get frightened hearing the name ‘root‘. If you have moved passed the n00b stage you might want to unlock it.
Firstly you should set the root password. Login to ubuntu with the user which you created during installation. Go to System> Administration> Users and Groups. Select root. Click on Properties. Set the root password.
Secondly enable the root login. Click on System> Administration> Login Window. Click on Security tab. Check “Allow local administrator login“. Click on OK.
Everything is done. Now logout and log in with your root account.

A Word of CAUTION: Use your root account only when absolutely necessary. Never user root account for daily works. For regular work use the account created at installation time.
Reason: Root is the superuser. It has got all the unrestricted privileges to perform any tasks. Its like “I can do anything“.
While running as normal user you would be prompted for your password when you try to make a major change to system settings. Thus you would be alerted that your step is making some changes if you are ignorant of the step you are taking.
A virus is a program or script that intends to harm your system by changing the settings or configuration. At that stage you would be prompted for password, thus you can get warned.

New Tech Blog! Hurray!

Well People! I have got another blog on my own site. I know that this blog is the most visited blog i have ever owned, I am really happy to see that even without any publicity I am getting more traffic than i had ever expected.  🙂 Its even showing up in all major Search Engines, many people are coming here after redirected by search engines (I can see that on blog stats). Surprisingly most people come here when they were searching for general FAQ and HowTo’s. Its a proof that my blog is showing up high in search results even though its page rank isnt still available.
Well coming to the point, the URL of my new blog is http://www.manishtech.info . Strictly speaking its not very new,i had bought the domain some 10 days back and hosted it a week back. I have put lots of interesting stuffs. Good news is that Google has already indexed it. It is more dedicated to News and short stories and concepts rather than FAQ’s and HowTo’s. Well FAQ’s and HowTo’s will always be integral part of this blog (manishtech.wordpress.com).

Hope you would send your feedback and comment on this effort.Dont forget to check it out 🙂

FAQ for Beginners (Volume-II)

What is a distro?
Distro is actually a fancy name for Linux Distributions. As you know the source code of Linux is open, so you could hack/modify/tweak according to your needs and if you think the changes you made is helpful to the people around you, you could even roll out a distribution containing your changes. This new distribution is nothing but a distro. There are hundreds or maybe thousands or distros and counting. Choose one that suits your needs. Some famous ones are Ubuntu, Fedora, Suse, Zenwalk, Debain, Knoppix and the list goes on….
Many of these contain live CD’s. This means that you can boot the Linux directly from the CD instead of installing it on your system. This is a way you can first check out any distro. If you are impressed, give it a respectable position on your computer by installing. Live CD’s are pretty slow if your system is old, have bit patience while it loads. Of the above mentioned distro Knoppix is entirely a Live CD and Ubuntu contains both the live session and installer packed in a single CD.

What is a GNU GPL?
GNU GPL is one of the several licenses under which free and open source softwares are being released. It ensures the freedom of use, copying, modifying and redistribution. The source code of the program should also we given along with the software or made available. This license bars anybody from denying the rights to any person who gets software under GPL. E.g. if I got a software under GNU GPL, I am not allowed to prevent other people who I distribute the software to use, copy, modify or redistribute. In other words all the freedom I get from a Free software under GPL should be transferred to others who get it from me.

Is there anything I should know about GNU GPL’s history?
If you are a regular newspaper reader or keep an eye on tech development, you should know that GNU GPL v3 has been released on 29th July, 2007. The first version of GNU GPL was written by Richard Stallman himself with help of some colleagues in 1989. The second version came out in 1991 and had been unchanged for 16 years. In 2005 Stallman started working on v3 of GNU GPL. Soon the effort was taken over by Free Software Foundation (FSF). The work was not a dictatorship like. People were consulted, feedback and response were consulted and lots of lawyers were contacted to decide on legal matters before finalizing. The result was v3 of GNU GPL. Stallman urged the developers to release their work under v3 of GNU GPL.

I want to migrate to Linux. Can I install my M$ office suit in it?
Most Linux distros come with an office suit called OpenOffice.org .Its an Open Source suit by Sun. You will find all the important and essential features in it- Spreadsheet (like Excel), Word Sheet (like Word), Database (like Access), Presentation (like PowerPoint) and more. You should really give it a try. It has a PDF creator. OpenOffice can open all M$ Office documents, though the rendering of pages can be different. It also has its own format for saving word, spreadsheet and Slides Presentations.

I have lots of softwares for windows (.exe files). Can I use them on Linux?
Properly speaking Linux does not support .exe files. It has its own package management tools. You can have .deb or .rpm file for installing. Still you can make .exe file run on Linux by an emulator called WINE which is a recursive acronym for WINE is not emulator (nice mockery!). All softwares are not supported by WINE. You can try out Codeweavers’s Crossover. WINE is recommended as Crossover is not free. It’s proprietary software. Still you can find Linux versions of many types of software. Don’t get dishearted! There’s a solution to everything.

Now when I can’t get many softwares running on Linux how will I work?
There absolutely no need of thinking so much about softwares. Nearly all distros (distributions) come with lots of tools and softwares preinstalled. As for paint or Photoshop you can use GIMP. For playing music use AmaroK. For playing video use Mplayer or VLC media player. For office OpenOffice.org is installed. For those softwares not installed by default, you can download them in Package Manager (like Add/Remove programs in windows, but far far better). You can even specify the repositories if the package you want is missing or some problem of the sort.

What is a repository?
When installing software packages via Package Manager, packages needs to be retrieved from somewhere. Repositories are places specified where packages exist. It can be a remote computer or a CD-ROM. You can download the packages over internet or a remote computer if you have an active internet connection. If you don’t have, add CD-ROM to your list of repositories, get those packages on CD and start installing.

What is .deb and .rpm file?
Actually all major distros use mainly two types of package management. For Debian and its derivatives .deb packages are used. These disros use apt which stands for ADVANCED PACKAGING TOOL. Those distros which use .rpm packages use RED HAT PACKAGE MANAGEMENT. This is the package management used by Red Hat and its derivatives. You shouldn’t install .rpm packages on debain distros or vice versa. There is a software named alien which can be used to convert one package to other but its better to use Package Manager as any fault in manual process can make the application behave unpredictably or application may even crash.