0

On Windows, I could install two different instances of Firefox linked to two different profiles. There were two icons on the desktop and on the start menu to see which one is which.

I just migrated my computer on Ubuntu 18.04 LTS with i3-wm and I use rofi as menu.

I would like to know if it's possible to launch two different profiles of Firefox using rofi and assign each profile on a different workspace.

For example: If I have Firefox-A and Firefox-B as profiles, I would like to being able to launch Firefox-B on workspace 2 just by launching it from rofi. If I launch Firefox-A, it should open on workspace 1.

Thank you very much.

Pilot6
  • 92,041
Bravo2bad
  • 327
  • 1
  • 5
  • 18

1 Answers1

2

First, locate firefox location on your machine with:

$ which firefox
/usr/bin/firefox

Then you could create two scripts looking like:

#!/usr/bin/env bash

/usr/bin/firefox -P profileA
#!/usr/bin/env bash

/usr/bin/firefox -P profileB

And make them executable: chmod +x firefox-A firefox-B

Then, you just have to put those files somewhere in your PATH (~/.local/bin, or /usr/bin), rofi/dmenu will automatically find them and show them as any other binaries.

If you need specific assignation of each profile into each workspace in i3, you may want to set specific class for each profile like so:

#!/usr/bin/env bash

/usr/bin/firefox -P profileA --no-remote --class firefoxA
#!/usr/bin/env bash

/usr/bin/firefox -P profileA --no-remote --class firefoxA

and then, into your i3 configuration you will have something like:

for_window [class="firefoxA"] move to workspace (your workspace number)
avallete
  • 179