Monday, December 21, 2009

Startup error with Thunderbird 3.0

Updated to Thunderbird 3.0 released a month back from its beta version with lightning installed but was greeted with a 2 error messages. On starting the client.

Error dialog:
An error was encountered preparing the calendar located at
moz-profile-calendar:// for use. It will not be available.

The issue was locked under bugzilla at redhat, to be a schema issue with the database used for the calender which was to be updated.

So finally followed the steps and the issue was solved, and the calender was back in action.
1. Closed Thunderbird.
2. Switched to the profile directory of thunderbird.

# /home/sawrub/.thunderbird/*********.default
3. Located the directory holding the calender data.
ll calendar-data/
4. There was the local.sqlite file which actually is a SQLite database.
5. Enter the sqlite console, by executing the command an dwas greeted with the corresponding prompt as.
[sawrub@mybox calendar-data]$ sqlite3 local.sqlite
SQLite version 3.6.12
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>
6. Updated the database.
sqlite>
sqlite> ALTER TABLE cal_relations ADD recurrence_id INTEGER;
sqlite> ALTER TABLE cal_relations ADD recurrence_id_tz TEXT;
sqlite> ALTER TABLE cal_attachments ADD recurrence_id INTEGER;
sqlite> ALTER TABLE cal_attachments ADD recurrence_id_tz TEXT;
sqlite>
7. Quiting the client.
sqlite> .exit
8 . Restarted the Thunderbird and the issue was gone, as no error pop-ups were seen and the local calender data was also visible.

Sunday, December 20, 2009

Dock the Appications

The day can be called successful one again as found a application that works with any kind of window managers having being tested with Gnome, KDE, XFCE as mentioned by the developer/s. So considered to give a try.
1. Installation was quick as its just a 95k package.

# yum install -y kdocker.i586

2. Using it to Dock.
The Docker application was found under Applications > Accessories > KDocker. Selecting the Docker turned my pointer into a kind of stock gun target. Decided to dock thunderbird, hence clicked the mouse on the application window, and it was done.

3. The icon looked a little bad but considering the work done can be acceptable.Here is the screen shot of how the docked thunderbird looked like.



4. Once docked the application can be undocked  by a single click on the docked icon of the application.

5. As seen in the above screen shot there is a terminal also docked along with the thunderbird.

Great thanks to the development team.A small info about the application as read under "yum info kdocker.i586".

"KDocker will help you dock any application in the system tray. This means you

can dock openoffice, xmms, firefox, thunderbolt, eclipse, anything! Just point
and click. Works for both KDE and GNOME (In fact it should work for most modern
window managers that support NET WM Specification. I believe it works for XFCE,
for instance)

All you need to do is start KDocker and select an application using the mouse
and lo! the application gets docked into the system tray. The application can
also be made to disappear from the task bar.

KDocker supports the KDE System Tray Protocol and the System Tray Protocol from freedesktop.org

