LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Tags used in this thread
Popular LQ Tags , , ,

Reply
 
Thread Tools
Old 09-21-2009, 05:59 PM   #1
catkin
Senior Member
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Slackware 13.0
Posts: 1,846
Blog Entries: 6
Thanked: 226
Slackware 13: Firefox applications list sparsely populated


[Log in to get rid of this advertisement]
Hello

Where does Firefox 3.5.2 get its applications list from? I mean the ones in Firefox->Edit->Preferences->Applications. On my new install there are only 8 listed whereas the equivalent on ubuntu 8.04 has more than 40 ... ?

Best

Charles
linux catkin is offline  
Tag This Post , , ,
Reply With Quote
Old 09-21-2009, 06:06 PM   #2
GrapefruiTgirl
Moderator
 
Registered: Dec 2006
Location: N.S.
Distribution: Slackware64
Posts: 4,211
Thanked: 177
catkin, I noticed that too: Firefox in 13.0 seems to want to open EVERYTHING in Konqueror :/

But just haven't gotten around to adding more applications; I might just boot up my Slack 11 system and grab the application "launch codes" from that, as I had it configured pretty thoroughly.

I'm not sure how to use a GUI method to add applications (there may well be a way, but I've never looked for it) but you CAN add applications and configure them using the trusty about:config page.

If you're still looking for some help on this later on, I may go and load up Slack11 here shortly (or mount the partition and see if I can grab the 'launch codes' by that route, and post here what I come up with.

Cheers!
Sasha
linuxslackware GrapefruiTgirl is offline     Reply With Quote
Old 09-21-2009, 06:24 PM   #3
catkin
Senior Member
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Slackware 13.0
Posts: 1,846
Blog Entries: 6
Thanked: 226

Original Poster
Thanks Sasha I was hoping to find the source of the Applications list entries in about:config. The ones that do exist are in the gecko.handlerService.schemes.* entries but that list is the same on both ubuntu and Slackware so the gecko entries are not the only source of list entries. There's a related thread on the Arch Linux Forum complete with a script to workaround the problem and suggestions that Firefox uses Gnomes MIME types but netsearching didn't turn up anything more.
linux catkin is offline     Reply With Quote
Old 09-21-2009, 06:37 PM   #4
GrapefruiTgirl
Moderator
 
Registered: Dec 2006
Location: N.S.
Distribution: Slackware64
Posts: 4,211
Thanked: 177
http://kb.mozillazine.org/File_types...wnload_actions

Check out the above link. It looks like it's not as clear-cut as it used to be, and varies by mozilla product :|

That page describes a FF Extension called "MIME Edit Extension" but I didn't see it explicitly mentioned wrt FF 3.x+ but I am going to go and see if it exists for 3.5.3

Also, I did find on my Slack 11 installation, inside the .mozilla folder, a file called "mimeTypes.rdf" which appears to contain the external application configurations for various MIMEtypes and other files that the browser might encounter, and what to do with them.

According to that link again, it says that you *can* edit this file, but they advise against it because it's a little confusing and probably easy to bork up.

The simple way, although not my choice of ideal ways to do this, would be to encounter content, download/click it, and use the "What should I do with this File" dialog, to gradually configure different apps for different filetypes, but this is tedious IMO.

I'm going now to look for that MIME Edit extension. Chaek out that link, as it provides a load of related links too

Sasha

PS - this doesn't look promising :/ https://addons.mozilla.org/en-US/fir...?q=MIME%20edit

Last edited by GrapefruiTgirl; 09-21-2009 at 06:39 PM..
linuxslackware GrapefruiTgirl is offline     Reply With Quote
Thanked by:
Old 09-21-2009, 06:47 PM   #5
catkin
Senior Member
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Slackware 13.0
Posts: 1,846
Blog Entries: 6
Thanked: 226

Original Poster
Great information, especially the first link. Unfortunately it's 4 AM and my head is dropping so it'll have to wait until tomorrow. G'night!
linux catkin is offline     Reply With Quote
Old 09-21-2009, 06:53 PM   #6
GrapefruiTgirl
Moderator
 
