Showing posts with label folders. Show all posts
Showing posts with label folders. Show all posts

Monday, February 07, 2011

Sharing Thunderbird Address Books... some experience

This is a follow up to my post on Sharing Thunderbird Address Books Between Computers with Dropbox.
I've been using this for 3+ weeks now, and here's the experience.

Overall it works quite well, however:
  1. I noticed 2 occasions where the filesystem link from the address-book in the Thunderbird profile to the one in the "My Dropbox" folder got lost. The abook.mab in the profile folder then all of a sudden is a real file with not connection whatsoever to the dropbox file.
  2. Dropbox deteced one replication error and marked it accordingly, by renaming the "older" file as "abook (computername's conflicted copy date).mab"

In both cases replication of the file to and from other computers then fails.
The latter is easy to avoid - at least in my case: Don't have Thunderbird open at the same time on both computers.

Sometimes however, this is tricky, because you need Dropbox to replicate the file before you start Thunderbird on the other computer. So e.g. when you hibernate one PC whilst Thunderbird is still running (keeping the abook.mab file open and locked), the file will not get uploaded to Dropbox. When you then start Thunderbird on the second computer and modify the address-book... voila... replication conflict.

I still don't know what caused the link failure from problem #1. Will continue to monitor this.

Sunday, January 16, 2011

Sharing Thunderbird Address Books Between Computers with Dropbox

In the previous post I described how to synchronize your Thunderbird signature (file) across computers using Dropbox.

This was a fairly easy task, because Thunderbird let's you specify the signature file as an absolute path, so you can put your signature anywhere on your computer.
For whatever reasons, the address book has to reside in your profile folder.
So if you want to synchronize Thunderbird address books across computers using Dropbox, this is a bit more tricky.

First, we have to somehow have the address book file in the "My Dropbox" folder, and still in the profile folder.
Luckily, Windows XP (and later) do have links in the NTFS filesystem - contrary to what most people think/know.
Technically they are called NTFS junction points, but usually referred to as links.
You can create them with the FSUTIL utility.

So what we'll do is.
  1. Find the "master" address book
  2. move it to the Dropbox folder
  3. replace the original file in the profile folder with a link to the file in the Dropbox folder
  4. repeat step 3 for all computer.
