Option: Open Last Used Vault or Open Vault Selector

Rather than Obsidian always opening the last vault that you had open when it was closed I think it would be helpful if there was a toggle in the settings to either behave as it does now, or always present you with the screen that is shown when you click on “open another vault” so that you can choose where you want to start.

Currently if one has multiple vaults that they’re frequently shifting between, it creates an extra step to have to manually open the vault that you want & then close the one that opened automatically.

14 Likes

Agree with the idea.
For workaround, I use URI for a shortcut

And pin it in my taskbar
image

More detail about URI is here

3 Likes

I was looking if somebody requested this before starting a new feature request.

My request is to just make Obsidian remember the vaults you had open previously instead of just opening one vault.

In IntelliJ and Visual Studio Code I can have multiple windows open with different projects and close and open the programs and all the windows with all the open tabs will show up again.

I was looking the same feature, just open a dialog and select the vault.

The link that offers @jokysatria to help us has changed and is Using obsidian URI

This feature got implemented in Obsidian 0.10.1

1 Like

So one can now change between the setting being “open last vault” and “show me vault menu to select a vault to open”?

If yes, where? can’t seem to find it.

What was added/changed was these two items:

  • On macOS, closing the last vault and re-activating Obsidian will now re-open the last vault instead of opening the vault switcher.
  • On macOS, quitting and restarting the app will properly restore the opened vaults.

So, no setting or customization on how Obsidian starts up.

For the record, I’d love a preference for showing the Vault Chooser on startup rather than “Last Obsidian Vault that was closed” as the current way makes startup depend on how you shut down your Obsidian Vaults before.

5 Likes

Feature: A toggleable switch that lets me have the Open Vault window open on app launch.

Why: I’m currently trying to build a system for my university work whereby I have each of my courses as a separate vault (due to how totally unrelated they are), as well as maintain a personal vault for my own information. It would be really useful I could have the “open vaults” window open on startup.

12 Likes

An upcoming release will include URL scheme support, such that you can create links to different vaults by writing a link like so: obsidian://vault/Math or obsidian://vault/Physics%20and%20Chemistry—or even to a specific note.

You could then put those links elsewhere to create your own menu. Would this fix your issue?

4 Likes

As a user of multiple vaults, it would be great to be able to open the app and choose between the vaults right away instead of opening whichever one happened to be last opened.

There are already a few settings on the launch window like language, adding a checkbox that says “open to launch window every time” would do wonders for my day-to-day workflow.

1 Like

Maybe this is related with your feature request:

So, for those who want start obsidian with Open Vault window, there is one way.
Did this only on Windows 10, so don’t know how to achieve Open Vault window on Mac or other OS (Other Windows versions might have some differences or nuances).

DO THIS ON YOUR OWN RISK.

  1. Go to %appdata%\obsidian folder. Full path: C:\Users\*username*\AppData\Roaming\obsidian. For example, with my nickname it would be C:\Users\Ellanxis\AppData\Roaming\obsidian.
  2. Find obsidian.json file.
  3. MAKE A BACKUP IN CASE SOMETHING GOES WRONG. If you mess up this file nothing really bad shouldn’t happens. In worst case you can just delete this file, but you will have to re-add all vaults, because obsidian store paths to them in this file.
  4. Open file with any text editor. It’s plain text file. I would suggest use VS Code, because you can press hotkey(Shift+Alt+F by default) or open command palette(Ctrl+Shift+P → enter Format Document) and format json into more readable view. By default it’s one big line.
    There is how my file looks after VS Code formatted it.
  5. ts – its last opening time (don’t know for sure, of course), used to sort a vaults list in Open Vault window. If you want sort vaults in a certain order, you can manually open vaults one by one in obsidian either you can copy the biggest value and paste to others decreasing by 1 each time. You can see this what I did for my 2-4 vaults at screenshot above.
  6. See "open": true line in first vault record? This line tells obsidian which vault was opened last time and which will open at next app start.
  7. Delete this "open: true line AND ALSO !!! DELETE COMMA ON LINE ABOVE !!!. If you edit json in default one-line format it would be look like this:
    изображение
    Again, you need delete "open":true and comma before it.
  8. Result will be looks this:

    Or:
    изображение
  9. Save and close file.
  10. At next app start it will open Open Vault window, but after you will open any vault, "open":true line will appear again.
  11. To avoid this you need open properties for obsidian.json file (Open context menu on the file → properties). After that tick Read-Only checkbox → Apply → OK.

That’s all. If you don’t mess up something, obsidian should open Open Vault window every time when you run app.

CONS \ NUANCES:
If you will try add\open new vault it would open (in my case), but wouldn’t add to vaults list at Open Vault window. It happens, well, because we ticked Read-only checkbox and obsidian can write anything to this file. If you need add new vault to list at Open Vault window, you should open properties of obsidian.json again, uncheck Read-only checkbox-> Apply->OK, then add new vault(s) and then repeat steps and delete "open":true line and comma before it.

4 Likes

Instead of pick vault on start-up, on could implement this as a long-click on the obsidian icon. A pop-up could show all available vaults and one could choose before even opening the app: [Feature] App shortcuts/3D touch - #2 by Gnuelp

If there were a commandline option under windows we could have several icons, one for each vault. At least on windows it seems to be quite simple. Unfortunately I was not able to find such a possibility.

You can use several icons to do this.

Use case or problem

Opening Obsidian opens that last vault when really I want a different vault. This wastes time as sometimes vaults take a bit of time opening up and then require me to go to the vault picker myself.

Proposed solution

Allow a setting that gives the user the choice between:

  • Open the last vault
  • Open the Vault switcher

Current workaround (optional)

  • Wait until Obsidian opens the last vault (sometimes it’s more than one) and many plugins can cause some vaults to open very slowly
  • Open the vault switcher manually
  • Open the new vault
  • Close to other vault that was opened

Related feature requests (optional)

I noticed that the feature I was looking for (and opening a request for) has been requested multiple times already (e.g. this post and [this post]( Option: Open Last Used Vault or Open Vault Selector - Feature archive - Obsidian Forum)). And they all point to an existing topic: Pick vault on app lauch.

However, that topic seems to have been deleted. If the feature request already exist, I would appreciate a link to it. If not, then I would like to officially request it.

1 Like

I’m also using Git Bash on my Windows, so I’ve created a workaround script that modifies Obsidian’s obsidian.json file and changes all "open":true values to "open":false before launching Obsidian. That way my Obsidian always launches with the vault selector instead of reopening the last vault. The only downside to this is every time I launch Obsidian, a terminal window shows up for a moment, but it’s just a minor inconvenience to get a very convenient feature.

I’ve figured it might also be helpful to see if I could do it with Windows PowerShell, so people could use this even if they don’t have Git Bash on their systems. Here’s how I’ve set up both versions:

Git Bash version

  1. Create a script file wherever it is convenient for you. Call it something like Obsidian.sh.
  2. Edit the script and put this code in:
sed -i 's/\"open\":true/\"open\":false/g' /c/Users/YourWindowsUserName/AppData/Roaming/obsidian/obsidian.json
start obsidian:

Just remember to replace “YourWindowsUserName” with your actual user name.

  1. Right-click on the script file and click “Create shortcut”.
  2. Put the shortcut file where you want it. You can also pin it to your taskbar or start menu by right-clicking and selecting appropriate option.
  3. Change the name of the shortcut. If you want, you can also change the icon to match Obsidians by right-clicking the shortcut, going into Properties, clicking the “Change Icon…” button and putting %USERPROFILE%\AppData\Local\Obsidian\Obsidian.exe as the icon location.

Windows PowerShell version

  1. Create a script file wherever it is convenient for you. Call it something like Obsidian.ps1.
  2. Edit the script file and put this code in:
$filePath = "c:\Users\YourWindowsUserName\AppData\Roaming\obsidian\obsidian.json"
(Get-Content $filePath).Replace("`"open`":true","`"open`":false") | Set-Content $filePath
start obsidian:

Just remember to replace “YourWindowsUserName” with your actual user name.

  1. Right-click on the script file and click “Create shortcut”.
  2. Right-click on the shortcut and go into “Properties”.
  3. In the “Target:” field, before your scripts location, put this in:
powershell -noLogo -ExecutionPolicy unrestricted -file 

So your final target should look something like this:

powershell -noLogo -ExecutionPolicy unrestricted -file C:\Obsidian.ps1
  1. Put the shortcut file where you want it. You can also pin it to your taskbar or start menu by right-clicking and selecting appropriate option.
  2. Change the name of the shortcut. If you want, you can also change the icon to match Obsidians by right-clicking the shortcut, going into Properties, clicking the “Change Icon…” button and putting %USERPROFILE%\AppData\Local\Obsidian\Obsidian.exe as the icon location.
4 Likes

This is a great interim solution, thank you!

After the latest update Obsidian has stopped to open the last used vault and now it asks me to choose a vault on every start. Is it supposed to work like this?

Maybe it’s a good idea to have a toggle between open the last vault and open vault switcher.

Hello everyone, A newbie here… I dont know how to back to the vault I first created. Everytime I open obsidian, it shows .the last opened/ latest vault as a default vault.
Can someone help?