Tuesday, March 16, 2010

Connect to internet using Huawei ETS 1201 modem in Ubuntu

This is for people, who are out there, having the Huawei ETS1201 modem in their hand and are unable to connect to the Internet through Ubuntu. Its not simple, but its not too hard either, just follow the steps.

NOTE: Here, I am using the Ubuntu version 9.04, this may not work in all other ubuntu versions. Remove the quotes in quoted text

1] Get wvdial and all its dependencies from http://www.debian.org/distrib/packages. Downloading all the dependencies are essential

2] Try installing wvdial installation deb, it should give you an error telling that a certain dependency is not found

3] Search for that particular dependency and run it, the dependency will show an error telling that, for running it, you need another dependency... continue doing this until a dependency gets installed

4] Imagine that you were ascending a ladder until now, you reached the top, so you have to go back. Descend by installing the dependencies which forced you to ascend

5] A Dependency may need more than two dependency packages, in that case, you will have to repeat the  3rd step

6] The last few steps will take a lot of time, in my case, about 3 hours!, dont mind it, trying hard and installing all the dependencies will get you to the bottom of the stairs, ie. to Installing wvdial

7] Press Alt + F2 and type "gksu gedit /boot/grub/menu.lst"  press enter, enter your root password, and within no time, you will be presented with the menu.lst

8] Find the line "title Ubuntu jaunty (development branch), kernel 2.6.28-11-generic
uuid 44daa138-
39e6-450f-b840-76940da90d1f
kernel /vmlinuz-2.6.28-11-generic root=UUID=f2441938-7359-49d7-95eb-81f36a166757 ro quiet splash
initrd /initrd.img-2.6.28-11-generic
quiet"

9] Copy the block of text and paste it below the orginal,  this saves your system if something goes wrong

10] Append the following command to the end of "ro quiet splash",
"usbserial.vendor=0x12d1 usbserial.product=0x1010" so that now, it will look like,
"title        Ubuntu jaunty (development branch), kernel 2.6.28-8-generic
root        ()/ubuntu/disks
kernel        /boot/vmlinuz-2.6.28-8-generic root=UUID=588058EB8058D15C loop=/ubuntu/disks/root.disk ro quiet splash usbserial.vendor=0x12d1 usbserial.product=0x1010
initrd        /boot/initrd.img-2.6.28-8-generic"

11] Check if the newly added command is in the kernel line and not broken into two lines of text

12] Shutdown the system, switch off the modem

13] Switch the modem on, after the coverage LEDs light up, switch the system on

14] After bootup process,  press Alt + F2, type gksu gedit /etc/wvdial.conf, copy the following text,
"[Dialer defaults]
Modem = /dev/ttyUSB0
Baud = 230400
Phone = #777
Init1 = ATZ
Stupid Mode = 1
Dial Command = ATDT
Username = username
Password = password
PPPD Options = crtcts multilink usepeerdns lock defaultroute"

14] Replace the username and password with your own, eg.
Username = 4782186567 Password = 6567

15]  Save the file, then Press Alt + F2, type gksu gedit /etc/resolv.conf, press enter

16] Add the following text there,
"nameserver 192.168.52.12
nameserver 117.254.20.126"

NOTE: Your nameserver may be different from mine, go to internet connection details in windows xp, and note down the server shown below your ip address. Note down the number and replace the Server IP given above

17] Open up a new terminal by pressing Alt + F2 then typing, "gnome-terminal"

18] type passwd, it will ask you for new root password, type it and confirm it

19] type su, then type the password you created in the last step, now, you are root!

20] type in the command "wvdial", the system should connect you to the internet, please check if the modem is switched on before typing the command

NOTE: If the connection is dropped, you wont be able to dial again, until next reboot

Thats it!!! Now you have the power of internet in your favorite linux distribution, press Alt + F2 , type firefox, then press enter to get started

Wednesday, March 3, 2010

Force Quit unresponsive apps in Ubuntu

You may have had a situation in which the app you were using suddenly stopped responding and you had to restart the whole system to make it running again. By adding the Force Quit applet to the gnome terminal, you can forget the tedious restarts and start getting things done faster, to add this,

1] Right click on the gnome panel, Click on add to panel