Registered: Dec 2006
Location: N.S.
Distribution: Slackware64
Posts: 4,211
Thanked: 177
Well, when you get back, you may wish to download and try out this UNOFFICIAL mime-editor, which is a compatibility re-work of one of the few existing MIMI Editor extensions.

I got the link by reading the comments/feedback on the mozilla addons page for the MIME Editor extension which is not compatible with FF 3.0+

I have just installed it and restarted FF, and all looks fine; the thing appears to be installed successfully -- no weird errors.

I'll try to add some external applications and report back.

ta-ta for now

Sasha
linuxslackware GrapefruiTgirl is offline     Reply With Quote
Old 09-21-2009, 07:47 PM   #7
GrapefruiTgirl
Moderator
 
Registered: Dec 2006
Location: N.S.
Distribution: Slackware64
Posts: 4,211
Thanked: 177
http://www.linuxquestions.org/questi...e-apps-615686/

There's an older discussion of this situation, which is worth reading..

FWIW, the modified MIME Type Editor I linked to above really isn't helping me. It basically just duplicates the functionality you get by using the "What to do with this file" dialog.

I've got it disabled at the moment, and will probably remove it later.
linuxslackware GrapefruiTgirl is offline     Reply With Quote
Old 09-22-2009, 12:08 AM   #8
GrapefruiTgirl
Moderator
 
Registered: Dec 2006
Location: N.S.
Distribution: Slackware64
Posts: 4,211
Thanked: 177
Lightbulb A bunch of stuff re: Firefox + external KDE apps & MIME-types

I'm not sure at this moment what DE the OP is using, but for the sake of this post, I'll assume you're using some combination of Xfce and/or KDE for the DE and the apps you use.

Previously (Slack 11) I used KDE, but currently I'm using Xfce but I still use Konqueror, Kwrite, and other KDE apps sometimes.

Here's a bunch of stuff I came up with, in not really any particular order, all of which has to do with how Firefox deals with MIME types and opening external applications.

Info: I can't clearly distinguish between the functions of the about:config entries, versus what's contained in the ~/.mozilla/firefox/<your-profile>/mimeTypes.rdf file, and how each or both of them influence how external content is handled. So, I'll just provide all possible information here, and everyone can do what they like with it

Before deciding to do anything at all, based on what I write here, please read the entire post. There appears to be (as usual) more than one way to skin this fox.

NOTE #1: To see or change the action that Firefox 3.5+ takes, when encountering content that it has ALREADY ENCOUNTERED once, you can use Edit -> Preferences -> Applications. The stuff you see in there, corresponds to the "mimeTypes.rdf" file, which will be discussed below. This stuff gets configured when you use the dialog box "Select application to open this with".

Section 1: Make FF use KDE apps to open stuff:
(there's surely a way to do a similar thing with Xfce apps, but I haven't looked into it; maybe someone else can add that section.)

Create yourself a script; I call mine kfmclientexecscript4FF and place it in /usr/bin.

Here's what goes in it:
Code:
#!/bin/bash
/usr/bin/kfmclient exec $1
exit 0
That script will be called by Firefox when it wants to use an external KDE application. One really handy thing that this does, is allows you to "Open Containing Folder" when you right-click an item in your Firefox downloads list. It also allows FF to call PDF applications, text editors, etc., when you want to open a downloaded item with an appropriate application.

In order for the above to work, you need to make a few entries in about:config as follows:

Code:
network.protocol-handler.expose.file    (boolean) true
network.protocol-handler.external.file  (boolean) true
network.protocol-handler.app.file       (string)  /usr/bin/kfmclientexecscript4FF
There. Now FF can open containing folder of downloaded items, and can (hopefully) make intelligent choices about what apps to use to open downloaded items.