So, assuming you already did register for Dropbox and install it, here are the details:
    1. In Thunderbird check the name of he address book you want to synchronize. In the Address Book window, select the address book of your choice and then properties. The only property there is the name.
    2. In the Config Editor, locate the file name for your address book. This can easily be done if you filter the view on "ldap_v2.servers.*.descr". This will list all the address book names you have, including the one we are looking for (from step #1).
    3. Find the id of your address book.
      It is is right behind "ldap_2.servers.".  Something like "pab" or "default".
    4. Once you have that identifier, you can get the file name from "ldap_2.servers.yourid.filename". It is most likely abook.mab. [1]
    5. Then locate your Thunderbird profile folder.
      This is (as a default) in the Thunderbird folder of your personal Application Data directory. The fastest way to get there is via Windows Start MenuRun → "%appdata%" (literally with the percent signs). Then go to Thunderbird, then Profiles and then pick the profile you want to modify (if you have more than one).
    6. Now find the file from step #4.
    7. Be sure to exit Thunderbird now, so that all files are closed and available to you.
    8. Move the file from step #6 to your "My Dropbox" folder (again, this can be easily opened by double clicking on your Dropbox icon in the task bar).
    9. Open a command line (StartRun → "cmd.exe" ) and change directory to your profile folder form step #5.
    10. Find the "My Dropbox" folder in your file system. It's quite close to the Application Data folder. Try something like a "dir %homepath%\abook.mab /S /B" to find the exact location of the file.
    11. Create the symbolic link with the following command:
      fsutil hardlink create abook.mab "..\..\..\..\My Documents\My Dropbox\abook.mab"
      Before you do this, you might want to check with dir, if the abook.mab file can really be found with the above path. Correct your path as appropriate. You can also use the absolute path from step #10.
    12. With a "dir abook.mab" verify that the "logical" file is back again with the correct size.
    13. Start Thunderbird and verify that your address book is available and correct.
    14. Go to computer #2 
    15. Repeat steps #1-12 as above, just do not copy the abook.mab (or whatever the name is) to the Dropbox folder. Only delete (or rename) it in the profile folder, before your create the link with fsutil.
    16. When you start Thunderbird you should now have all the addresses from computer #1 available.
    17. Repeat #15 for all remaining computers

    ONE BIG CAVEAT:
    I haven't been using this method for long, so I can't really say how stable this works, especially if there are "replication conflicts", i.e. when you update the file on both computers before Dropbox has a chance to synchronize. Should there arise major problems with my setup, I'll post them here.

    Comments section is of course open for your findings.

    --
    [1] in the following paragraphs I will - for brevity - only call it abook.mab; please substitute your file name as appropriate.

    Saturday, January 15, 2011

    Sharing Thunderbird Signature Between Computers with Dropbox

    Granted, having the signature file for your e-mail in sync between two or more computers is not amongst the top IT problem of the century.
    However, if you change your signature frequently (because you include some simple banner message or seasonal greetings, etc etc) it suddenly becomes important.

    In my case this is between my company laptop and my home desktop. Both have the same IMAPS access to our corporate mail server. But as IMAP and Thunderbird[1] go, you are in sync with your mailboxes, but not with all your other data, like address book and signature.

    Let's take a look at the signature first, since this is easier (from a Thunderbird perspective).

    First we need some file location that can always be accessed from all participating computers. Preferably not only online, but also when offline.

    Dropbox is the ideal solution for that: it synchronizes folders of your computer to the (cloud) storage of Dropbox. From and to multiple computers. That's the trick here.

    Let's for this use case here ignore all the photo album and public sharing or collaboration features dropbox offers. We just use it for file sync to the cloud (and back again).

    So obviously, you have to register for Dropbox and install the software on all participating computers.
    [waiting for you to do so ... ]

    The default folder is a newly created folder called "My Dropbox" in your home directory. This folder will be in sync across all computers, then.
    So let's put our signature file there:
    1. Start on the computer, where you have the most appropriate or up-to-date signature file.
    2. In Thunderbird go to your account settings (Tools >> Account Settings) and pick your account there.
    3. Check where you current signature file resides... 
    4. Go there in Windows Explorer and copy (or move) the file to your Dropbox folder.
      You can easily open your Dropbox folder with a double-click on the Dropbox icon in your status bar.
    5. Once the file is there, on the Account Settings page change your signature file to the new location. 
    6. And then - in Thunderbird - create a new email to check if it has been picked up correctly.
    7. Now the other computer. The signature file should already be in your Dropbox folder. If not, trouble-shoot that first.
    8. Once you find the file there, only change the location of the signature file in Thunderbird- as above - to the one in the Dropbox folder.
    9. Again, create a new email to verify.
    10. Repeat for all remaining computers...
    Now you can update your signature on any of those computers, and it will be picked up by the others.

    Neat, isn't it.
    And it didn't cost us a dime.

    I started this about 2 months ago and had to change my signature (a least) 3 times or more in the meantime. Works like a charme.

    The synchronization of the address book is a bit more complicated, and will be covered in a separate blogpost.

    --
    [1] and other IMAP clients

    Sunday, November 21, 2010

    How to sync photos FROM the iPad...

    This is a bit embarrassing, but I still post it here... so you others don't have to admit you didn't know this... of course you knew... everyone knew... except for me.

    So for a while I was wondering why a sync of my iPad through iTunes did not store the images generated on the iPad to the specified folder on my PC. Here's why:

    In iTunes select your iPad, then click on the "Photos" tab and select a folder there.
    This will then (everytime you sync) copy all the images from this folder on the PC to your iPad.

    OK.

    However, for the other way round it does not work through iTunes, but rather like this:

    One thing that bugged me about my iOS devices is that everytime I hook them up to my PC, Windows prompts me to select an action or application for this device... Quite annoyed me because... hey... you're supposed to connect to iTunes... duuh.

    So iOS devices register themselves to your PC as a camera as well. Still I thought: How stupid, my iPad does not have a camera. And neither does my iPod touch.

    Well, in some weird way it is a digtial camera: from a Windows / interface perspective the iPad is a device that creates and (more importantly) stores images. Just like a digital camera.

    So images you create on your iPad (e.g. as a screen shot, or email attachment, ...) can easily be sync'd to your PC through this interface then. Windows (or the program of your choice) will do the transfer for you.

    Odd, though, that Apple suddenly relies on Windows features...

    So, this is how you sync photos from your iPad to your PC... but of course, everyone knew that.

    Wednesday, August 15, 2007

    Windows: add cmd to folder

    Yet another windows customization reminder:

    Since I frequently have to open a command prompt right from the folder that I'm on in explorer, I'd like to have a context menu entry for folders that does this.


    Here's the way to do it:


    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Command Prompt]

    @="Command Prompt here"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Command Prompt\command]

    @="Cmd.exe /k pushd %L"

    Other ways to do it and more tipps in that category can be found here.

    Monday, August 13, 2007

    Customize Placesbar (Folderlist) in Windows File Dialog


    And while I'm in the "knowledge preservation" mode - this is some piece of information I was look for years (well, not constantly, but every once in a while). I simply did not google for the right thing.

    Task: How do I get any (arbitrary) folder into the short-cut bar in the Open/Save-As Dialog in Windows (XP) ?

    Not just History, My Documents, My Computer, ... no one needs those.


    Answer: First of all, one has to know (i.e. find out) that this short-cut bar is referred to as "places bar" and those folders listed there would then be places.

    This way it is much more effective to google for.


    The places bar is defined in the registry under HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ comdlg32\ PlacesBar
    and consists of 5 entries (this seems to be fixed in the code, I could not find any reference to changing the number of entries),
    called Place0-Place4.


    For each place you can (read: have to) define its location in the filesystem or a handle to well known or pre-defined windows places.


    You must enter the predefined places as numeric values (DWORD), e.g. My Pictures=39, Desktop=0, etc.
    There are places on the web, where those values are listed.
    I show an excerpt from here. at the end of this post.




    Now I'm pretty sure that - like me - you don't just want to have any of those folders there, but something
    else, like "D:\download" or whatever. In that case you make a String (instead of the DWORD) and just enter the name of the folder ("d:\download") as the value.


    My placesbar at home looks like this (on my business laptop I have more "personal" places defined than just one) and the
    registry (ready to import ;-)) like this:




    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\comdlg32\PlacesBar]

    "Place0"="d:\\download"

    "Place1"=dword:00000000

    "Place2"=dword:00000005

    "Place3"=dword:00000011

    "Place4"=dword:00000012




    There are also tools on the web that help you create the respective registry entries. All you have to do then is, copy/paste those to your computer and import the resulting file into the registry.

    There you go, quite easy actually.



    Here are some of the folder definitions:






















    FolderHexDecimal
    Desktop00
    My Computer\Control Panel33
    My Computer\Printers44
    My Documents55
    Favorites66
    Recent88
    My Musicd13
    My Videose14
    Desktop1016
    My Computer1117
    Network Neighborhood (My Network Places)1218
    All Users\Start Menu1622
    All Users\Start Menu\Programs1723
    All Users\Startup1824
    All Users\Desktop1925
    Application Data1a26
    USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning3b59