Tuesday, October 6, 2009

check this out..


c program from a linux terminal

well here it is....how to run a C program from a linux terminal...
Distribution differences wont matter as these are the general steps::


Step 1 :

Creating a program...
U can choose any of the various editors...i chose vim.
And do not forget to save...
( U can alternatively create the file on any directory u want)

#vim hello.c

Step 2 :

#gcc hello.c


Step 3:

In olden days,,the output of the assemblers was stored in the file
a.out

so the trend continued...
and we execute this file

#./a.out

BINGO!!
enjoy..

Thursday, October 1, 2009

ubuntu tips n tricks

1. press Alt+F2 and write, "free the fish"

2. 
Open the terminal and type:
1. apt-get moo
2. aptitude help
3. aptitude moo
4. aptitude -v moo
5. aptitude -vv moo
6. aptitude -vvv moo
7. aptitude -vvvv moo
8. aptitude -vvvvv moo
9. aptitude -vvvvvv moo
Enjoy the responses.. ;)

3.
Press ALT+F2 and then type in "gegls from outer space" and enjoy the game of space invaders but with an exception – the game is played with cows !!!! :D

Wednesday, September 30, 2009

BSNL EVDO setup in linux...

ubuntu :
i used the wvdial tool to setup the modem...
type the following commands,

#sudo wvdialconf

Enter the administrator password. The modem settings will be written in the file /etc/wvdial.conf .


 #vim /etc/wvdial.conf

use any editor and enter the username password and phone no in the aforementioned file.

then save it.
the file will look like :

[Dialer Defaults]
 Init1 = ATZ
 Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
 Modem Type = Analog Modem
 ISDN = 0
 Phone = #777
 Modem = /dev/ttyUSB0
 Username = **********
 Password = **********
 Baud = 9600
 Stupid Mode = 1






Now type,

#wvdial

the output :

--> pppd: �Ť[08](Ȥ[08]
--> pppd: �Ť[08](Ȥ[08]
--> pppd: �Ť[08](Ȥ[08]
--> pppd: �Ť[08](Ȥ[08]
--> pppd: �Ť[08](Ȥ[08]
--> local  IP address 117.254.223.55
--> pppd: �Ť[08](Ȥ[08]
--> remote IP address 192.168.52.12
--> pppd: �Ť[08](Ȥ[08]
--> primary   DNS address 218.248.240.134
--> pppd: �Ť[08](Ȥ[08]
--> secondary DNS address 218.248.240.181
--> pppd: �Ť[08](Ȥ[08]



This was my output but something of this sort shows that u are connected.

NOTE: instead of #sudo wvdialconf  we can directly copy the file details in /etc/wvdial.conf

Enjoy..

installing wvdial package in ubuntu 9.04



At first I downloaded the following packages (from a pc connected to the internet, any O.S.):

1. http://packages.ubuntu.com/jaunty/i386/libxplc0.3.13/download
2. http://packages.ubuntu.com/jaunty/i386/libwvstreams4.4-base/download
3. http://packages.ubuntu.com/jaunty/i386/libwvstreams4.4-extras/download
4. http://packages.ubuntu.com/jaunty/i386/libuniconf4.4/download
5. http://packages.ubuntu.com/jaunty/wvdial/download


Note that above are all for an i386 pc.

I copied all to a USB memory stick, and then paste them to the ubuntu 9.04 running pc into /var/cache/apt/archives/ directory using sudo nautilus from terminal. Then I installed all packages by double clicking each icon (of .deb package) in above order (1,2,3,4 and finally 5). I ignored all informative messages. Finally I had to run wvdialconf, edit the /etc/wvdial.conf file and be connected with sudo wvdial.

You can get my wvdial_904_i386 zip file (size=1.04 MBytes) containing all above.
Into .zip file there is a .txt with checksums. Please CHECK all files and do it at your own risk.