Weird: multiple Vivaldi instances and saved sessions.



  • I use two Vivaldi instances with separate profiles:

    open -n -a /Applications/Vivaldi.app --args --profile-directory="profile1"
    
    open -n -a /Applications/Vivaldi.app --args --profile-directory="another-profile"
    

    (See Ruario's GIST: https://gist.github.com/ruario/59a80c7ba4a936f311c8116e2d32e186 .)

    Both profiles are set to "Startup" with "Last session" ("Preferences" > "Startup"). But, after closing all Vivaldi instances and when I invoke the two instances again, one of them "forgets" its saved session. 100% of the time.

    When I close the Vivaldi instances, I first click on the red "Close" button on each instances. After that, I "Quit" Vivaldi from the context menu on the taskbar Vivaldi icon.

    Is this a bug? I thought the last session is saved for each profile.



  • @ryofurue The --profile-directory= option is meant to be used to start Vivaldi (or Chrome/Chromium) with the specified user profile. I did some digging but was not able to confirm whether or not it's actually safe to use this option when invoking multiple/parallel instances of Vivaldi.

    FYI, the Chromium portal recommends using --user-data-dir= to point to a (non-shared) custom User Data Directory any time that you want to invoke multiple instances of Chrome/Chromium. This guidance would apply to Vivaldi as well.

    https://www.chromium.org/user-experience/user-data-directory
    https://www.chromium.org/developers/creating-and-using-profiles

    If I find any additional information on this topic, I'll post an update.



  • @xyzzy said in Weird: multiple Vivaldi instances and saved sessions.:

    FYI, the Chromium portal recommends using --user-data-dir= to point to a (non-shared) custom User Data Directory any time that you want to invoke multiple instances of Chrome/Chromium. This guidance would apply to Vivaldi as well.

    That's wonderful! Thank you. Your suggestion works perfectly. For a record and for other people who might be interested, this is what works:

    open -n -a /Applications/Vivaldi.app --args --user-data-dir="$HOME/Library/Application Support/Vivaldi/yourprofile1"
    

    Strangely, the settings in the profile directory created by the option --profile-directory= are ignored even though the same directory is used by both approaches. (I actually checked that's the directory before ever using --user-data-dir. And, no, I don't have .../Vivaldi/yourprofile1/yourprofile1 :-)) So I had to configure the non-default profile again, but once it's done, the second instance is working truly independently.



  • @ryofurue In your previous setup, the profiles shared configuration and runtime data. While you can launch Vivaldi with a specific profile using the --profile-directory= option, it's problematic running multiple instances simultaneously.

    The --user-data-dir= allows you to have multiple logical installations from a configuration perspective, and allows you to have multiple instances running simultaneously because they're not sharing any data. (This is what enables the so-called Standalone Installations.) That's also why you had to redo your configuration from scratch. It's not pretty but at least it works.

    I'm glad that your new setup is working out well for you. Hopefully, someday, there will be a better and cleaner way of doing this.



  • @xyzzy said in Weird: multiple Vivaldi instances and saved sessions.:

    In your previous setup, the profiles shared configuration and runtime data.

    Thank you for the explanation. That explains the weired behavior I described.

    I'm glad that your new setup is working out well for you. Hopefully, someday, there will be a better and cleaner way of doing this.

    Let's hope so. The situation isn't still ideal. For example, you can't open a link in the other instance of Vivaldi.

    What I actually need is the capability of maintaining multiple separate logged-in states of a single site. Specifically I daily use two Google accounts.

    I have used Firefox for this purpose. Naturally I don't like it. The two browsers behaves differently. I'm sometimes confused. (For example, the context menus are different.) That's why I've started to explore the possibility of having two independent instances of Vivaldi.



  • @ryofurue FYI, the Firefox developers have been working on something that they call Containers as a more elegant way to solve your particular problem. It's been a work-in-progress for ages but now seems to be getting even more focus.

    https://wiki.mozilla.org/Security/Contextual_Identity_Project/Containers

    I submitted a feature request a few months ago to bring something similar to Vivaldi as well.

    https://forum.vivaldi.net/topic/13217/feature-requests-for-1-7/266

    It didn't get many votes at the time but hopefully the Vivaldi product planners will still give this request some consideration.


Log in to reply
 

Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.