Questo sito potrebbe offrire funzionalità limitate durante le operazioni di manutenzione per migliorare l'esperienza utente. Se un articolo non risolve il tuo problema e vuoi richiedere supporto, la nostra comunità di supporto è pronta ad aiutarti tramite @FirefoxSupport su Twitter e /r/firefox su Reddit.

Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Ulteriori informazioni

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

How to give a profile a default mimetypes.rdf file?

  • 6 risposte
  • 2 hanno questo problema
  • 4 visualizzazioni
  • Ultima risposta di bob12345

more options

Hello,

I'm deploying Mozilla Firefox 31ESR on thousands of computers. I'm looking for a way to pre-configure how firefox handle the mimetypes. For instance, to open pdf with Adobe Acrobat Reader.

To achieve this, I put a mimetypes.rdf file in "C:\Program Files (x86)\Mozilla Firefox\browser\defaults\profile". When the profile is created, this file is copied, then modified.

The lines:

<RDF:Description RDF:about="urn:mimetype:handler:application/pdf"
NC:useSystemDefault="true"
NC:alwaysAsk="false" />

Becomes:

<RDF:Description RDF:about="urn:mimetype:handler:application/pdf"
NC:handleInternal="true"
NC:alwaysAsk="false" />

-If I replace manually the file "mimeTypes.rdf" in the newly created profile, it works perfectly.

It seems to be the same problem as: https://support.mozilla.org/fr/questions/1015378

Why is the mimetypes.rdf file modified? How can I set a mimetype policy?

Thanks a lot!

Hello, I'm deploying Mozilla Firefox 31ESR on thousands of computers. I'm looking for a way to pre-configure how firefox handle the mimetypes. For instance, to open pdf with Adobe Acrobat Reader. To achieve this, I put a mimetypes.rdf file in "C:\Program Files (x86)\Mozilla Firefox\browser\defaults\profile". When the profile is created, this file is copied, then modified. The lines: <RDF:Description RDF:about="urn:mimetype:handler:application/pdf" NC:useSystemDefault="true" NC:alwaysAsk="false" /> Becomes: <RDF:Description RDF:about="urn:mimetype:handler:application/pdf" NC:handleInternal="true" NC:alwaysAsk="false" /> -If I replace manually the file "mimeTypes.rdf" in the newly created profile, it works perfectly. It seems to be the same problem as: https://support.mozilla.org/fr/questions/1015378 Why is the mimetypes.rdf file modified? How can I set a mimetype policy? Thanks a lot!

Tutte le risposte (6)

more options

Sorry, I meant the line:

 <RDF:Description RDF:about="urn:mimetype:handler:application/pdf"
                  NC:alwaysAsk="true"
                  NC:saveToDisk="true">
   <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:application/pdf"/>
 </RDF:Description>

Become: <RDF:Description RDF:about="urn:mimetype:handler:application/pdf" NC:handleInternal="true" NC:alwaysAsk="false" />

more options

Does it help if you also set some prefs via a user.js file in the \browser\defaults\profile location?

user_pref("pdfjs.disabled", true);
user_pref("plugin.state.nppdf", 2);

Such pref settings are also possible via a mozilla.cfg file.

These functions can be used in the mozilla.cfg file:

defaultPref();	// set new default value
pref();		// set pref, allow changes in current session
lockPref();	// lock pref, disallow changes

See:

Modificato da cor-el il

more options

I found that, in the user profile:

-If I delete only "mimeTypes.rdf", mimeTypes.rdf get replaced by a correct version at the next launch.

-If I delete "mimeTypes.rdf" AND "prefs.js", mimeTypes.rdf is somehow replaced and modified at the next launch.

more options

cor-el, sadly, no. But I think you're on to something, the answer lie in prefs.js I think.

more options

It works for me with both the user.js file and your mimeTypes.rdf file.

user_pref("pdfjs.disabled", true);
user_pref("plugin.state.nppdf", 2);
<?xml version="1.0"?>
<RDF:RDF xmlns:NC="http://home.netscape.com/NC-rdf#"
         xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
 <RDF:Description RDF:about="urn:mimetype:handler:application/pdf"
                  NC:alwaysAsk="true"
                  NC:saveToDisk="true">
   <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:application/pdf"/>
 </RDF:Description>
</RDF:RDF>
more options

It works cor-el .

Tears of joy.

I had to do a "locked_pref("plugin.state.nppdf", 0);" in user.js in "browser\defaults\profile" in my case.

Thanks a lot man.

So I confirm, you can deploy firefox with default external pdf handler.