Archive for the ‘Uncategorized’ Category

Install Gammu

Installing gammu is surprisingly easy (once again thanks to the wonders of apt-get), just use the following command:

sudo apt-get install gammu

Hard wasn’t it? 😉

OK now it’s time to plug your phone in and see if we can get things talking. With the phone connected, type the following command:


you should now see your phone listed as a device – for example:

Bus 001 Device 002: ID 0421:0802 Nokia Mobile Phones

if not – make sure your cables and power are all good and try again.

The gammu installation comes with some example configuration files which are worth using as a starting point – if nothing else they help you to understand how gammu can be configured so that you can tailor a solution for your needs. These are located in
/usr/share/doc/gammu/examples (in gZip archives).

Copy the gammurc file to /etc/gammurc :

sudo cp /usr/share/doc/gammu/examples/config/gammurc /etc/gammurc

Now edit /etc/gammurc to specify your port and connection type (this will vary based upon where/how you have things plugged in and what sort of cable/interface your phone is using). The settings for mine are:

port = /dev/ttyACM0
connection = dku5

Save this config and from the shell type:

gammu –identify

you should now be presented with some information regaqrding your phone such as:

Manufacturer : Nokia
Model : 7200 (RH-23)
Firmware : 3.110 T (18-03-04)
Hardware : 0903
IMEI : 353363000813894
Original IMEI : 353363/00/081389/4
Manufactured : 04/2004
Product code : 0514143
UEM : 16

If this is the case then you have got gammu up and running and can send yourself a test message with the following command:

echo “boo” | gammu –sendsms TEXT [recipient mobile number]

Thanks to rforge.wordpress.com


Read Full Post »

NFS‘ stands for Network File System

NFS‘ is a file sharing protocol which is used in the GNU/Linux and unix network.

Advantages of NFS :
1. Local workstation can use less disk space.
2. No need of maintaining seprate Home directory on every network workstation.
3. Storage device like Floppy,CDROM and Zip drives can be shared throughout the network.
4. manage data storage from single point.

NFS Server Installation :

While installing NFS, check installation extra packages nfs-common and portmap.

if nfs-common and portmap is not installed, install nfs-common and portmap along with nfs-kernel-server.


root@nfs-server:~# apt-get install nfs-kernel-server

Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
libevent1 libgssglue1 libnfsidmap2 librpcsecgss3 nfs-common portmap
The following NEW packages will be installed:
libevent1 libgssglue1 libnfsidmap2 librpcsecgss3 nfs-common nfs-kernel-server portmap
0 upgraded, 7 newly installed, 0 to remove and 8 not upgraded.
Need to get 493kB of archives.
After this operation, 1495kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://in.archive.ubuntu.com hardy/main libevent1 1.3e-1 [44.8kB]
Get:2 http://in.archive.ubuntu.com hardy/main libgssglue1 0.1-1 [20.4kB]
Get:3 http://in.archive.ubuntu.com hardy/main libnfsidmap2 0.20-0build1 [23.0kB]
Get:4 http://in.archive.ubuntu.com hardy-updates/main librpcsecgss3 0.17-1ubuntu2 [30.4kB]
Get:5 http://in.archive.ubuntu.com hardy/main portmap 6.0-4 [33.6kB]
Get:6 http://in.archive.ubuntu.com hardy-updates/main nfs-common 1:1.1.2-2ubuntu2.2 [190kB]
Get:7 http://in.archive.ubuntu.com hardy-updates/main nfs-kernel-server 1:1.1.2-2ubuntu2.2 [150kB]
Fetched 493kB in 14s (34.8kB/s)
Preconfiguring packages …
Selecting previously deselected package libevent1.
(Reading database … 134948 files and directories currently installed.)
Unpacking libevent1 (from …/libevent1_1.3e-1_i386.deb) …
Selecting previously deselected package libgssglue1.
Unpacking libgssglue1 (from …/libgssglue1_0.1-1_i386.deb) …
Selecting previously deselected package libnfsidmap2.
Unpacking libnfsidmap2 (from …/libnfsidmap2_0.20-0build1_i386.deb) …
Selecting previously deselected package librpcsecgss3.
Unpacking librpcsecgss3 (from …/librpcsecgss3_0.17-1ubuntu2_i386.deb) …
Selecting previously deselected package portmap.
Unpacking portmap (from …/portmap_6.0-4_i386.deb) …
Selecting previously deselected package nfs-common.
Unpacking nfs-common (from …/nfs-common_1%3a1.1.2-2ubuntu2.2_i386.deb) …
Selecting previously deselected package nfs-kernel-server.
Unpacking nfs-kernel-server (from …/nfs-kernel-server_1%3a1.1.2-2ubuntu2.2_i386.deb) …
Setting up libevent1 (1.3e-1) …

Setting up libgssglue1 (0.1-1) …

Setting up libnfsidmap2 (0.20-0build1) …

Setting up librpcsecgss3 (0.17-1ubuntu2) …

Setting up portmap (6.0-4) …
* Starting portmap daemon… [ OK ]

Setting up nfs-common (1:1.1.2-2ubuntu2.2) …

Creating config file /etc/idmapd.conf with new version

Creating config file /etc/default/nfs-common with new version
Adding system user `statd’ (UID 112) …
Adding new user `statd’ (UID 112) with group `nogroup’ …
Not creating home directory `/var/lib/nfs’.
* Starting NFS common utilities [ OK ]

