Tuesday, April 21, 2009

Upgrade open office from 2.4 to 3.0

First, remove your existing version of OpenOffice.org:

sudo apt-get remove openoffice*.*

Next, download a copy of OpenOffice.org 3.0 (OOo_3.0.1_LinuxIntel_install_en-US_deb.tar.gz worked for us) and extract the download:

tar -zxvf OOo_3.0.1_LinuxIntel_install_en-US_deb.tar.gz

That will create a directory called something like OOO300_m15_native_packed-1_en-US.9379.

Switch into the DEBS directory in that directory:

cd OOO300_m15_native_packed-1_en-US.9379/DEBS/

Now all you need to do is install all of those .deb packages:

sudo dpkg -i *.deb

That will do the trick. Once you’ve given your password your system should install all of the required files.

With that done you should have just one thing left to do: Install the desktop integration package. That should be in the DEBS folder:

cd desktop-integration

From that folder install the package:

sudo dpkg -i openoffice.org3.0-debian-menus_3.0-9354_all.deb

If everything works out you should be able to open OpenOffice.org 3.0 from the Applications menu on your desktop.

Monday, April 20, 2009

My essential open source application

1. Firefox
http://www.getfirefox.com/
Web browser which replaces Internet Explorer

2. Thunderbird
http://www.mozilla.org/thunderbird/
Email client which replaces Microsoft Outlook.

3. OpenOffice
http://www.openoffice.org/
Office suite which replaces Microsoft office.

4. Vnc
http://realvnc.com
Remote administration tool for cross-platform.

5. Filezilla
http://filezilla.sourceforge.net/
Ttp client gui which used to replaces WinFTP

Saturday, April 18, 2009

How to add dell 640m wireless enable in ubuntu

This HOWTO had been tested on ubuntu 8.10. 9.04


STEP 1: CLEAN YOUR SYSTEM

remove any and all versions of Ndiswrapper that come installed by default on your system:

Code:
sudo rmmod ndiswrapper
sudo ndiswrapper -e bcmwl5
sudo apt-get remove ndiswrapper-utils
Don't worry if you get errors about not being able to find or remove these -- we're just making sure they're not present before we get started.

STEP 2: GET NEEDED PACKAGES

We'll need to install compiling tools (don't panic when you read that, just bear with me), the latest kernel headers, and then the source code for the latest ndiswrapper (seriously, don't panic. This will be very simple), and the wireless drivers from Dell.com.

Code:
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install linux-headers-`uname -r`
wget http://ftp.us.dell.com/network/R134881.exe
NOTE: The characters around `uname -r` are BACK TICS, NOT apostrophes. A back tic is usually located at the top left of your keyboard, to the left of the 1 key. The command WILL NOT WORK if you use apostrophes. Just copy/paste the commands from this how-to in to your terminal to avoid making typos.

At this point, you need to go to the ndiswrapper sourceforge site and get the latest version of the Ndiswrapper program.

Code:
wget http://superb-east.dl.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-1.54.tar.gz
If that wget doesn't work, just go here: http://sourceforge.net/project/showf...group_id=93482

Uncompress the ndiswrapper source (in my example, the file name is ndiswrapper-1.51.tar.gz):

Code:
tar -xzvf ndiswrapper-1.54.tar.gz
Finally, we need to blacklist the broken and useless bcm43xx firmware drivers that try to load in a default ubuntu install:

Code:
sudo echo blacklist bcm43xx >> /etc/modprobe.d/blacklist
NOTE: If the above command gives you a permission denied error, try this code instead:

Code:
sudo -s
echo blacklist bcm43xx >> /etc/modprobe.d/blacklist
exit
YOU MUST REBOOT NOW!

STEP 3: COMPILE PROGRAM

Now we'll complile the Ndiswrapper program. In a terminal, go to the directory where you extracted ndiswrapper and execute the following:

Code:
cd YOUR-NDISWRAPPER-DIRECTORY
sudo make uninstall
IMPORTANT: Do the above command multiple times. You can stop when you get the message that says something about no files or directories found. This usually means running the command 2 or 3 times, but not more than about a dozen.

Code:
sudo make distclean
sudo make
sudo make install


STEP 4: INSTALL DRIVERS

If that worked, then you now have Ndiswrapper installed. Now we need to install the drivers. In a terminal, go to the directory where you have the R151517.EXE file:

Code:
unzip -a R134881.EXE
Now change directories to the DRIVER directory that was just extracted.

Code:
cd YOUR-DRIVER-DIRECTORY
sudo ndiswrapper -i w29n51.inf
sudo ndiswrapper -l
you should see a message that says driver present, hardware detected

Code:
sudo ndiswrapper -m
sudo modprobe ndiswrapper
sudo echo ndiswrapper >> /etc/modules
NOTE: If the above echo command gives you a permission denied error, try this code instead:

Code:
sudo -s
echo ndiswrapper >> /etc/modules
exit
STEP 5: TEST WIRELESS

Your wifi light on your laptop should be illuminated, and you're all set! Try running this to see if your wireless card is functioning properly:

Code:
sudo iwlist scanning
Even if it doesn't detect any wireless networks in range, it will still tell you if linux is recognizing your wireless card properly. If you'd like a better way to scan for wireless networks, I'd suggest installing/using network-manager or wifi-radar.

STEP 6: Add wireless connection
Go to System-> Preference -> Network Configuration
In the Wireless tab add a new wireless connection.

This help is refer from
http://ubuntuforums.org/showthread.php?t=297092

Thursday, April 16, 2009

Linux service enable and disable on linux variant

Here I will explain different ways of enabling and disabling the system services.

1) Red Hat Method

Red Hat and Red Hat based Linux distributions make use of the script called chkconfig to enable and disable the system services running in Linux.

For example, to enable the apache webserver to start in certain run levels, you use the chkconfig script to enable it in the desired run levels as follows:
# chkconfig httpd --add
# chkconfig httpd on --level 2,3,5
This will enable the apache webserver to automatically start in the run levels 2, 3 and 5. You can check this by running the command:
# chkconfig --list httpd
One can also disable the service by using the off flag as shown below:
# chkconfig httpd off
# chkconfig httpd --del
Red Hat also has a useful script called service which can be used to start or stop any service. Taking the previous example, to start apache webserver, you execute the command:
# service httpd start
and to stop the service...
# service httpd stop
The options being start, stop and restart which are self explanatory.

2) Debian Method

Debian Linux has its own script to enable and disable services across runlevels. It is called update-rc.d. Going by the above example, you can enable apache webserver as follows:
# update-rc.d apache2 defaults
... this will enable the apache webserver to start in the default run levels of 2,3,4 and 5. Of course, you can do it explicitly by giving the run levels instead of the "defaults" keyword as follows:
# update-rc.d apache2 start 20 2 3 4 5 . stop 80 0 1 6 .
The above command modifies the sym-links in the respective /etc/rcX.d directories to start or stop the service in the destined runlevels. Here X stands for a value of 0 to 6 depending on the runlevel. One thing to note here is the dot (.) which is used to terminate the set which is important. Also 20 and 80 are the sequence codes which decides in what order of precedence the scripts in the /etc/init.d/ directory should be started or stopped.

And to disable the service in all the run levels, you execute the command:
# update-rc.d -f apache2 remove
Here -f option which stands for force is mandatory.

But if you want to enable the service only in runlevel 5, you do this instead:
# update-rc.d apache2  start 20 5 . stop 80 0 1 2 3 4 6 .
3) The old fashioned way
I remember the first time I started using Linux, there were no such scripts to aid the user in enabling or disabling the services during start-up. You did it the old fashioned way which was creating or deleting symbolic links in the respective /etc/rcX.d/ directories. Here X in rcX.d is a number which stands for the runlevel. There can be two kinds of symbolic links in the /etc/rcX.d/ directories. One starts with the character 'S' followed by a number between 0 and 99 to denote the priority, followed by the name of the service you want to enable. The second kind of symlink has a name which starts with a 'K' followed by a number and then the name of the service you want to disable. So in any runlevel, at any given time, for each service, there should be only one symlink of the 'S' or 'K' variety but not both.

So taking the above example, suppose I want to enable apache webserver in the runlevel 5 but want to disable it in all other runlevels, I do the following:

First to enable the service for run level 5, I move into /etc/rc5.d/ directory and create a symlink to the apache service script residing in the /etc/init.d/ directory as follows:
# cd /etc/rc5.d/
# ln -s /etc/init.d/apache2 S20apache2
This creates a symbolic link in the /etc/rc5.d/ directory which the system interprets as - start (S) the apache service before all the services which have a priority number greater than 20.

If you do a long listing of the directory /etc/rc5.d in your system, you can find a lot of symlinks similar to the one below.
lrwxrwxrwx  1 root root 17 Mar 31 13:02 S20apache2 -> ../init.d/apache2
Now if I start a service, I will want to stop the service while rebooting or while moving to single user mode and so on. So in those run levels I have to create the symlinks starting with character 'K'. So going back to the apache2 service example, if I want to automatically stop the service when the system goes into runlevel 0, 1 or 6, I will have to create the symlinks as follows in the /etc/rc0.d, /etc/rc1.d/, /etc/rc6.d/ directories.
# ln -s /etc/init.d/apache2 K80apache2
One interesting aspect here is the priority. Lower the number, the higher is the priority. So since the starting priority of apache2 is 20 - that is apache starts way ahead of other services during startup, we give it a stopping priority of 80. There is no hard and fast rule for this but usually, you follow the formula as follows:

If you have 'N' as the priority number for starting a service, you use the number (100-N) for the stopping priority number and vice versa.