Linux News|Linux Install sidebyside windows|Ubuntu|Linux Help|Installing Apache and php from source

Monday, December 19, 2011

Setting Environment variable for java in ubuntu/Linux

To set environment variable for java proceed as follows:
Firstly goto oracle website and download java development tool kit which is of .bin extension.
Here I am using jdk-6u23-i586.bin file which is downloaded by me .Copy it onto Desktop,open the terminal and do the folllowing:
tarun@chawla~$cd Desktop
tarun@chawla~/Desktop$sudo chmod +x jdk-6u23-i586.bin
A screen shot is given below

After that a directory with some files will be created on your Desktop let call this directory as jdk1.6_23.
Now you have to add the  jdk1.6_23/bin path to PATH enviroment variable as follows.
All executables files are stored in  a directory somewhere which act as a command for you,when you type the file name and press enter it executes.For ex you type mkdir command for making directory,actually mkdir is a executable file stored at some place in directory such as /usr/bin.
Environment Path variable are used to locate commands ,the path for these commands is stored in PATH variable. Now you have to add that jdk/bin path to PATH variable.I have put jdk files on my Desktop so absolute path here will be /home/tarun/Desktop/jdk1.6_23/bin,here tarun is my user name replace it with your username.
Now open the terminal and proceed as follows and this time you are in home directory by typing cd command:
tarun@chawla~$echo $PATH
tarun@chawla~$gedit .bashrc

.bashrc file will be opened which is a text file,and append following line to the file
check your installation by opening terminal again after closing the previous one as follows:
tarun@chawla~$java -version

tarun@chawla~$java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Server VM (build 19.0-b09, mixed mode)
If this comes as output then enjoy programming buddy.

And now save the .bashrc file.One thing can be considered here that you can put jdk1.6_23 folder any where at some other place and modify the path accordingly.

Sunday, December 18, 2011

Playing Restricted formats in ubuntu such as MP3,DAT,MPEG etc

Initially when I installed ubuntu I was unable to play my favourite music because these formats such as mp3,mpeg are restricted if you want to play them you have to install some packages.

Sol 1 is to open the terminal and install vlc as follows as vlc supports all formats I have heared:

tarun@chawla:~$ sudo apt-get update
(skip this if you have already updated)

tarun@chawla:~$sudo apt-get install vlc

After terminal finishes vlc is intsalled,run those music files with vlc.

or installed ubuntu-restricted-extras package which packages most of the plugins and software required to run day to day licensed things.
To install it do as follows:
tarun@chawla:~$ sudo apt-get install ubuntu-restricted-extras
(after updating as above,if you have already updated skip updating).
Enjoy the day

Manually/Automated disk checking

AutoFsck improves the disk checking process by checking the disk as the computer shuts down, rather than while the computer is starting up. The developers describe it as so:

"AutoFsck is a script which automates periodic disk checking in such a way that it no longer bothers the user at boot every 30-ish times, and is streamlined in a friendly graphical user interface.

AutoFsck ensures that the automatic disk check will no longer inconvenience you by making your boot times very long.

It's really quite simple, every time you shut down, AutoFsck finds information on your disks. Every linux partition has two important number associated with it, one is the number of times it has been mounted, the other is the number of times it is allowed to before being checked. AutoFsck looks at these, and if your drives are due for checking it asks if you want to check them. If you say yes, your drives are checked before your computer shuts down. If you say no, AutoFsck will ensure that the check will not run next time your computer boots. You will then be prompted again the next time you shut down."

This software could greatly alleviate some of the frustration new Ubuntu users face. I believe it is absolutely necessary.

Converting HTML files to PDF in ubuntu Linux

When you have downloaded any book in html then reading that book is cumbersome,
why don't you convert it into pdf.
Here it is:
htmldoc is a software available which supports both gui and terminal operation which converts HTML pages to PDF or PostScript formats as follows.
Reach the termial Applications->Accessories->Terminal.

before installing make sure that you are connected to Internet.
tarun@chawla:~$ sudo apt-get update
(skip this step if you had already  update)
tarun@chawla:~$sudo apt-get install htmldoc                                        

Initially you will feel some trouble but you will learn with two or three try just use it after all it has a Graphical User Interface(GUI).

Connecting ubuntu to Internet through a 3G modem with sakis3g script

There are many Data cards or you can say Dongles available in market such as Micromax but ubuntu 10.04 does not recognise it ,this is due to reason that ubuntu thinks it as a memory device not as a modem.
You have to manually switch the dongle to modem. Sakis3g is a script currently available,just search it out on google you will surely get it or download from it here Sakis3g.

After downloading the script you have to make it executable by right clicking on it and in the permissions option make it executable,the option would be below in gnome desktop or do it from terminal as follws:

copy the sakis3g to Desktop and open the terminal through Applications->Accessories->Terminal.
user@ubuntu:~$ cd Desktop
user@ubuntu:~$sudo chmod +x sakis3g                                          //to make script executable
user@ubuntu:~$./sakis3g --config

Make sure that Desktop have a capital D and replace sakis3g by the script name you have downloaded.
Now script will run and click the connect with 3g option let it do the task required,
an if it fails don't leave your seat just try 4-5 times it will run surely if it is a 3g modem.

Friday, January 7, 2011

My First Blog

Hello Friends,
Welcome to the world of linux,I am using ubuntu 10.04 lucid.It is a debian based linux operating system.Are you tired of being a stage player of windows. When I started using linux,I want to do every thing on it as windows. Comparing linux and windows does not suit linux. Linux is far better platform for the new as well as programmers.Have you ever uninstall the desktop of windows operating system,do you  know the source code of windows media player,can you uninstall it answer is no and no.
You can play with linux and do that was restricted by windows,look into the source code of the softwares you are using,uninstall your desktop and change every little thing you have never wonder to take a try at it. Windows gives windows but linux gives you the whole house. I hope you and me will make this house a large one.