Tuesday, December 28, 2010

How to send gpg encrypted emails ?

1) Install Thunderbird mail client
2) Install the add on enigmail
3) send encrypted/signed mails via thunderbird

Sunday, December 26, 2010

How to delete a gpg key pair ?

How to revoke a gpg key ?

1) generate the revocation certificate

gpg --gen-revoke [Key-ID] > [ filename ]


2) Revoke the key

import revocation certificate created in the previous step

gpg --import [ filename ]



Exporting & Importing gpg keys:-

exporting public keys:-

gpg --export -a Keyname > keyfile


exporting a private key:-

gpg --export-secret-keys -a keyname/keyid >> keyfile


Importing keys:-

gpg --import Keyfile


NB:- -a used for creating ASCII version

How to generate finger print of your gpg keys ?

gpg --fingerprint keyname/keyid

why finger print your key ?

1) to generate the hash of the key
2) used to verify the key


Ex:-


zodiac@ubuntu:~$ gpg --list-keys
/home/zodiac/.gnupg/pubring.gpg
-------------------------------
pub 2048R/C6E7D2CB 2010-12-19
uid celsius thomas (celsius A.T)
sub 2048R/2D8037DF 2010-12-19


zodiac@ubuntu:~$ gpg --fingerprint C6E7D2CB
pub 2048R/C6E7D2CB 2010-12-19
Key fingerprint = 5562 3B1A C9F8 D210 6580 987D 3C1B 9A3F C6E7 D2CB
uid celsius thomas (celsius A.T)
sub 2048R/2D8037DF 2010-12-19

Asymmetric Key Encryption & Decryption using gpg

Encryption:-

gpg -a -r ( recepient-keyID ) --encrypt ( filename )

-a is ascii option ,it is needed only if you need encrypted file in ascii format

Decryption:-

gpg --decrypt ( encrypted-file )

Monday, December 20, 2010

Using GIT to Manage Config Files:-

A good use of GIT is to manage the configuration files in a GNU/Linux system.

1) create a git repository in /etc
cd /etc ; git init
2)
git add .
git commit -am "Initial commit. /etc now under version control"


3) From now on every time you modify a file you can do

git add
git commit -m "Description of the change to "


4) To see your pending changes do: git status

5)if some files are to be removed, run git add -u .

Monday, December 13, 2010

compiling postgis after installing postgres

see:- http://www.postgresonline.com/journal/index.php?/archives/147-Compiling-PostGIS-1.5-and-installing-after-Yum-PostgreSQL-Install.html

Readyboost feature in Linux




use your pendrive as swap to emulate Windows ReadyBoost feature ?


windows has a nice feature called Ready Boost that allows your pendrive to be used as temporary swap space to boost the performance of your computer.sice the pen drives have lower access times than hard disks , using your pen drive as swap can boost your performance.for this you will need to use a Ready-boost capable pen drive, ready boost capable pen drives works best.



1) dd if=/dev/zero of=/media/disk/extraswap bs=1M count=1024

2) mkswap /media/disk/extraswap

3) swapon -p 32767 /media/disk/extraswap

4) to turn the pendrive swap off , swapoff /media/disk/extraswap


Pros:-

1) The seek time on a small flash drive is much faster than a HDD.


Cons:-


1) it's a false economy. Any performance boost you get will be poor. You'd get much better value out of actual RAM.

2)Readyboost would be quicker than a hard drive for swap but agreed it can kill off a flash drive (they only have so many read/write cycles) and it's really just a band-aid.



Raistlin355:-


Since I heard about the "Vista Readyboost" I immediately thought of the swap file in Linux and the pagefile in Windows (same thing just different names) and I wondered "What would be the use for this?!?" and then it hit me. Vista wants like 2gb of memory to run smoothly and M$ knew this but they wanted people to upgrade their OS so they came out with readyboost so people with old machines didn't have to buy ram and go through the *hassle* of installing it, they could just plug in a usbn drive and viola!! no more swapping. Now having used this on a Vista box with 512MB of memory, readyboost is the worst, the performance you get is crappy (as usb xfer rate is slower than RAM) and it wore out my usb drive in 2 days. Someone said earlier itt "Typical M$ gimmick" that is true, it is no more than a gimmick to get people who don't know any better to buy their crappy os.


see:-
http://ubuntuforums.org/showthread.php?t=395435
http://apcmag.com/readyboost_for_linux.htm

Thursday, December 9, 2010

open office tricks

1) How to create the following style line in open office ?



soln:- Soln:- press ~ character continously then press Enter key

Wednesday, December 1, 2010