Setting up nfs-kernel-server (1:1.1.2-2ubuntu2.2) …

Creating config file /etc/exports with new version

Creating config file /etc/default/nfs-kernel-server with new version
* Starting NFS common utilities [ OK ]
* Exporting directories for NFS kernel daemon… [ OK ]
* Starting NFS kernel daemon [ OK ]

Processing triggers for libc6 …
ldconfig deferred processing now taking place



after installation you had to configure NFS.

NFS Configuration :

NFS export from the server is controlled by /etc/exports

open /etc/exports

root@nfs-server:~# vim /etc/exports

# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync) hostname2(ro,sync)
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt)
# /srv/nfs4/homes gss/krb5i(rw,sync)


Where /home is the path, is the IP followed by kind of access option from the NFS server.

client can be specified either by name or IP address.

Wildcards (*) are allowed in names, as are netmasks (e.g. /24) following IP addresses ie.,

Some important access options are:

* ro: The directory is shared read only. This is the default.
* rw: The client machine will have read and write access to the directory.
* no_root_squash: By default, any file request made by user root on the client machine is treated as if it is made by user nobody on the server, If no_root_squash is selected, then root on the client machine will have the same level of access to the files on the system as root on the server. This can have serious security implications, although it may be necessary if you want to perform any administrative work on the client machine that involves the exported directories.
* no_subtree_check: If only part of a volume is exported, a routine called subtree checking verifies that a file that is requested from the client is in the appropriate part of the volume. If the entire volume is exported, disabling this check will speed up transfers.
* sync: By default, all but the most recent version (version 1.11) of the exportfs command will use async behavior, telling a client machine that a file write is complete ie., been written to stable storage – when NFS has finished handing the write over to the filesystem. This behavior may cause data corruption if the server reboots, and the sync option prevents this.

after you save the /etc/exports file, you need to restart NFS server by

root@nfs-server:~# /etc/init.d/nfs-kernel-server restart


You can validate the exported filesystem
root@nfs-server:~# exportfs


if you make any changes to /etc/exports on a running NFS server,you can make these changes effective by


root@nfs-server:~# exportfs -a


NFS Client Installation :

While installing NFS in client system,check intallation extra packages portmap.

if portmap is not installed, install portmap along with nfs-common.


verman@verman-desktop:~$ sudo apt-get install nfs-common
[sudo] password for verman:
Sorry, try again.
[sudo] password for verman:
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be upgraded:
1 upgraded, 0 newly installed, 0 to remove and 315 not upgraded.
Need to get 176kB of archives.
After unpacking 0B of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
Install these packages without verification [y/N]? y
Get:1 http://us.archive.ubuntu.com gutsy-updates/main nfs-common 1:1.1.1~git-20070709-3ubuntu1.1 [176kB]
Fetched 176kB in 3s (51.1kB/s)
(Reading database … 165628 files and directories currently installed.)
Preparing to replace nfs-common 1:1.1.1~git-20070709-3ubuntu1 (using …/nfs-common_1%3a1.1.1~git-20070709-3ubuntu1.1_i386.deb) …
Unpacking replacement nfs-common …
Setting up nfs-common (1:1.1.1~git-20070709-3ubuntu1.1) …
* Stopping NFS common utilities [ OK ]
* Starting NFS common utilities [ OK ]


Mounting manually:

Make a directory

verman@verman-desktop:~$ sudo mkdir /media/home
[sudo] password for verman:


mount the home directory


verman@verman-desktop:~$ sudo mount /media/home

verman@verman-desktop:~$ cd /media/home

verman@verman-desktop:/media/home$ ls
a.out Documents Music Pictures Templates Videos
Desktop Examples Public test.c



using /etc/fstab we can mount ‘home’ at boot time :

verman@verman-desktop:~$ sudo vim /etc/fstab

# /etc/fstab: static file system information.
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/hdc2
UUID=e5416125-ba06-494f-bdcb-7ab0fecfc2d3 / ext3 defaults,errors=remount-ro 0 1
# /dev/hdc1
UUID=50CCC42BCCC40D62 /media/hdc1 ntfs defaults,umask=007,gid=46 0 1
# /dev/hdc4
UUID=6448-E683 /media/hdc4 vfat defaults,umask=007,gid=46 0 1
# /dev/hdc5
UUID=77835f55-5ca9-4db1-be82-a1b90b52f7fc none swap sw 0 0
/dev/hdd /media/cdrom0 udf,iso9660 user,noauto,exec 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec 0 0

# filesystem mountpoint fs-type options dump pass /media/home nfs rw,hard,intr 0 0


where ‘’ is the path from filesystem, ‘/media/home’ is mount point and ‘nfs’ is filesystem type.

Options include two distinct failure modes:

soft :
If a file request fails, the NFS client will report an error to the process on the client machine requesting the file access.

hard :
Accessing a file on a NFS mounted file system will hang when the server crashes.The process cannot be interrupted or killed unless you specify ‘intr’. When the NFS server is back online the program will continue undisturbed from where it was. We recommend using hard,intr on all NFS mounted file systems.

* rw: The client machine will have read and write access to the directory.

Now home directory will be mounted every time you reboot the client system.

*Note: Above installation has been tried in Ubuntu 8.04 and client Ubuntu 7.10, this above information will be more useful for GNU/Linux begineers.

Read Full Post »