Closed Bug 273617 Opened 20 years ago Closed 20 years ago

gnome mime-types are ignored in mozilla with gnome 2.8

Categories

(SeaMonkey :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: blabj, Unassigned)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041206 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041206 Mozilla 1.7.3 on gnome 2.6 behaved well - if you have no helper apps defined, it looked to "OS" level helper apps (in this case gnome). This allowed us to set gnome mime/types and helper apps in one place globally. Upgraded to gnome 2.8, and now mozilla doesn't "recognize" gnome mime-types. Its falling back to /etc/mailcap... I know there were significant changes in gnome-vfs in 2.8 for mime handling - so I'm thinking this may be a backwards compatibility problem. If this is a gnome bug - my apologies. I noticed the gnomevfs extension in the mozilla source tree - so I thought I'd post here first. Reproducible: Always Steps to Reproduce: 1. install mozilla 1.7.3 under gnome 2.6 2. establish gnome mime-types and see how mozilla follows suit 3. upgrade to gnome 2.8 4. establish "freedesktop.org"-like mime types for gnome 2.8 Actual Results: mozilla no longer uses those gnome mime-types Expected Results: should use gnome mime-types
Marco, any idea what's up here?
To the reporter, can you give some more details please? Linux distribution gnome-vfs version shared-mime-info version Please describe exactly the step to reproduce. Ex. configure the mime handler for pdf in the nautilus file manager to be "Pdf Viewer", click on a pdf file in mozilla, results etc... Here it seem to work correctly...
(In reply to comment #2) > To the reporter, can you give some more details please? > Sorry for not being more verbose. > Linux distribution Gentoo 2004.0 - kernel 2.4.25 > gnome-vfs version gnome-vfs-2.8.1-r2 > shared-mime-info version > shared-mime-info-0.14 > Please describe exactly the step to reproduce. NOTE: I'm in a multi-user environment - 25 users running off of one machine - so I need global mime-handler settings. With Gnome 2.6, as root, I could run "nautilus preferences-all-users:///", go to "File & Types", and establish global mime-handlers, which mozilla recognized immediately. With Gnome 2.8, there is no "File & Types" preferences dialog for establishing global mime types/apps. [NOTE:Mozilla stopped recognizing mime-handlers immediately after upgrading to Gnome 2.8 - I rebuilt mozilla but still nothing.] Configuring the nautilus file manager with a mime-handler is a per-user configuration - not acceptable - so I had to add things manually in /usr/share. Gnome seems to have abandoned /usr/share/mime-info (all my entries from gnome 2.6 are still there and nautilus/gnome/mozilla doesn't recognize any of them), so I had to create a desktop entry in /usr/share/applications: eg. acroread.desktop [Desktop Entry] Encoding=UTF-8 Name=Acrobat Reader Comment=View PDF files Exec=acroread %F Icon=gnome-pdf Terminal=false Type=Application Categories=Application;Viewer; StartupNotify=true MimeType=application/pdf; and then run update-desktop-database and update-mime-database. At this point, for all users, nautilus could open files with "acroread". But at this point mozilla still didn't pickup gnome mime-handlers (to test properly, you need to be sure that ~/.mime.types, ~/.mailcap, /etc/mime.types and /etc/mailcap do NOT exist - as these will override the gnome-vfs settings) I had to add entries to /etc/mime.types and /etc/mailcap to get mozilla to work properly: eg: in /etc/mime.types application/pdf pdf eg: in /etc/mailcap application/pdf;acroread %s Hope this clarifies the issue somewhat...
>But at this point mozilla still didn't pickup gnome mime-handlers Do you have any other application supporting pdf mime type? What does mozilla show as handler? Another app? Nothing?
Yes gpdf (gnome pdf) handles pdf types by default in gnome (I didn't disable/remove this). When I remove /etc/mailcap and /etc/mime.types (force gnome-vfs), I get the following: --- The file "blahblah.pdf" is of type application/pdf, and Mozilla does not know how to handle this file type. This file is located at... What should Mozilla do with this file? ( ) Open it with "(blank)" [Choose...] (.) Save it to disk --- Note: Behaviour is same for all other mime-types as well.
Hmmm weird, I dont seem to be able to reproduce this here. I have gnome-vfs 2.8.2 and shared-mime-info 0.15 though, maybe you could try to upgrade? Also please check that nsGNOMERegistry.c is actually built in your mozilla tree, gnome_vfs_application_get_default should really work, as it work in nautilus.
Upgraded to gnome-vfs-2.8.3-r1, restarted mozilla, and bingo - works! Must have been a bug in 2.8.1?? Thanks Marco.
Yeah, looks like that. Closing as invalid because it's not a mozilla bug.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.