2] Double click on Force quit from the list of applets

3] The Force quit applet gets added to the gnome panel, and shows the icon of a broken window


4] To force quit an Application Click on the broken window icon of Force quit applet then click on the unresponsive App

6] Confirm the decision by clicking on Force Quit

Feel extra-geeky by shutting down linux from terminal

This is one of my most favorite tricks, that helps me to reduce the use of mouse. To get started, you just need a mind to learn a new command
 
Press Alt+F2 and type gnome-terminal to bring up terminal, then type in the following command:
"shutdown -option time" where -option can include the following commands
-r Reboot
-P Power the system off (shutdown)
-H Halt the system
-h Halt or power down the system
-c Cancel a shutdown command

eg.1: If you want to shutdown the system with "0" waiting time
"shutdown -P 0"

eg.2" If you want to reboot the system with "0" waiting time
"shutdown -r 0"

NOTE:

0 means 0 minutes, if you enter 1, the time for countdown timer will be 1min

To cancel the shutdown process, you can either bring up another terminal, then type in the command "shutdown -c", or press Ctrl+C in the terminal in which the shutdown command is running

Monday, March 1, 2010

Commands for running common Applications

Here is a list of commands that I frequently use for running my programs.
Press Alt + F2, then type any of these commands and press enter

Firefox: firefox
Empathy: empathy
Terminal: gnome-terminal
Dictionary: gnome-dictionary
Pidgin chat client: pidgin
Twitux twitter client: twitux
Video Lan Client: vlc
Acrobat Reader: acroread
Audacity: audacity
Calculater: gcalctool
Banshee: banshee
DosBOX emulater: dosbox
Evolution: evolution
Frozen Buble: frozen-bubble
Gnome DO: gnome-do
Gnome PPP: gnome-ppp
Gnome-format: gnome-format
Gwget download manager: gwget
Mplayer: gmplayer
Gnome chat client: xchat-gnome

Change the default application for handling files in Ubuntu

As you may have experienced, Ubuntu always likes to open most of the file types with softwares that came preinstalled with it. Some video files wont work with the Movie player and thus you are forced to right click every time time you want to open a video. Lets learn how to change it,

1] Right click on a video file who's file handler you want to change

2] Select Properties, the propery window appears

3] Click on the Open With tab

4] If the desired program is not in the list, Click Add, then browse for the
program

5] Or click on custom command, type the command for running the program,
eg. "vlc" for running Video Lan Client

6] Clck Add

7] Select the new program by clicking on the Radio button next to it

8] Click Close

9] Now, all the files with the same extension will run with the desired software

Install Way2SMS desktop client on Ubuntu

I am using the Way2sms desktop client by Shailesh Soliwal for Windows on my Ubuntu system.
The software is a boon for SMS junkies as it allows you to send text messages with going through all the ads in Way2sms website. You will need SMS Client, a Way2sms or sms7.in user-ID, Java runtime library for windows and wine
Being a noob-friendly blog, I think I should explain how to install it.

1] Press Alt+ F2

2] Type 'gnome-terminal'

3] Press enter or click on run

4] type 'su apt-get install wine'

5] The system will ask you, your user password, type it and press enter (you wont see visual feedback while typing)

6] Press y for confirming the installation

7] After installation is done, exit the terminal by typing 'exit' then press enter

8] Go to: http://javadl.sun.com/webapps/download/AutoDL?BundleId=37981 and download the file

9] Install the file by right clicking on it and seleting"open with wine windows program loader"

10] It may take a minute or two for the installer to load, but once it is loaded, the installation is done quickly

11] Go to: http://shaileshsoliwal.blogspot.com/2009/10/send-free-sms-using-way2sms.html and find the download link for stable version of Way2sms Desktop client (do not download .jar version ie. Java API)

12] Download the file right click on it, then select "open with wine windows program loader"

13] The Desktop client appeards

14] Type in your way2sms login id, ie. your phone no without +91

15] Type in the password and check the checkbox password

16] Type in the reciever's phone number, you can use a comma to add another phone number

17] Make sure way2sms is selected as the service

18] Type in the message

19] Click send button
You can add contacts to the phone book by enter data in the fields by double clicking them and then typing