NOTE: I tested this with some PDF files, a text file, and opening my downloads folder, and they all work fine, however (at least with Xfce) the freshly opened application does not come to focus above the browser, as I would like & expect it to, despite configuring the Xfce settings manager to "Give newly opened windows focus". Maybe it's because they're KDE applications I'm using instead of Xfce apps, I don't know, but if you find a work-around or solution for this, I'd like to know about it

References:
open containing folder under linux
Gentoo WIKI page which no longer exists

Section 2: MIME-Type information:

Slackware does not seem to include a file called /etc/mimetypes which is referenced in the firefox about:config page. However, I was able to find a nice, fully stocked mime type file located at /usr/share/mime/types, and also a local file in my home folder called ~/.local/share/mime/types, but in order for Firefox to be aware of these files, you need to edit an about:config entry (here are FOUR entries, two for MIME-types, and two for mailcap files):

Code:
helpers.private_mailcap_file    (string)
helpers.global_mailcap_file     (string) /etc/mailcap
helpers.global_mime_types_file  (string) /usr/share/mime/types
helpers.private_mime_types_file (string) ~/.local/share/mime/types
Note: The mailcap file I referenced here, on my system, is pretty sparse. It is as follows:
Code:
# Torrent download:
application/x-bittorrent; /usr/bin/bittorrent-xterm '%s' ; 
# Java Web Start:
application/x-java-jnlp-file; /usr/lib64/java/bin/javaws %s ;
Doing a search on your machine will turn up several other samples/examples of mailcap configurations. Surely a Google search will also turn up loads of other stuff you can put in there. Basically this file lists MIME-Types, and the application you want associated with them.

As for the mime-type files, my local one is a lot shorter than the one in /usr/share/... but you should probably have similar ones on your system.

Section 2-B: ~/.mozilla/firefox/<your-profile>/mimeTypes.rdf:

This file seems to be where firefox stores its own configuration of what to do with various MIME-types, like what application to use for them. Maybe if it dosn't have something in here for a particular MIME-type, it looks in the mailcap file(s), or vice versa. The way I see it, the more information you provide to the browser, the better it might be able to deal with external content.

