I’ve got an Obsidian vault on my Dropbox which I use from two computers. If I open it from the two computers at the same time, I soon get files like these:
I understand why this is happening, both computers are writing to the same workspace.json file and Dropbox doesn’t know which one is the version I want.
Is there a good solution to this problem? For example, having a separate workspace file for each computer so each will remember the opened tabs without affecting the other computer?
make a copy of your .obsidian folder
rename one to pc1 and the copy to pc2 – or any other name, e.g. windows, linux, etc
same drill for mobile, if anyone wants that
then on all of your platforms you need to relaunch with the new config folder (files and links > override config folder)
from now on .obsidian will be a lean only core test environment with no plugins – good for mobile users to reindex large vaults with…
downside is that from this point on, you’ll need to update any config changes of core and third party plugin functionality to other platforms…
…a batch or shell script need written to handle that (chatgpt4o or mini can be of use that but better be safe with a test vault first or git version control)
I don’t know. But when I had my vault on Dropbox I had the same issue, and I also used git for version control (I still do), so it made it slightly easier to clean some of that up from a git GUI client.
Otherwise I don’t know any way to keep separate workspace settings. Unless you were to do something sneaky like keep a nested vault inside your vault. One computer looks at the top vault, and the other computer looks at the nested vault. That might cause other issues, but it might work, especially if you use shortest-path links.
Any settings/plugins would have to be configured twice, or manually copied once in a while. But if one computer is your main computer, and the other is more of a viewer, you could keep one vault very simple with minimal configuration/plugins.
the downside is that some keyboard shortcuts are differently registered by windows and linux based on my non-english keyboard…
that was the first thing that made me want to set up different config folders
then the zotero integration plugin has different extractors for windows and linux…
then the another quick switcher plugin needs ripgrep paths that will be different for when i’m on linux and windows
mkdir "C:\ObsidianLocal\McVaulty"
type nul > "C:\ObsidianLocal\McVaulty\workspace.json"
mklink "C:\Users\Administrator\Dropbox\McVaulty\.obsidian\workspace.json" "C:\ObsidianLocal\McVaulty\workspace.json"
Just do the above on all your computers. Delete the existing workspace.json file first. Dropbox refuses to sync the symlink created by mklink. (Don’t use ln -s, it behaves differently.)
I wonder if there is any chance of having a feature that would move session sensible information to a separate file.
A user could choose in the main workspace.json file to load additional information from this separate file with a name that depends on the current device for example.
I doubt this could be accomplished via a plugin. Seems more like a core functionality.
We don’t want to change the entire folder, just the workspace file that tends to cause conflicts. If we do the entire folder, we’d have to e.g. install plugins separately on each computer.
I don’t how the recently advertised collaboration methods (I forget their names and I think they are paid solutions for business and whathaveyou - there was one for canvases and another but I forget what they are called) solve this problem. Probably they could create temporary config folders with symlinks, hard links or whathaveyou…?
My computer savvy is low to understand this without looking deeper into this.
One thing is for sure: Obsidian as it is built now is not meant to be used on two PCs at the same time, so it is not a Dropbox problem.
For workspaces, there is a separate workspace-mobile.json file which will be used if a mobile app of Obsidian is in use. But there’s no distinction between two PC app workspace files.
And even the separate workspace-mobile.json exists because the layout of the mobile or tablet workspace is different from the PC one.
And there are also other files like app.json, appearance.json, etc. so if someone would want to change settings on mobile AND PC (or any two or more platforms at all), and let the changes sync, there’d be conflicts again (which one would you want to keep?), so it’s not just workspace.json.
How you use Obsidian is finish on one platform, pick up on the other and continue with the synced changes.
If one really wants collaboration, you’re looking at using separate config folders as suggested above, hiring a programmer who knows the ins and outs of version control, hard, soft linking (on all platforms), etc., or existing collaboration methods you can Google.
To get back to the multi-config method:
You can make an exact copy of the .obsidian folder, rename it .temp and reload Obsidian with .temp. The other user(s) can do the same and this folder would be excluded from sync.
But then if all or any users will e.g. edit the Project X.md file, there’ll be conflicts to take care of again. So all users should use git and should be savvy on how to use git.
I understand that git will offer a proper merge conflict as opposed to dropbox. But using dropbox for collaboration is far more approachable for some projects and less technical people.
Communication between people can still be used to prevent conflicts. “I am working on X, you can do Y” is not uncommon. With that the conflict at note level is not an issue. But the workspace conflict is still a thing the user can control unless they close the vault entirely while not working, which limits the possibility of working in parallel.
For example I’ve been working on some lectures in a vault. I shared it via dropbox with collaborators and we have had no conflicts at note level. But we do at workspace. It’s not a huge pain, but we even need to agree on dark/light theme .
Allowing to optionally use an additional config file based on the current device name seems to be a good UX improvement to me.