jobisoft / TbSync

[Thunderbird Add-On] Central user interface to manage cloud accounts and to synchronize their contact, task and calendar information with Thunderbird
https://github.com/jobisoft/TbSync/wiki/About:-TbSync
Mozilla Public License 2.0
803 stars 54 forks source link

Is there any support for roaming profiles? #728

Open simonhughxyz opened 4 weeks ago

simonhughxyz commented 4 weeks ago

I have a somewhat unusual situation, I have a DIY roaming profile set up using Thunderbird on various machines and a GPO that syncs users Thunderbird profile on logon.

However, I recently figured out that TBSync requires a DeviceID to be unique for each machine as stated in #716 and when the roaming Thunderbird profile is synced to a new machine it conflicts with the old machine due to said DeviceID being the same.

I was wondering if there is any possible solution to this? Is there a config option to get TBSync to auto generate a new DeviceID or some other way?

Any help would be greatly appreciated and thank you for your good work.

jobisoft commented 3 weeks ago

If the entire profile is synced, then it also has the exact same state data. It should work on this scenario, except if some files of the profile are not synced. Or are you using those roaming profiles in parallel, so the states can indeed run into conflicts?

This should work:

  1. machine A downloads the profile, syncs stuff, uploads the modified profile and shuts down
  2. machine B downloads the profile, syncs stuff, uploads the modified profile and shuts down
  3. machine A downloads the profile, syncs stuff, uploads the modified profile and shuts down
  4. machine C downloads the profile, syncs stuff, uploads the modified profile and shuts down
simonhughxyz commented 3 weeks ago

Yes some users will be using the roaming profile in parallel, which is where I was having the issues.

Also, not all files are synced, only some of the files that contain the user configuration, not their data (I don't have the exact files in front of me right now).

It is a little hacky, but works fine as long as a user does not use more then one machine.

Is there any possible way to get it to work with two machines logged on at the same time using the same profile?

jobisoft commented 3 weeks ago

Is there any possible way to get it to work with two machines logged on at the same time using the same profile?

Unfortunately, this is not possible. For other reasons, this should actually be prevented altogether. Thunderbird itself expects exclusive access to the profile.

simonhughxyz commented 3 weeks ago

Is there any possible way to get it to work with two machines logged on at the same time using the same profile?

Unfortunately, this is not possible. For other reasons, this should actually be prevented altogether. Thunderbird itself expects exclusive access to the profile.

Sorry, I did not make myself clear. I don't mean for two instances of Thunderbird to use the same profile. But rather that two separate instances of Thunderbird use two separate local (To the computer) copies of the Thunderbird profile. However the two local copies are clones of a profile which is kept on a network share per user, so they have the same TBSync DeviceID

To clarify:

jobisoft commented 3 weeks ago

Ok, thanks for the clarification.

Is the master profile updated by one of the clients, or is it only used as a template for first setup on a new machine?

The clientID needs to be transmitted to the EAS server during first setup and cannot change, the template profile therefore may not have a fully setup TbSync account, but must be setup on each cloned profile. We could add a preference, which contains setup information and TbSync reads the pref and runs an auto-setup during startup, creating an new clientID and auto-selecting the to-be-synced resources. I would accept a PR for this, but do not know how much work I can put into this myself.