Initially, on my Slack64-13 install, the file is 4.3Kib in size. However, I grabbed the one from my last Slack-11 Firefox, and found it to be 14.0 Kib. So, I copied the old one into the place of the new one. Here it is, if you want to use it (close your browser completely, backup your file, and replace mimeTypes.rdf with this file):
Code:
<?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:Seq RDF:about="urn:mimetypes:root">
    <RDF:li RDF:resource="urn:mimetype:application/force-download"/>
    <RDF:li RDF:resource="urn:mimetype:application/x-bittorrent"/>
    <RDF:li RDF:resource="urn:mimetype:application/x-java-jnlp-file"/>
    <RDF:li RDF:resource="urn:mimetype:application/zip"/>
    <RDF:li RDF:resource="urn:mimetype:message/rfc822"/>
    <RDF:li RDF:resource="urn:mimetype:application/x-gzip"/>
    <RDF:li RDF:resource="urn:mimetype:application/x-tar"/>
    <RDF:li RDF:resource="urn:mimetype:application/pdf"/>
    <RDF:li RDF:resource="urn:mimetype:application/postscript"/>
    <RDF:li RDF:resource="urn:mimetype:application/msword"/>
    <RDF:li RDF:resource="urn:mimetype:application/x-bzip2"/>
  </RDF:Seq>
  <RDF:Description RDF:about="urn:mimetype:handler:application/postscript"
                   NC:alwaysAsk="false"
                   NC:saveToDisk="true">
    <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:application/postscript"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:externalApplication:application/postscript"
                   NC:prettyName=""
                   NC:path="" />
  <RDF:Description RDF:about="urn:handler:web:https://www.mibbit.com/?url=%s"
                   NC:prettyName="Mibbit"
                   NC:uriTemplate="https://www.mibbit.com/?url=%s" />
  <RDF:Description RDF:about="urn:scheme:handler:irc"
                   NC:alwaysAsk="true">
    <NC:possibleApplication RDF:resource="urn:handler:web:https://www.mibbit.com/?url=%s"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:application/force-download"
                   NC:fileExtensions="iso"
                   NC:description=""
                   NC:value="application/force-download"
                   NC:editable="true">
    <NC:handlerProp RDF:resource="urn:mimetype:handler:application/force-download"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:handler:application/force-download"
                   NC:useSystemDefault="false"
                   NC:handleInternal="false"
                   NC:alwaysAsk="false"
                   NC:saveToDisk="true">
    <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:application/force-download"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:handler:application/x-bzip2"
                   NC:alwaysAsk="false"
                   NC:saveToDisk="true">
    <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:application/x-bzip2"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:schemes">
    <NC:Protocol-Schemes RDF:resource="urn:schemes:root"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:application/x-bittorrent"
                   NC:fileExtensions="torrent"
                   NC:description=""
                   NC:value="application/x-bittorrent"
                   NC:editable="true">
    <NC:handlerProp RDF:resource="urn:mimetype:handler:application/x-bittorrent"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:handler:application/x-bittorrent"
                   NC:useSystemDefault="false"
                   NC:handleInternal="false"
                   NC:alwaysAsk="false"
                   NC:saveToDisk="true">
    <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:application/x-bittorrent"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:externalApplication:application/force-download"
                   NC:path="/opt/kde/bin/kget"
                   NC:prettyName="kget" />
  <RDF:Description RDF:about="urn:scheme:handler:webcal"
                   NC:alwaysAsk="true">
    <NC:possibleApplication RDF:resource="urn:handler:web:http://30boxes.com/external/widget?refer=ff&amp;url=%s"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:application/msword"
                   NC:value="application/msword"
                   NC:editable="true"
                   NC:fileExtensions="doc"
                   NC:description="">
    <NC:handlerProp RDF:resource="urn:mimetype:handler:application/msword"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:handler:web:http://compose.mail.yahoo.com/?To=%s"
                   NC:prettyName="Yahoo! Mail"
                   NC:uriTemplate="http://compose.mail.yahoo.com/?To=%s" />
  <RDF:Description RDF:about="urn:handler:web:http://30boxes.com/external/widget?refer=ff&amp;url=%s"
                   NC:prettyName="30 Boxes"
                   NC:uriTemplate="http://30boxes.com/external/widget?refer=ff&amp;url=%s" />
  <RDF:Description RDF:about="urn:scheme:mailto"
                   NC:value="mailto">
    <NC:handlerProp RDF:resource="urn:scheme:handler:mailto"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:scheme:ircs"
                   NC:value="ircs">
    <NC:handlerProp RDF:resource="urn:scheme:handler:ircs"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:application/x-gzip"
                   NC:value="application/x-gzip"
                   NC:editable="true"
                   NC:fileExtensions="gz"
                   NC:description="gzip">
    <NC:handlerProp RDF:resource="urn:mimetype:handler:application/x-gzip"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:handler:application/x-java-jnlp-file"
                   NC:alwaysAsk="true"
                   NC:saveToDisk="false"
                   NC:useSystemDefault="false"
                   NC:handleInternal="false">
    <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:application/x-java-jnlp-file"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:scheme:folder"
                   NC:value="folder">
    <NC:handlerProp RDF:resource="urn:scheme:handler:folder"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:handler:web:https://mail.google.com/mail/?extsrc=mailto&amp;url=%s"
                   NC:prettyName="Gmail"
                   NC:uriTemplate="https://mail.google.com/mail/?extsrc=mailto&amp;url=%s" />
  <RDF:Description RDF:about="urn:mimetypes">
    <NC:MIME-types RDF:resource="urn:mimetypes:root"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:application/x-java-jnlp-file"
                   NC:fileExtensions="jnlp"
                   NC:description="Java Web Start"
                   NC:value="application/x-java-jnlp-file"
                   NC:editable="true">
    <NC:handlerProp RDF:resource="urn:mimetype:handler:application/x-java-jnlp-file"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:root"
                   NC:en-US_defaultHandlersVersion="3" />
  <RDF:Description RDF:about="urn:mimetype:message/rfc822"
                   NC:value="message/rfc822"
                   NC:editable="true"
                   NC:fileExtensions="eml"
                   NC:description="RFC-822 data">
    <NC:handlerProp RDF:resource="urn:mimetype:handler:message/rfc822"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:externalApplication:application/x-bzip2"
                   NC:prettyName=""
                   NC:path="" />
  <RDF:Description RDF:about="urn:mimetype:externalApplication:application/x-gzip"
                   NC:prettyName=""
                   NC:path="" />
  <RDF:Description RDF:about="urn:mimetype:handler:application/zip"
                   NC:useSystemDefault="false"
                   NC:handleInternal="false"
                   NC:alwaysAsk="false"
                   NC:saveToDisk="true">
    <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:application/zip"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:externalApplication:application/zip"
                   NC:path="/opt/kde/bin/kget"
                   NC:prettyName="kget" />
  <RDF:Description RDF:about="urn:mimetype:handler:application/x-gzip"
                   NC:alwaysAsk="false"
                   NC:saveToDisk="true">
    <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:application/x-gzip"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:externalApplication:application/pdf"
                   NC:prettyName=""
                   NC:path="" />
  <RDF:Description RDF:about="urn:mimetype:externalApplication:application/x-tar"
                   NC:prettyName=""
                   NC:path="" />
  <RDF:Description RDF:about="urn:scheme:handler:mailto"
                   NC:alwaysAsk="true">
    <NC:possibleApplication RDF:resource="urn:handler:web:https://mail.google.com/mail/?extsrc=mailto&amp;url=%s"/>
    <NC:possibleApplication RDF:resource="urn:handler:web:http://compose.mail.yahoo.com/?To=%s"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:externalApplication:application/msword"
                   NC:prettyName=""
                   NC:path="" />
  <RDF:Description RDF:about="urn:mimetype:application/zip"
                   NC:fileExtensions="zip"
                   NC:description=""
                   NC:value="application/zip"
                   NC:editable="true">
    <NC:handlerProp RDF:resource="urn:mimetype:handler:application/zip"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:handler:local:/usr/bin/kwrite"
                   NC:prettyName="kwrite"
                   NC:path="/usr/bin/kwrite" />
  <RDF:Description RDF:about="urn:mimetype:handler:message/rfc822"
                   NC:alwaysAsk="false"
                   NC:saveToDisk="true">
    <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:message/rfc822"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:scheme:externalApplication:file"
                   NC:prettyName="kwrite"
                   NC:path="/usr/bin/kwrite" />
  <RDF:Description RDF:about="urn:mimetype:application/x-tar"
                   NC:value="application/x-tar"
                   NC:editable="true"
                   NC:fileExtensions="sig"
                   NC:description="">
    <NC:handlerProp RDF:resource="urn:mimetype:handler:application/x-tar"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:scheme:file"
                   NC:value="file">
    <NC:handlerProp RDF:resource="urn:scheme:handler:file"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:externalApplication:message/rfc822"
                   NC:prettyName=""
                   NC:path="" />
  <RDF:Seq RDF:about="urn:schemes:root">
    <RDF:li RDF:resource="urn:scheme:webcal"/>
    <RDF:li RDF:resource="urn:scheme:mailto"/>
    <RDF:li RDF:resource="urn:scheme:irc"/>
    <RDF:li RDF:resource="urn:scheme:ircs"/>
    <RDF:li RDF:resource="urn:scheme:file"/>
  </RDF:Seq>
  <RDF:Description RDF:about="urn:mimetype:application/pdf"
                   NC:value="application/pdf"
                   NC:editable="true"
                   NC:fileExtensions="pdf"
                   NC:description="">
    <NC:handlerProp RDF:resource="urn:mimetype:handler:application/pdf"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:externalApplication:application/x-java-jnlp-file"
                   NC:path="/home/Sasha/Applications/bin/azureus/azureus"
                   NC:prettyName="azureus" />
  <RDF:Description RDF:about="urn:scheme:handler:file"
                   NC:alwaysAsk="false">
    <NC:possibleApplication RDF:resource="urn:handler:local:/usr/bin/kwrite"/>
    <NC:externalApplication RDF:resource="urn:scheme:externalApplication:file"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:scheme:irc"
                   NC:value="irc">
    <NC:handlerProp RDF:resource="urn:scheme:handler:irc"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:externalApplication:application/x-bittorrent"
                   NC:path="/home/Sasha/Applications/bin/azureus/azureus"
                   NC:prettyName="azureus" />
  <RDF:Description RDF:about="urn:scheme:handler:ircs"
                   NC:alwaysAsk="true">
    <NC:possibleApplication RDF:resource="urn:handler:web:https://www.mibbit.com/?url=%s"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:handler:application/msword"
                   NC:alwaysAsk="false"
                   NC:saveToDisk="true">
    <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:application/msword"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:application/x-bzip2"
                   NC:value="application/x-bzip2"
                   NC:editable="true"
                   NC:fileExtensions="bz2"
                   NC:description="">
    <NC:handlerProp RDF:resource="urn:mimetype:handler:application/x-bzip2"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:application/postscript"
                   NC:value="application/postscript"
                   NC:editable="true"
                   NC:description="Postscript File">
    <NC:fileExtensions>ps</NC:fileExtensions>
    <NC:fileExtensions>eps</NC:fileExtensions>
    <NC:fileExtensions>ai</NC:fileExtensions>
    <NC:handlerProp RDF:resource="urn:mimetype:handler:application/postscript"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:handler:application/x-tar"
                   NC:alwaysAsk="false"
                   NC:saveToDisk="true">
    <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:application/x-tar"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:scheme:webcal"
                   NC:value="webcal">
    <NC:handlerProp RDF:resource="urn:scheme:handler:webcal"/>
  </RDF:Description>
  <RDF:Description RDF:about="urn:mimetype:handler:application/pdf"
                   NC:alwaysAsk="false"
                   NC:saveToDisk="true">
    <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:application/pdf"/>
  </RDF:Description>
