Tuesday, January 20, 2009

Installing Essential softwares on Debian Etch

In order to install softwares like acroread and mplayer, include following line into your '/etc/apt/sources.list'

deb http://www.debian-multimedia.org/ etch main


Download the key-ring from this site and install it as follows:

$ sudo dpkg -i debian-multimedia-keyring_2008.10.16_all.deb


and then run "apt-get update". More information regarding this is available here and here.

# sudo apt-get install acroread



For flash, you need to install the package "flashplugin-nonfree" which is available in backports repository. Include following line into your sources.list file:

deb http://www.backports.org/debian etch-backports main contrib non-free

and now get keyrings for backport repository.

#apt-get install debian-backports-keyring
#apt-get update
#apt-get -t etch-backports install flashplugin-nonfree

Thursday, December 4, 2008

Mounting an external drive using volume label

The device nodes keep changing if you are pluggin in and out several different usb disks and in different orders. For various reasons for instance for file synchronization, it is useful to mount these drives according to their names.

First of all, find out the correct device partitions for usb drives.

$ sudo fdisk -l
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x4be002e1

Device Boot Start End Blocks Id System
/dev/sda1 1 1402 11261533+ 12 Compaq diagnostics
/dev/sda2 * 1403 15918 116592640 6 FAT16
/dev/sda3 15918 29975 112918572 f W95 Ext'd (LBA)
/dev/sda4 29976 30402 3420160 12 Compaq diagnostics
/dev/sda5 15918 22292 51200000 7 HPFS/NTFS
/dev/sda6 22293 22304 96358+ 83 Linux
/dev/sda7 22305 22912 4883728+ 82 Linux swap / Solaris
/dev/sda8 22913 26559 29294496 83 Linux
/dev/sda9 26560 29975 27438988+ 83 Linux

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5b6ac646

Device Boot Start End Blocks Id System
/dev/sdb1 1 24315 195310206 c W95 FAT32 (LBA)
/dev/sdb2 24316 38913 117258435 82 Linux swap / Solaris

The Usb disk is mounted at /dev/sdb.

Before changing the label, unmount the device partitions. This is very important.

$ sudo umount /dev/sdb1
$ sudo umount /dev/sdb2

Install "mtools" and "e2fsprogs"

$ sudo apt-get install mtools e2fsprogs

in order to label vfat partitions, we need 'mtools' and 'e2label' is needed for labelling ext2/3 partitions.

$ sudo mlabel -i /dev/sdb1 -s :: SWG_WIN

now check the label with following command

$ sudo mlabel -i /dev/sdb1
Volume label is SWG_WIN

$ sudo e2label /dev/sdb2 swg_lin

check the label using following command:
$ sudo e2label /dev/sdb2
swg_lin

Now edit /etc/fstab and enter following lines:

LABEL=SWG_WIN /mnt/usb_win vfat user,rw,auto,umask=0 0 0
LABEL=swg_lin /mnt/usb_linux ext3 user,rw,auto 0 0

save the file and remount them

$ sudo mount -a

More information about changing partition labels are given here.

Sunday, November 30, 2008

Drawing Rectangles in GIMP

Select a rectangular region by clicking "Rectangle Select Tool". Then click on Edit -> stroke selection. Inside this tool, you can select different line styles like continuous, dashed etc. In order to change color of the line, click on "Foreground and background color" item available in Gimp's main menu. More elaborate discussion is available in the following link:

http://pbs01.wordpress.com/2007/09/30/145/

Saturday, November 22, 2008

Setting UP NFS server/client on Ubuntu

Install NFS Server Support

This is mostly a local copy of the instructions available at this link. I have tried this howto and it works perfectly for me.


at the terminal type
sudo apt-get install nfs-kernel-server nfs-common portmap
When configuring portmap do =not= bind loopback. If you do you can either edit /etc/default/portmap by hand or run:
sudo dpkg-reconfigure portmap
sudo /etc/init.d/portmap restart


Editing /etc/exports
the /etc/exports file is used for creating a share on the NFS server

invoke your favorite text editor or
sudo vi /etc/exports

Here are some quick examples of what you could add to your /etc/exports

For Full Read Write Permissions allowing any computer from 192.168.1.1 through 192.168.1.255
  • /files 192.168.1.1/24(rw,no_root_squash,async)

Or for Read Only from a single machine
  • /files 192.168.1.2 (ro,async)
save this file and then in a terminal type
sudo /etc/init.d/nfs-kernel-server restart

