7

I'm using multi-account containers in Firefox to keep my tabs separate from each other. I'm looking for a way to open new tabs in specific containers.

Using Cmd+T opens a new tab in a default container. A long click on the new tab button shows a dropdown menu of available containers and I can choose one from that list. I'd quite like to be able to do it from the keyboard though.

I've set up some domains to open in specific tabs but it's things like Gmail that doesn't work for. I have separate containers for personal and work Google accounts and want to be able to go directly to either of them.

Is there a command-line option to do this? If that was the case I could set up a third party app (such as alfred) to call Firefox with such an option to set the container.

Matt
  • 432

3 Answers3

8

Is there a command-line option to do this?

An extension is currently required to make this work…

Install the open-url-in-container extension. It's a rather simple extension and works very well. It is open-source with all of its code on GitHub: honsiorovskyi/open-url-in-container

Now, you can use URIs of the form ext+container:name=${CONTAINER_NAME}&url=${ORIGINAL_URI} to open an arbitrary URI in an arbitrarily-named container. Works via command-line invocation, entering them in the location bar, or links from other pages.

Dan
  • 474
3

Ctrl + . is the default shortcut to open the containers panel.

I found this by doing the following:

  1. navigate to the Add-ons dashboard (Tools --> Add-ons or Super + Shift + A on mac)
  2. click the gear at the top of the list
  3. click "Manage Extension Shortcuts" (this lists all shortcuts for all extensions)
crogers
  • 131
1
  1. Install the open-url-in-container extension.

  2. On Windows modify command line to the Windows registry under

    HKEY_CLASSES_ROOT\FirefoxHTML\shell\open\command

    HKEY_CLASSES_ROOT\FirefoxURL\shell\open\command

If you change the -url in the command line to ext+container:name=MyContainer&url=

from

"C:\Program Files\Mozilla Firefox\firefox.exe" -osint -url "%1"

to (where "MyContainer" is your container name you want new links to be opened in ):

"C:\Program Files\Mozilla Firefox\firefox.exe" ext+container:name=MyContainer&url="%1"

  • then all external links will launch in a "MyContainer" container.
Lukasz
  • 11