</RDF:RDF>
NOTE: In the above file, in places where you see NC:alwaysAsk="false" you can change that to "true" and it will cause Firefox to pop up a dialog box, asking what you want to do for that action. The dialog box will have a check-box for "Remember my setting for this" or some such thing, which will make the dialog pop-up NOT appear from that point on, if you check it.

Section 3: Miscellaneous:

Finally: I did a diff of my old Slack-11 FF's prefs.js file against the new FF 3.5.3 prefs.js file, and discovered a lot of differences. Of course this is to be expected generally, but I haven't taken the time to examine every change and see if anything in the old file has anything to do with external content, yet is missing from the new file.

Prefs.js is for the most part, where your about:config entries are stored.
You can edit the file, with the browser closed!! The browser re-writes the file when it closes, so close the browser first before editing the file.
If you want to delete entries from the file, you can just un-set them in about:config, and close the browser. They will then be gone.

Best of luck; if anyone has more to add, especially info about launching external Xfce or other DE applications from FF, or more entries to put in our mailcap files, please post away!

More references:
IANA's official MIME media types
WIKIpedia list of Common Media Types
MozillaZine File types & Download Actions

Have fun!
Sasha

Last edited by GrapefruiTgirl; 09-22-2009 at 12:15 AM..
linuxslackware GrapefruiTgirl is offline     Reply With Quote
Old 09-22-2009, 02:12 PM   #9
catkin
Senior Member
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Slackware 13.0
Posts: 1,846
Blog Entries: 6
Thanked: 226