Very few apps have docking capabilities (e.g. Yahoo! and XMMS don't have any).
Even if they do, sometimes they are specific to desktops (working on KDE but
not on GNOME, and vice versa). KDocker will help you dock any application in
the system tray. This means you can dock OpenOffice.org, XMMS, Firefox,
Thunderbird, etc. Just point and click. It works for KDE, GNOME, XFCE, and
probably many more."


Saturday, December 19, 2009

Bash Scripting Cookies

- Passing arguments to a Bash script.

`basename $0` in the script will list the name of the script without the path.
`dirname $0` in the script will list the absolute path of the script without the name.
`$0` will list the full path 'URI' of the script.
`$#` will list the count of the arguments passed to the script.
`$*` will be listing all the arguments passed to the script.
`$1` will be listing the first argument passed to the script.

- If conditional statements

Condition
Meaning
[ -a FILE ]
True if FILE exists.
[ -b FILE ]
True if FILE exists and is a block-special file.
[ -c FILE ]
True if FILE exists and is a character-special file.
[ -d FILE ]
True if FILE exists and is a directory.
[ -e FILE ]
True if FILE exists.
[ -f FILE ]
True if FILE exists and is a regular file.
[ -g FILE ]
True if FILE exists and its SGID bit is set.
[ -h FILE ]
True if FILE exists and is a symbolic link.
[ -k FILE ]
True if FILE exists and its sticky bit is set.
[ -p FILE ]
True if FILE exists and is a named pipe (FIFO).
[ -r FILE ]
True if FILE exists and is readable.
[ -s FILE ]
True if FILE exists and has a size greater than zero.
[ -t FD ]
True if file descriptor FD is open and refers to a terminal.
[ -u FILE ]
True if FILE exists and its SUID (set user ID) bit is set.
[ -w FILE ]
True if FILE exists and is writable.
[ -x FILE ]
True if FILE exists and is executable.
[ -O FILE ]
True if FILE exists and is owned by the effective user ID.
[ -G FILE ]
True if FILE exists and is owned by the effective group ID.
[ -L FILE ]
True if FILE exists and is a symbolic link.
[ -N FILE ]
True if FILE exists and has been modified since it was last read.
[ -S FILE ]
True if FILE exists and is a socket.
[ FILE1 -nt FILE2 ]
True if FILE1 has been changed more recently than FILE2, or if FILE1 exists and FILE2 does not.
[ FILE1 -ot FILE2 ]
True if FILE1 is older than FILE2, or is FILE2 exists and FILE1 does not.
[ FILE1 -ef FILE2 ]
True if FILE1 and FILE2 refer to the same device and inode numbers.
[ -o OPTIONNAME ]
True if shell option “OPTIONNAME” is enabled.
[ -z STRING ]
True of the length if “STRING” is zero.
[ -n STRING ] or [ STRING ]
True if the length of “STRING” is non-zero.
[ STRING1 == STRING2 ]
True if the strings are equal. “=” may be used instead of “==” for strict POSIX compliance.
[ STRING1 != STRING2 ]
True if the strings are not equal.
[ STRING1 < STRING2 ]
True if “STRING1” sorts before “STRING2” lexicographically in the current locale.
[ STRING1 > STRING2 ]
True if “STRING1” sorts after “STRING2” lexicographically in the current locale.
[ ARG1 OP ARG2 ]
“OP” is one of -eq, -ne, -lt, -le, -gt or -ge. These operators are binary in nature, hence return true if 'ARG1' is equal to, not equal to, less than, less than equal to, greater than, or greater than equal to 'ARG2' respectively. 'ARG1' & 'ARG2' being integers.

Sunday, December 13, 2009

Script to take backup of Mails

The script was written to take the backup of the mails on weekly bases using cron. The script use to kill Thunderbird in my case and then start taking the backup so that no new mail comes in while the backup is in progress, a kind of cold backup.

#Script to take backup of Mails
#!/bin/bash
PID=`pidof thunderbird-bin`
LOC="/home/sawrub/.thunderbird/8vqt6zno.default/Mail/"
DAY=`date +%F`
REPORT="/tmp/Mail_REPORT"
echo -e "`date`: Starting Mail Backup" > ${REPORT}
echo -e "`date`: Going to Kill Thunderbird, PID : ${PID}" >> ${REPORT}
kill -9 $PID >> /dev/null
echo -e "`date`: Thunderbird Killed Successfuly" >> ${REPORT}
cd $LOC
FILE="Mail_${DAY}.tar.bz2"
echo -e "`date`: Backup Starts at `date +%R`" >> ${REPORT}
echo -e "`date`: The backup will be saved as ${FILE}" >> ${REPORT}
tar -cjpf /data/mails_backup/${FILE} *
su - sawrub -c thunderbird
echo -e "`date`: Backup Completes" >> ${REPORT}
sleep 5
echo -e "`date`: Thunderbird starts of successfully as PID :`pidof thunderbird-bin`" >> ${REPORT}
SIZE=`du -h /data/mails_backup/${FILE}|awk '{print $1}'`
echo -e "`date`: Backup size is ${SIZE}" >> ${REPORT}
mail sawrub -s"Mails Backed Up" < ${REPORT} sleep 2 rm -rf ${REPORT} #Delete the stale Mail backup Data

Wednesday, December 9, 2009

Google released Beta version of Chrome for Linux

Google is out with its 'Beta' build of its browser for Linux , in just couple of weeks after the unstable build was made live for public.

The Beta version of the browser like its Windows build is fast, secure, stable, simple, extensible, and embraces open standards like HTML5. All of the user who have installed the unstable version will have to un-install the older unstable version and then install the new 'BETA' version available under the Linux repository from Google as mentioned in the earlier post.
The process of installation is just the same, with minor changes.
1. Search for the available packages for Google Chrome

[root@mybox ~]# yum search chrome
Look in the search results for packages by name 'google-chrome', packages similar to following will be listed.
google-chrome-beta.i386 : Google Chrome
google-chrome-unstable.i386 : Google Chrome
3. Check if the unstable version is installed.
[root@mybox ~]# yum list installed |grep google-chrome
If a row mentioning the installation of the unstable version is there then we need to remove that.
4. In order to remove the Unstable version, just need to fire the command.
[root@mybox ~]# yum erase google-chrome-unstable
5. Once the unstable version have been un-installed. Then the beta can be installed following steps.
[root@mybox ~]# yum -y install google-chrome-beta
6. It can be run in the similar way.

Source : http://blog.chromium.org/2009/12/google-chrome-for-linux-goes-beta.html

Saturday, December 5, 2009

Google Public DNS.....step towards dictatorship

Google Public DNS is a free, global Domain Name System (DNS) resolution service, that you can use as an alternative to your current DNS provider.
To try it out:

  • Configure your network settings to use the IP addresses 8.8.8.8 and 8.8.4.4 as your DNS servers or
  • Read our configuration instructions.
If you decide to try Google Public DNS, your client programs will perform all DNS lookups using Google Public DNS.
Source :http://code.google.com/speed/public-dns/

Try out OPEN DNS  [http://www.opendns.com/]

http://blog.opendns.com/2009/12/03/opendns-google-dns/

The Gift from Traffic


Today was the ....

Here is the latest a fully off topic thing....My farewell mail sent to the people i worked/ interacted at XXXXXX India

[Mail]

From: Saurabh Sharma
Reply-to: sawrub@yahoo.co.in
To:
Bcc:
Subject: Today was the ....
Date: Fri, 04 Dec 2009 15:30:38 +0530

Hi All,

By god's grace, your well wishes and efforts from my side, finally the day has come when I can subject a mail like this, and be in a situation to bid you all a special bye. And this is how I'll like to orate out the whole thing.

- Today was the last morning when I had to get up early at 5:30 AM get ready and then run past the stray dogs barking at me for disturbing them at that hour, and also fearing a call from office that the cab has left from the pick-up point, though i had been a victim of the same a couple of times.

- Today was the last morning when I was supposed to log-in to my Linux box and do some maths for getting the sum up at 8+ Hrs for the activities done yesterday and then stamp the same under effortUpdate.jsp, a bit of which used to be fake.

- Today was the last morning, heading towards the coffee dispenser, with a fear of finding a Cockroach floating happily. Though by luck got none, compared to what I saw in other cups.

- Today was the last morning when I waited impatiently for Rattan to come in, and inquire about the Lunch menu and then wait for the clock to click 1 o'clock.

- Today was the last afternoon when I would have heard a word coming in from the next cubical "Every one does work.....do some MAGIC" by Mr MA**J. The most motivational line of my life :-).

- Today was the last afternoon when I would have heard from my colleague of a girl's visit to the floor, and then seeing the trail of fellow men moving towards the reception one after the other peeping in the waiting room.

- Today was the last afternoon when I had the chance to rush out at the reception after having lunch to find my turn at the Carrom, making my way through the people always present there like Mr. SU**L,Mr. PU**T,Mr.TR***K,Mr. TA**N,Mr. AR***D,Mr. GA***V.

- Today was the last afternoon when the wait for the long awaited 'Company Party' finally ended up in vain, dreaming the same enjoyment that we used to have.

- Today was the last day of receiving the 'Click Drop Alarm' from M1, and getting the whole NOC/QA/Dev people down to work fearing a bug in their rolled out CC.

- Today was the last day when leaving office at 4:30 PM [Non - DST] even after spending out extra half an hour of the shift timing, was like going back home on half day. With words like 'Aaj Jaldi' [early today] coming from friends.

- Today was the last day I could have got a mail from my manager for enjoying a Pizza Party late night, just for the sake of meeting the deadline.

- Today is the last day of mine at the 2nd Boys Hostel apart from the one in my college. With both being quite memorable in different respects.

From the very day I joined XXXXXX I came to know that this is the place where i had to be in order to face the technical world ahead. I entered this world of  web and comparison shopping as a child.Working here along with Mr M*****j B*****a and Mr R*******h G*****a was really a great experience, which helped me in carving my path. The challenging, competitive and dynamic environment that we worked in really helped me in knowing the hidden potentials and hence helped in proving myself and getting to the place where I'm.

Working over here at XXXXXX with such great minds specially the people in SEM group, instil a feeling of pride. Getting the opportunity to work with such experts at
this very early stage of my life clearly helped me gain a lot.

I wish you all a very best of luck.

Please feel free to contact me at following networks.
# Google Wave : luckysharma11@googlewave.com
# Google Mail : luckysharma11@gmail.com
# Yahoo : sawrub@yahoo.co.in
# Freenode : sawrub
# Facebook : SAWRUB
# Twitter : saw_rub
# Linkedin : http://in.linkedin.com/in/saurabh11

Oops I missed the Subject :  Today was the last day at XXXXXX.

--
Thanks
Saurabh Sharma
http://sawrub-blog.blogspot.com
Open your doors.......It's time to look beyond Windows

[/Mail]