Summary: | Default Applications > Web Browser "in an application based on the contents of the URL" is confusing and undocumented | ||
---|---|---|---|
Product: | [Applications] systemsettings | Reporter: | skierpage <skierpage> |
Component: | kcm_componentchooser | Assignee: | Unassigned bugs mailing-list <unassigned-bugs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | aspotashev, bugs, lueck, nate, sgsghu |
Priority: | NOR | ||
Version: | 5.3.0 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
skierpage
2015-05-18 00:02:04 UTC
Here's what I did. First you need a menu item for your preferred browser. If that browser already appears in the (K) application launcher > Applications > Internet menu then you're set, otherwise you need to create it with (K) application launcher > Right-click Applications > Edit Applications... and then follow the only-somewhat out-of-date instructions in https://docs.kde.org/stable5/en/kde-workspace/kmenuedit/quickstart.html , dodging issues like Bug 346316. This will create a ~/.local/share/applications/MyPreferredBrowserName.desktop file. You probably want to copy many of the config lines over from a similar browser .desktop file shipped by your distribution, e.g. /usr/share/app-install/desktop/firefox:firefox.desktop Now, go into System Settings > Applications > Default Applications > Web Browser and choose 'in the following browser" and choose Known Applications > Internet > your preferred browser. I think this will set [General] BrowserApplication[$e]=MyPreferredBrowserName.desktop in ~/.kde/share/config/kdeglobals You can always/as well/instead? go into System Settings > Applications > File Associations, search for html, png, etc. and for each one in the Application Preference Order click [+ Add...] and add Known Applications > Internet > your preferred browser. I think this will update a line in ~/.local/share/applications/mimeapps.list for that mime type. (The annoying thing here is that any decent browser supports a dozen or more mime types ( text, xml, rdf, svg, png, jpg) and URI schemes beyond just "Web pages, but it's so fiddly to make it the default for them all.) I still don't know whether to choose "in an application based on the contents of the URL" or "in the following browser". It's even worse: This option wreaks havoc on links that contain personalised tokens and generate an immediate redirect to the personalised content since it opens the preferred browser based on the URL in the location header of the original URL's response. If this URL contains a session identifier, the browser fails to pick-up the correct session, as can be seen in bug #354822 I filed some hours ago. I just hit my head again against the problem reported in comment https://bugs.kde.org/show_bug.cgi?id=347870#c2 Please remove content inspection option from default browser, it's broken by design! *** This bug has been marked as a duplicate of bug 100016 *** Git commit 7bd7f38400b953a988a2cc942a518339e0b094a8 by Nate Graham. Committed on 23/12/2018 at 04:14. Pushed by ngraham into branch 'master'. [KRun] when asked to open link in external browser, fall back to mimeapps.list if nothing is set in kdeglobals Summary: Right now, when KRun is invoked to open an `http` or `https` link in a browser, it checks the `BrowserApplication` key in `~/.config/kdeglobals`. If nothing is set there (which is the default), then it introspects the link and figures out for itself what app to open, which is slow and can cause problems with certain links (see CCBUGs below). This patch improves the browser discovery logic by additionally looking for a default browser in `~/.config/mimeapps.list`, which is the XDG file and it's where browsers set themselves as the default. So if there is a default browser set in there, KRun will consume that information immediately instead of doing the time-consuming and possibly error-inducing link introspection round-trip. Related: bug 100016 Test Plan: 1. Open System Settings > Applications > Default Applications > Browser and click "In an application based on the contents of the url" (which is the default setting, but you might have changed it) 2. Set `BrowserApplication[$e]=` in `~/.config/kdeglobals` 3. Ensure that `~/.config/mimeapps/list` has a default browser set 4. Open any KDE app > Help menu > About KDE > Click on one of the links in the dialog Without this patch, a KRun job is spawned that shows up in the notification widget and the link may take a second or two to open in your default browser. With this patch, the link instantly opens in the browser. Reviewers: #frameworks, broulik, cfeck, elvisangelaccio, dfaure Reviewed By: dfaure Subscribers: dfaure, rdieter, achauvel, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D17371 M +13 -0 src/widgets/krun.cpp https://commits.kde.org/kio/7bd7f38400b953a988a2cc942a518339e0b094a8 |