Original Poster
Thanks Sasha for doing so much research and sharing it so nicely

A little history may help understanding:
  1. "MIME" stands for "Multipurpose Internet Mail Extensions". It was originally used by mail clients to determine which program to run to display a non-text mail component, (hence /etc/mailcap and ~/.mailcap as the configuration files).
  2. It was adopted by Web browsers when, strictly speaking it is called "MIME Types" (hence /etc/mime.types and ~/.mime.types as the configuration files).
  3. Now it is used by desktops, especially file managers, not only to choose the program but also to choose the icon (hence /usr/share/mime/, /usr/local/share/mime/ and ~/.local/share/mime/ as the configuration file directories, configurable by XDG_* envars).
Thus we find ourselves in the midst of emerging standards. The structure of the desktop configuration files-and-directories is a lot more complex than the mail and browser configuration files. Being as how Firefox is nice enough to be able to use the desktop configuration files, I would have liked to use them so the desktop and file manager would ues the same MIME configuration data as Firefox but I was not able to make it work.

I'm using Xfce so did not investigate the KDE specifics.

Regards ~/.mozilla/firefox/<your-profile>/mimeTypes.rdf, it does seem to be where Firefox stores its own configuration after taking data from the "helpers.[(private)|(global)]_[(mailcap)|(mime_types)]_file"s as shown in about:config and after interacting with the user.

