Firefox opens pdf file with Gimp when evince is expected

Bug #1933972 reported by Beowulf
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
firefox (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Whenever I download a PDF file in firefox the file is opened with GIMP. Expected behavior: PDF files should be opened with evince.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: firefox 89.0.1+build1-0ubuntu0.20.04.1
ProcVersionSignature: Ubuntu 5.4.0-74.83-generic 5.4.114
Uname: Linux 5.4.0-74-generic x86_64
AddonCompatCheckDisabled: False
ApportVersion: 2.20.11-0ubuntu27.18
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: sgr 4469 F.... pulseaudio
 /dev/snd/pcmC0D0p: sgr 4469 F...m pulseaudio
BuildID: 20210614221319
CasperMD5CheckResult: skip
Channel: Unavailable
CurrentDesktop: Unity:Unity7:ubuntu
Date: Tue Jun 29 14:32:02 2021
DefaultProfileExtensions: extensions.sqlite corrupt or missing
DefaultProfileIncompatibleExtensions: Unavailable (corrupt or non-existant compatibility.ini or extensions.sqlite)
DefaultProfileLocales: extensions.sqlite corrupt or missing
DefaultProfilePrefErrors: Unexpected character ',' before close parenthesis @ /usr/lib/firefox/omni.ja:greprefs.js:355
DefaultProfileThemes: extensions.sqlite corrupt or missing
EcryptfsInUse: Yes
ForcedLayersAccel: False
IfupdownConfig:
 # interfaces(5) file used by ifup(8) and ifdown(8)
 auto lo
 iface lo inet loopback
InstallationDate: Installed on 2018-01-06 (1269 days ago)
InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 (20170801)
Profile0Extensions: extensions.sqlite corrupt or missing
Profile0IncompatibleExtensions: Unavailable (corrupt or non-existant compatibility.ini or extensions.sqlite)
Profile0Locales: extensions.sqlite corrupt or missing
Profile0PrefErrors: Unexpected character ',' before close parenthesis @ /usr/lib/firefox/omni.ja:greprefs.js:355
Profile0PrefSources: prefs.js
Profile0Themes: extensions.sqlite corrupt or missing
Profiles:
 Profile1 (Default) - LastVersion=None/None (Out of date)
 Profile0 - LastVersion=89.0.1/20210614221319 (In use)
RunningIncompatibleAddons: False
SourcePackage: firefox
UpgradeStatus: Upgraded to focal on 2020-04-24 (431 days ago)
dmi.bios.date: 10/17/2017
dmi.bios.vendor: HP
dmi.bios.version: P85 Ver. 01.08
dmi.board.name: 8234
dmi.board.vendor: HP
dmi.board.version: KBC Version 42.6A
dmi.chassis.asset.tag: 5CD724DH2V
dmi.chassis.type: 10
dmi.chassis.vendor: HP
dmi.modalias: dmi:bvnHP:bvrP85Ver.01.08:bd10/17/2017:svnHP:pnHPProBook470G4:pvr:rvnHP:rn8234:rvrKBCVersion42.6A:cvnHP:ct10:cvr:
dmi.product.family: 103C_5336AN HP ProBook
dmi.product.name: HP ProBook 470 G4
dmi.product.sku: W6R39AV
dmi.sys.vendor: HP

Revision history for this message
Beowulf (s-highlander) wrote :
Revision history for this message
Beowulf (s-highlander) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote :

Thanks for the report.

What happens if you run `gio open` on a pdf file from the command line? Does it open in evince as you'd expect?

    gio open /full/path/to/file.pdf

Changed in firefox (Ubuntu):
status: New → Incomplete
Revision history for this message
Beowulf (s-highlander) wrote (last edit ):

When I type gio open /full/path/to/file.pdf in terminal, then the PDF is opened properly with evice. But firefox still launches GIMP for PDF files.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Thanks for the feedback, so it seems it's a problem with firefox indeed.

Can you share the following file:

    ~/.mozilla/firefox/PROFILE/handlers.json

where PROFILE is your firefox profile folder currently in use (you can get that information by browsing to about:profiles)

Revision history for this message
Beowulf (s-highlander) wrote :

Attached ~/.mozilla/firefox/07t8n60p.default-release/handlers.json

Revision history for this message
Beowulf (s-highlander) wrote :

There is no handlers.json file in my profile folder, handlers.json exists only in the default release profile folder.

Revision history for this message
Beowulf (s-highlander) wrote :

Attached a screenshot of about:profiles page.

Revision history for this message
Olivier Tilloy (osomon) wrote :

That screenshot shows that the default-release profile is the one being used, so that handlers.json file is the one to look at.

And the value of "4" for the action corresponding to "application/pdf" is correct, it means "use the system's default handler".

From what I can tell, Firefox calls g_app_info_get_default_for_type() to get the default system handler for a given mime type.

Can you share the output of:

    gio mime application/pdf

Revision history for this message
Beowulf (s-highlander) wrote :

Output of gio mime application/pdf
----------------------------------------------
Default application for “application/pdf”: org.gnome.Evince.desktop
Registered applications:
 org.gnome.Evince.desktop
 google-chrome.desktop
 gimp.desktop
 libreoffice-draw.desktop
 display-im6.q16.desktop
Recommended applications:
 org.gnome.Evince.desktop
 google-chrome.desktop
 gimp.desktop
 libreoffice-draw.desktop
 display-im6.q16.desktop

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for firefox (Ubuntu) because there has been no activity for 60 days.]

Changed in firefox (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.