Bug 2307907

Summary: Allow spawning new windows with different profile
Product: [Fedora] Fedora Reporter: Katerina Koukiou <kkoukiou>
Component: firefoxAssignee: Gecko Maintainer <gecko-bugs-nobody>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 42CC: erack, gecko-bugs-nobody, jhorak, klaas, rstrode, stransky, suraj.ghimire7
Target Milestone: ---Keywords: RFE
Target Release: ---Flags: kkoukiou: needinfo? (gecko-bugs-nobody)
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2262415, 2282112    
Attachments:
Description Flags
extlinks WIP files none

Description Katerina Koukiou 2024-08-26 13:24:44 UTC
In Anaconda Web UI we use firefox with a custom profile that looks like kiosk mode. [1] in order to achieve the desired application like view, with hidden bookmarks, top nav bar and more.

The users are able to open links to normal web pages through the Anaconda Web UI , which is running with this custom firefox profile. Such links are for example bugzilla, which is used for reporting bugs in the installation and a few more.

All external links, (all other than the anaconda Web UI locally accessible link) should be opened with a new instance of firefox that does not use that custom profile, but uses the default firefox profile.

Looks like this is currently not possible.

[1] firefox theme: https://github.com/rhinstaller/anaconda-webui/blob/main/firefox-theme/live/user.js

Note: this is blocking https://bugzilla.redhat.com/show_bug.cgi?id=2262415 which will be a blocker bug for the Web UI getting into Fedora 42 as Workstation ISO installer. Please take that in mind for the target dates.

Reproducible: Always

Comment 1 Martin Stransky 2024-08-27 05:57:11 UTC
Created attachment 2044926 [details]
extlinks WIP files

Comment 2 Martin Stransky 2024-08-27 05:58:01 UTC
It may be fairly easy, you just need to register new protocol handler and create a new launcher for it. There's a WIP I tested locally:

1) create new desktop file (extlinks.desktop for instance) and register new protocol (extlink://) and handler for it
2) create system wide launcher (/usr/bin/firefox-ext) which replaces extlink with https
3) update desktop database and try xdg-open extlink://ct24.cz for instance, it should open the new launcher
4) open the test1.thml page, it should open new FF instance (you need to restart firefox to fetch new protocols).

All WIP files are attached above.

Comment 3 Martin Stransky 2024-09-02 08:33:01 UTC
It may be possible to spawn the new Firefox window in semi-WPA mode - i.e. without URL bar, just a window with Web content. It may or may not contain titlebar so user can close the window. Just let me know what you need.

Comment 4 Katerina Koukiou 2024-09-04 11:29:10 UTC
Hey Martin thanks for the advice - your suggested solution works quite nice. 
I just have one small issue with double window opening, see the PR description for details. https://github.com/rhinstaller/anaconda-webui/pull/428 

I would appreciate any further hints.

Comment 5 Aoife Moloney 2025-02-26 13:11:17 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.