Closed Bug 1867064 Opened 1 year ago Closed 1 year ago

Firefox doesn't follow symlinks when checking for default browser

Categories

(Firefox :: Shell Integration, defect, P3)

Firefox 120
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: david.turner, Unassigned, NeedInfo)

Details

Steps to reproduce:

  • Start on Debian bookworm with Firefox installed systemwide and x-www-browser set to /usr/bin/firefox using update-alternatives
  • Create x-www-browser.desktop in /usr/share/applications/ containing the following
[Desktop Entry]
Type=Application
Name=Preferred Browser
TryExec=/usr/bin/x-www-browser
Exec=x-www-browser %U
Terminal=false
StartupNotify=true
NoDisplay=true
MimeType=text/html;text/xml;application/xml;application/xhtml+xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https
  • xdg-settings set default-web-browser x-www-browser.desktop
  • Now, start Firefox and look in Settings to see if it thinks it's the default browser

Actual results:

Firefox says it isn't the default browser

Expected results:

Firefox is the default browser. It thinks it isn't because /usr/bin/x-www-browser is not /usr/bin/firefox. But /usr/bin/x-www-browser is a symlink to /etc/alternatives/x-www-browser which is a symlink to /usr/bin/firefox.

When working out what the current default browser is, Firefox should follow symlinks (probably in nsGNOMEShellService::KeyMatchesAppName() in browser/components/shell/nsGNOMEShellService.cpp). For this case to work it would have to follow multiple levels of symlinks.

The Bugbug bot thinks this bug should belong to the 'Firefox::Shell Integration' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Shell Integration
Severity: -- → S3
Priority: -- → P3

Hello! I have tried to reproduce the issue with firefox 122.0a1(2023-12-08) on Ubuntu 22.04, unfortunately I wasn't able to reproduce the issue on my end.
Could you please answer the following questions in order to further investigate this isssue.

  1. Does this issue happen with a new profile? Here is a link on how to create one: https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles
  2. Does this issue happen in the latest nightly? Here is a link from where you can download it: https://www.mozilla.org/en-US/firefox/channel/desktop/
  3. Do you have any addons installed? If yes could you please list them?
Flags: needinfo?(david.turner)

Since we never got a response to comment 2, I'm going to go ahead and close this. We can reopen it if we get one.

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.