Also aftter making changes to /etc/exports in a terminal you must type
sudo exportfs -a

Install NFS client support
sudo apt-get install portmap nfs-common

Mounting manually
Example to mount server.mydomain.com:/files to /files. In this example server.mydomain.com is the name of the server containing the nfs share, and files is the name of the share on the nfs server

The mount point /files must first exist on the client machine.
cd /
sudo mkdir files


to mount the share from a terminal type

sudo mount server.mydomain.com:/files /files

Note you may need to restart above services:
sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-common restart


Mounting at boot using /etc/fstab
Invoke the text editor using your favorite editor, or
gksudo gedit /etc/fstab

In this example my /etc/fstab was like this:
  • server.mydomain.com:/files /files nfs rsize=8192,wsize=8192,timeo=14,intr
You could copy and paste my line, and change “servername.mydomain.com:/files”, and “/files” to match your server name:share name, and the name of the mount point you created.
It is a good idea to test this before a reboot in case a mistake was made.
type
mount /files
in a terminal, and the mount point /files will be mounted from the server.

Gtalk Voice chat on Ubuntu

After such a long wait, today I could talk to one of my friend in India through Gtalk on linux. I am talking about voice chat. I am very much impressed with Ubuntu. Its amazing. Things had never been so easy and comfortable.

Presently Empathy supports voice calls through gtalk. The installation instructions are available here. Just for convenience, I am reproducing the set of instructions necessary to get you started with it. Visit the above site for user comments and more information if things don't work out for you.

Use Synaptic package manager, go to Settings->Repositories->Third Party Software and then click Add and add the following line

deb http://ppa.launchpad.net/telepathy/ubuntu hardy main

Then, Install the following packages using Synaptic Pagakage manager.

  1. Empathy
  2. telepathy-gabble
  3. telepathy-mission-control
  4. telepathy-stream-engine

After successful installation, open the Empathy application and use the menu, Edit->Accouts to add your gtalk account. Enjoy using voice chat with your favorite gtalk account using Empathy in Linux.

Tuesday, October 7, 2008

Data Backup and File synchronization

If you work on multiple systems like a desktop in office and a laptop in house, probably you would like to synchronize the files between the two. So far I have been using rsync to copy files from my laptop to a usb disk and then using this disk to synchronize data on my desktop at office. While rsync is faster and does not require much configuration, it is good for one way data transfer. But some time you end up with multiple copies or backing up unnecessary data files. For instance if you delete a file in one, you must do the same on the another simultaneously. Probably it can be solved by properly configuring rsync, but certainly its not straight forward for a normal user. Recently I used gui based tool like Unison for file synchronization. I found it pretty much user friendly as it reports the conflicts and allows the user to decide what to do about it. Another tool that I found useful is sBackup for creating backup of important files on your system. These days our work and life depend too much on digital media. Hence backing them up against inadvertent system crashes or human errors, has become very much crucial. sBackup provides a simple gui to configure and setup backup process. You can have complete control over the files you want to backup. You can exclude files based on extension or size. You can set how frequently backup must be taken and you can get rid of old backups which are no more relevant.

In short, file synchronization and backing up data is no more daunting on Linux.

Friday, October 3, 2008

Ubuntu - Most popular Linux

According to distrowatch, Ubuntu is the most popular linux distribution at the moment. I have used several distributions over the years like mandrake, redhat, fedora, debian. For last 2/3 years, I have been using Debian regularly and Fedora intermittently. However, one thing that annoyed me in Debian was its outdated packages. However I was afraid of going to Ubuntu as I thought it would be unstable and it would keep crashing all the time. After going through the reviews, I thought of giving it try.

You won't belive, I was just overwhelmed at its first performance. All of my hardwares got working during the first install itself ... installing flash, media players, java plugin was as simpler than writing this blog itself ... Suddenly my system looked all new and fresh ... I thought speed would be less, but I was wrong again ... It was amazingly fast ...

No wonder why Ubuntu is No. 1 Linux distro. You must give it a try ...


Some later additions:

  • Until now I preferred command line interfaces (CLI) for configuring applications like network setting, installing/uninstalling softwares, browsing and even cd writing. Its because I relied less on gui system. However after moving to Ubuntu, I started using much of gui stuff.
  • Secondly, the ubuntu forums are very good in the sense that I could get rid of most of my problems in a very short time.
  • Barring few glitches here and there, I found Ubuntu quite user friendly and easy to use.