Thus the easiest way to get Firefox's Applications list set up would be to copy mimeTypes.rdf from a previously set up installation. Curiosity and a desire not to carry old baggage forward stopped me from doing so.

On as-installed Slackware 13, /usr/share/mime/types lists many applications but does not associate any programs with them. It does not include application/x-bittorrent.

I set helpers.private_mime_types_file to ~/.local/share/mime/types and created the referenced file containing
Code:
application/x-bittorrent; /opt/vuze/vuze '%s'; description="BitTorrent client"; test=test -n "$DISPLAY"
Even after restarting Firefox it neither had an extra entry in Edit->Preferences->Applications nor knew about /opt/vuze/vuze when I opened a torrent file.

Netsearching, including the feedesktop.org site, did not find many pages about using ~/.local/share/mime/types so I fell back to ~/.mailcap, creating it with this content:
Code:
############################################################################### 
# 
#  MIME types and programs that process those types 
# 
#  Users can add their own rules if they wish by creating a ".mailcap" 
#  file in their home directory.  Entries included there will take 
#  precedence over /etc/mailcap 
# 
#  The man page for update-mime(8) describes the fields 
# 
############################################################################### 

application/x-bittorrent; /opt/vuze/vuze '%s'; description="BitTorrent client"; test=test -n "$DISPLAY"
Now, without restarting Firefox, Edit->Preferences->Applications was stiil the same but opening a torrent file resulted in being asked whether I wanted to open it using /opt/vuze/vuze.

It would be nice to get Firefox using the desktop MIME files -- and nice to understand how the many desktop MIME files work -- but the existing setup is "good enough" and other tasks have a higher priority.

Best

Charles
linux catkin is offline     Reply With Quote
Old 09-22-2009, 02:29 PM   #10
GrapefruiTgirl
Moderator
 
Registered: Dec 2006
Location: N.S.
Distribution: Slackware64
Posts: 4,211
Thanked: 177
Quote:
Thus the easiest way to get Firefox's Applications list set up would be to copy mimeTypes.rdf from a previously set up installation. Curiosity and a desire not to carry old baggage forward stopped me from doing so.
Yes, that's exactly what I DID do and am happy with the results in the browser.

The application-associations from the previously set-up firefox, appeared in "Edit -> Preferences -> Applications", and are editable/configurable via that GUI, and if you wish to REMOVE anything from there, the easiest way (though not necessarily *simple*) is by removing it from mimeTypes.rdf.

Cheers!
Sasha
linuxslackware GrapefruiTgirl is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get Installed applications list and applications activity arunarora Linux - Software 1 05-26-2009 09:33 PM
Mozilla Firefox 3.0.4; few applications in 'applications' tab of 'preferences'; SW12. mitchellray Linux - Newbie 1 03-27-2009 09:56 PM
Can I use APT to install a list of applications mamadu.bwana Ubuntu 4 04-01-2008 12:16 PM
List of installed applications kumarnarain Linux - Software 2 08-14-2006 11:40 AM
List running applications 3saul Linux - Software 2 02-15-2006 02:30 AM


All times are GMT -5. The time now is 09:30 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration