Launch vivaldi with specific session/workspace
-
Hi!
I'm experimenting with creating a monitoring-wall with vivaldi browser window containing three tabs, set up with page-tiling in grid.
I would like to be able to run a script, and it will launch vivaldi with either a specific workspace I have created, or from a stored session. Is there a launch parameter I can use, or any other way of creating a shortcut directly to these pages in the predefined configuration?
Preferably, the setup would be able to use pre-existing cache, but any changes made in the session would be discarded, so that it can be started from the original session or workspace after, and not start any other web-page which might have been added.
My progress so far is to use --user-data-dir to specify which workspace will open. This opens all the correct pages - with the correct tiling grid, but this stores every change in the user data folder, making it unreliable.
-
@Parkchap Hello and Welcome to the Vivaldi Community
Vivaldi is based on Chromium, and so you're limited to what it offers in terms of startup parameters.
https://peter.sh/experiments/chromium-command-line-switches/AFAIK there's no command to specify a session file to open, nor for specifying workspaces (specific to Vivaldi).
You can open specific profiles, but they will be saved.
My progress so far is to use --user-data-dir to specify which workspace will open.
This does not specify workspaces, this specifies what directory to use for User Data. See the docs I linked:
"Directory where the browser stores the user profile."You have:
- User Data
- Default
- Profile 1
- Profile 2
- etc...
To select a specific profile use
--profile-directory
- User Data
-
@Pathduck
Using the user data dir works surprisingly well considering the limited options. The video wall consists of two separate browser windows, with two different workspaces launching on two monitors. This works alright when I have specified separate user data folder for each of them, to make sure both of them start up, and not just the last opened workspace twice.I believe it just starts up due to starting the previous session stored in the user profile, but it works mostly for my purpouse. Would be ideal to open from stored sessions to make sure no data is saved, but i understand how it could be limiting using chromium. I've looked through all the command line switches, but could unfortunately not find anything, except maybe --window-workspace=ID
-
@Parkchap I guess you could (in theory at least) copy the content of the Sessions folder to create a "template". Or the whole profile when you got it set up. Then recreate the sessions/profile from scratch using the copied "template" files.
Not sure how Vivaldi stores Workspaces or if it's the same as in Chromium/Chrome.
-
Thank you for your reply. I was actually thinking about looking into a solution like this tomorrow, using robocopy to restore the user data folder to my preferred default state after each browser restart. Should be easy to incorporate into the script, might have to add in a bit of delay into the startup though to make sure the reset is complete.
Will let you know how it goes.
-
@Pathduck
Kind of benched the project a bit, as the interfaces we plan to have visible haven't really been made yet. Did do some testing though, and it seems to work fine. Takes a bit of time though to copy everything over at every launch. Would be nice to clear only the necessary cache instead of the entire user folder every time. Do you know what would be the most crucial to delete? I assume it would be sessions, and likely a few other things. -
@Parkchap Depends how you do it.
You could just clear and then copy the Sessions folder over from a template, which should work.
Or you could delete the cache folders from the template to save time on copy. Then delete the whole used profile folder and copy it over from template.
It should be obvious from the names what folders are cache, and if you check the size of these folders you can see what matters most. Generally the cache folders contains a lot of small files which obviously will take a long time to copy over. Stuff like this should be safe to delete, just delete the folders:
Cache
Code Cache
GPUCache
IndexedDB
Local Storage
Service Worker
Session Storage -
Hey there. I would like to integrate Vivaldi Workspaces into my small browser-picker app https://browsers.software/ but there doesn't seem to be a command line argument to specify workspace id
Is there a chance to get support for that in a future release?
Thanks!