Open Bug 1777458 Opened 3 years ago Updated 3 years ago

Set as Default Browser will create unnecessary mime xml in ~/.local/share/mime/packages/

Categories

(Firefox :: Shell Integration, defect)

Firefox 108
Desktop
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: qydwhotmail, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0

Steps to reproduce:

Click "Set as Default Browser"

Actual results:

Some mime xml files are created in ~/.local/share/mime/packages/

This causes Qt mime database return wrong mime type for html files (application/x-extension-html)

See also: https://bbs.archlinux.org/viewtopic.php?id=267553

Expected results:

Return text/html

Component: Untriaged → File Handling

Hello I have tried to reproduce the issue using firefox 104.0a1(2022-07-12) on Ubuntu 22.04 but unfortunately I wasn't able to reproduce the issue.
Could you please answer the following questions in order to further investigate this issue.

  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 so can you list them?
Flags: needinfo?(qydwhotmail)

Moving this to the correct component.

Component: File Handling → Shell Integration

I am also unable to reproduce this. I tried with both Ubuntu's snap build and my own Nightly, and neither made any changes to ~/.local/share/mime/packages.

Fusion, can you please provide a few more details on your setup? Specifically:

  • Which distro do you run?
  • Which Desktop Environment?
  • Please attach the contents of about:support

Closing due to lack of information. Please feel free to re-open at any time with the requested information.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Which distro do you run?

openSUSE Tumbleweed 20221115
Which Desktop Environment?
KDE Plasma 5.26.80
Please attach the contents of about:support

Flags: needinfo?(qydwhotmail)
Attached file about:support
Status: RESOLVED → UNCONFIRMED
OS: Unspecified → Linux
Hardware: Unspecified → Desktop
Resolution: INCOMPLETE → ---
Version: Firefox 102 → Firefox 108

It seems those mimetype files are generated according to MimeType property in the desktop file.

There are 5 files created in the directory

user-extension-htm.xml
user-extension-html.xml
user-extension-shtml.xml
user-extension-xht.xml
user-extension-xhtml.xml

Severity: -- → S3

I can reproduce the file creation with the setup described in Comment 5. Using the test program in the linked thread I can reproduce the issue.

I did some debugging and it seems that these files are created when we call g_app_info_set_as_default_for_extension, here.

It's not clear to me whether there is some reason that we shouldn't make this call in this situation. I don't see anything in the documentation suggesting that this shouldn't be called in any particular circumstances. I'm inclined to say that if calling GTK code is causing problems on a distribution, then it sounds like there is a problem with GTK or the distribution. Probably a bug should be filed with one of them, but I'm not entirely sure which one. I'm guessing the distribution?

Come to think of it, this could even be a bug in Qt. I'm not really sure how any of this is supposed to work.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: