Tuesday, March 17, 2009

Mozilla shared b/w Windows and Ubuntu

I like Ubuntu as i have already stated in my earlier posts. However, I am not a Linux geek and I am quite dependent on Windows for everything which is more difficult than 2+2.

However, a fast internet connection and loads of info available on the internet is making my life easier on my attempt to go the open-source way.

Recently, I wanted to import all my settings for Mozilla including plugins, bookmarks etc from Windows partition to Ubuntu. This is how a achieved it.

Step 1. Create a symbolic link from Ubuntu partition to the windows partition where the Mozilla settings exist.
In windows it exists in the following path by default c:/Documents and Settings/{USER_PROFILE}/Application Data/Mozilla where USER_PROFILE is your profile name.
In Ubuntu it exists in the following path /home/{USER_PROFILE}/.mozilla

To create a symlink use the following command
ln -s /media/WinHome/Documents and Settings/USER_PROFILE/Application Data/Mozilla" /home/deepak/.mozilla
Step 2. This happens typically because in Linux folder names are case sensitive. i.e home is not same as Home. So you will have to rename the folders in the .mozilla link to all lower case. i.e extensions and firefox. That's it, Just close the firefox browser and reopen it. You should be able to see all your plugins enabled and the bookmarks loaded properly. Ubuntu Rocks :-)

Wednesday, March 4, 2009

Lotus Notes - Creating an Agent


Personally I hate lotus notes. But then again, i do not like to live without tinkering with stuff to supposedly automate things. Hence, recently i tried to do something which i had done earlier with OUTLOOK

This is basically an automation which will keep changing the quote in your email. So each time i send an email a new quote gets attached to it. The logic is pretty much simple. Here are the steps that i followed to do this in lotus.
  1. First create a list of quotes; that is the basic ingredient
  2. Create A html file with the quote place in the appropriate place. Like in my case the quote appears in bold at the end of the email signature in the email.
  3. Third, add this signature to your email. This can be easily done by just going to preferences, and selected the appropriate HTML file as you
  4. Now starts the real fun. Create a new "Agent". As per lotus notes help, agents are the means by which we can automate small time tasks. We shall use this to do our signature_upadater as i call it.
  5. Give the agent a name and then select private.Note that in Lotus the menu keeps changing based on what you are looking at. So to be able to get the create menu you should have your inbox opened.Next what you need to do is write some code.
  6. I have a schedule based signal changer.My agent runs every 1 hour and updates the signature. This means every hour I have a new quote in the signature.
  7. You can start with a few declarations like i have here. I assign values to these globals in the init routine.
Dim G_fileNum As Integer Dim C_filePath As String Dim C_signatureFilePath As String Dim C_maxFileLines As Integer

7. Now the idea is that every time the agent runs it will go an update the html file, so that next time you read a memo is
created it will automatically have a new quote. To do this i have created a function that look like this

This function searches a random quote ( i call it quips) from the file whose name is stored in C_FilePath and returns it.
I am a lousy coder...so i have got this to run...but i am sure there are a 100 better ways of doing this.


8.
The GetQuip function is invoked from the main routine. It updates the HTML. Since, this is also similar to the previous code, i will not bore you by posting it.


At the end make sure that you choose where this agent runs. I have chosen it to run on local so that it is not really all that slow. I am not sure if i can get it running on server due to security polices and also because this is not a shared agent. Thus, I have been successfully replicated the behavior i used to get from Outlook with my signature changer macro :-).

The intention of this post was to just bring awareness about agents and what they can do for you, especially if lotus is killing you :-) ( Like it is doing me!!)