Bug 425374 - Open links in current activity browser instance
Summary: Open links in current activity browser instance
Status: REPORTED
Alias: None
Product: plasma-browser-integration
Classification: Plasma
Component: Firefox (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-15 10:09 UTC by gudvinr+kde
Modified: 2022-06-26 05:39 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gudvinr+kde 2020-08-15 10:09:38 UTC
SUMMARY

If you have multiply Firefox profiles every link you open inside external app will open in bworser instance associated with "default" profile.

Instead, environment should be aware of opened browser instances on current activity and open links there.

This also may be the case for chromium-based browser but may be not.


STEPS TO REPRODUCE
1. Have Firefox be set as default browser
2. Open multiple instances of Firefox with different profiles on different activities
3. One of instances should be with default profile
4. Other ones are started with custom profiles
5. Open URL in non-browser application on activity with non-default profile

OBSERVED RESULT
Link is opened in different activity in browser instance with default profile.

EXPECTED RESULT
Link should be opened in browser on current activity with whatever profile it has.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0

ADDITIONAL INFORMATION
Firefox Version: 79.0
Comment 1 pcjago 2021-03-22 08:19:43 UTC
Firefox's "switch to tab" functionality also has this problem - it switches to ANY duplicate tab, which means it can switch activity without warning or without realizing it!

(...I typed this from inside the wrong activity without noticing).
Comment 2 Cristian Le 2021-11-09 00:57:50 UTC
I have been trying out [activity-aware-firefox](https://gitlab.com/hook/activity-aware-firefox) and although it's rough around the edges, it highlights what we need for an activity aware browser:

- When opening the application, the profile of the current activity should start: (Supported by activity-aware-firefox)
   - This is done by having a separate launcher that reads the current activity and then launches the standard firefox with appropriate profile. 
- Starting/Stopping the activity should restore the proper profile: (Not supported with activity-aware-firefox)
   - Because the program being run is still standard firefox, the activity has no way of knowing that it should run the wrapper
   - A workaround would be to completely wrap the browser as a separate program (probably like [activityfox](https://github.com/LeonidKalichkin/activityfox)). There could be issues with how it interacts with other instances though. If anyone knows something about it, it would be helpful to know.
- Ability to open a default profile (Easy hack ontop of activity-aware-firefox)
- Ability to open a link from a specific activity/profile:
   - This is more on the general side of activity, i.e. we need an `open in activity` drop-down context menu option available for all programs. So far I don't think there are any such global menu items, but it should be possible to add it as the context menu display it's controlled by kde.
- Running multiple profiles on the same activity (e.g. sharing the window of the default one with all activities) should show different icon groups: (Not supported with activity-aware-firefox)
   - Probably this can be alleviated if we use a wrapper approach, but also for the wrapper, it needs to somehow distinguish itself even as the executable is the same.