How to get firefox (and windows in general) to open in the correct Activity

Whenever I have firefox open in another activity (say “work”) and try to launch a webpage from another activity (say “browsing”), the activities will change to the one with the already open firefox instance. Is it possible to make it so that apps will open only on that particular activity on that particular desktop, it really limits the use of krunner if i have to open firefox manually in the location i want only then to use krunner with it.

Yes.

Open a new Firefox instance in said Activity.

firefox -ProfileManager -no-remote

Will enable you to create a new instance of Firefox.

firefox -P <profilename> -no-remote

Will Open that Instance

1 Like

Is there any way to avoid using terminal? Its a pain to have to open the terminal every time you want to open firefox

By making a separate launcher ( desktop application) you could.

This is how I open separate instances of Firefox.

[Desktop Entry]
Version=1.0
Name=Firefox Web Browser
Comment=Browse the World Wide Web
GenericName=Web Browser
Keywords=Internet;WWW;Browser;Web;Explorer
Exec=firefox -P default
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=firefox
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true
Actions=Default-Instance;Newspapers;Proton-Email;Banking;WebDev;Documentation;New-Private-Window;Profile-Manager;

[Desktop Action Default-Instance]
Name=Open Default Instance
Exec=firefox -P default

[Desktop Action Newspapers]
Name=Open Newspapers
Exec=firefox -P WorldNews

[Desktop Action Proton-Email]
Name=Open Proton Email
Exec=firefox -P "Proton Mail"

[Desktop Action Banking]
Name=Open Banking and Services
Exec=firefox -P Banking

[Desktop Action WebDev]
Name=Open Web Development
Exec=firefox -P WebDev

[Desktop Action Documentation]
Name=Open Documentation
Exec=firefox -P Documentation

[Desktop Action New-Private-Window]
Name=Open New Private Window
Exec=firefox -private-window

[Desktop Action Profile-Manager]
Name=Open Profile Manager
Exec=firefox -ProfileManager -no-remote
1 Like

Sorry for the late reply (Very late), I don’t get notifications that I got a message here.

Where do I add the above script?

Put it in, say, ~/.local/share/applications as nameit( preferably all but firefox ).desktop, make it executable. It then should pop up in your menu.

Quickly made it. Looks like:

1 Like