Hmm?
Seems easy.
First I run:
$ sudo apt-get install sox libsox-fmt-gsm
Then I find some random website: http://fox-den.com/ASTERISK/sounds/2005-07-30-new/gsm/
I click on a file.
It pops up a dialog: "What should Iceweasel do with this file?"
I select "browse"
I type "/usr/bin/play"
I click "Do this automatically for files like this from now on"
I hit OK
I hear the sound.
I click another file.
I hear the sound.
What problem are you having?
Posted Jul 23, 2009 17:41 UTC (Thu) by Baylink (subscriber, #755)
[Link]
The problem I'm having is that, um, it doesn't do that.
That's what *I'd* expect, too. Sometimes, with some point releases, one some platforms, that's what I get. Sometimes not. Doesn't seem deterministic.
And since the very simple "Add" button is missing from whatever version of that association mapping dialogue you have, there's no manual way to fix it if that happens to you... as it happened to us.
My personal paper cut
Posted Jul 23, 2009 17:48 UTC (Thu) by jimparis (subscriber, #38647)
[Link]
I'm not sure what you mean by the "add" button. I can go into Edit -> Preferences -> Applications, scroll down to "GSM file", and change the Action to anything, including setting it back to "Always ask".
I'm still unclear on what your actual problem is, besides "sometimes it doesn't work". What exactly, on your system, happens when you click on a GSM file? Does it open with an application that you don't like, does it only offer to save to disk, or does it not do anything? Do you have something like mozplugger installed that is taking over the association? Do you have an audio/x-gsm entry in your .mailcap file or in /etc/mailcap?
My personal paper cut
Posted Jul 23, 2009 17:58 UTC (Thu) by Baylink (subscriber, #755)
[Link]
The problem is "scroll down to GSM file".
I *very often* (nearly always) *do not have* GSM file in that list, on a fresh install of Firefox. And if the type of file you have isn't in the list and you aren't presented with the "open with" option, then you're screwed.
I know that's not supposed to happen, but it does, and not infrequently.
Additionally, the dialog of which you speak -- and this complaint is closer in spirit to the sort of thing they're actually looking for --
1) has 2 columns, with an immovable divider
2) cannot be resized
3) lists the human readable name of the filetype (which is almost always useless) followed by the mimetype (which is very often useless, and is often clipped off partially or completely because of 1 and 2) and does not show the only thing you can actually see -- the file extension -- at all.
My personal paper cut
Posted Jul 23, 2009 18:10 UTC (Thu) by jimparis (subscriber, #38647)
[Link]
I also did not have "GSM file" on that list, until I clicked one for the first time. And the behavior of clicking on a file (that is not on that list) is to pop up that dialog box where you pick an application, in my experience.
So your problem is that nothing at all happens -- you click the file and it behaves as if you didn't click the file?
Which means we're back to my previous questions -- do you have something like mozplugger installed (check about:plugins), or do you have an action defined in one of the mailcap files (grep gsm /etc/mailcap ~/.mailcap)?
(Are you actually interested in fixing this or just complaining about it? I'm trying to help but you're really not giving enough information for me to provide any useful advice).
My personal paper cut
Posted Jul 30, 2009 15:22 UTC (Thu) by nye (guest, #51576)
[Link]
My 'solution' is, whenever Firefox pops up a dialogue asking how to open a file, to choose '/usr/bin/xdg-open'. This allows me to use whatever file handler I define in my DE, neatly bypassing Firefox's hilariously bad 'open with' system.
My personal paper cut
Posted Jul 30, 2009 16:27 UTC (Thu) by bronson (subscriber, #4806)
[Link]
haha, this is brilliant! And obvious -- in all these years of pain (papercut-quality pain) I'm surprised I didn't think of this.
Good call nye.
My personal paper cut
Posted Jul 24, 2009 16:30 UTC (Fri) by cortana (subscriber, #24596)
[Link]
Having to send a file browser to /usr/bin to find an executable to handle a file type is insane. There are 3240 files in that directory on my system. How a non-expert user is supposed to cope is beyond me--if they don't give up after Firefox 'crashes' (freezes while stat'ing all the files in there) first.
Compare with the user experience in Epiphany, which actually makes an effort to integrate with the GNOME desktop; the user is presented with the option to open the file with their default handler, or save it to disk. The default handler is determined via the freedesktop.org MIME spec, which is the same thing used by everything else in GNOME. An administrator may change that for a particular user, or all users, using the standard Unixoid methods outlined in the spec.
Where Epiphany falls down is in letting the user change their preferred handler for a file type; there is no UI for that yet. So the user would have to save the file, then change the handler for it in Nautilus. Eventually, hopefully Epiphany will be enhanced to ask the MIME database who could handle the MIME type it's been served, and give the user a nice list of all the programs that can handle it, in the same way that Nautilus does. Nothing's perfect, eh? :)
My personal paper cut
Posted Jul 24, 2009 16:49 UTC (Fri) by jimparis (subscriber, #38647)
[Link]
Forgive me if I'm dense, but I'm still not seeing what Firefox is doing wrong here. As far as I can tell, it's following the exact same method as everyone else -- it uses /etc/mime.types to map mime-types to file extensions, and it uses /etc/mailcap and ~/.mailcap to choose a default application. If you want to change the default application, then that's the only time you need to open up the file browser -- and I rarely use it to actually browse /usr/bin, I just type the desired executable name directly.
(Incidentally, the Freedesktop.org spec only seems to cover mime types, not mailcap. I don't see which of their specs covers default applications?)
My personal paper cut
Posted Jul 24, 2009 16:52 UTC (Fri) by jimparis (subscriber, #38647)
[Link]
By the way, that's not to say Firefox can't use improvements in this area. For example, bug https://bugzilla.mozilla.org/show_bug.cgi?id=83305 has been an occasional issue for me for many years now -- with upstream's response being basically "blah, I can't be bothered to fix this". One of these days I'll be motivated to fix it myself, but my brief glances into the Firefox code always scare me...
My personal paper cut
Posted Jul 24, 2009 23:06 UTC (Fri) by cortana (subscriber, #24596)
[Link]
The problem is that you are an expert, whereas most users--for instance, my parents are not. :)
They will be presented with a file selection dialog box and have no idea that they are supposed to go to /usr/bin, and then wait for Firefox to unfreeze, and then pick one of thousands of similarly named items that have absolutely no connection with what they want to do.
For example, opening a PDF document... how is a normal person supposed to know to select evince? :(
As for the freedesktop.org spec... I actually mis-spoke (typed?) earlier. The spec I mentioned allows programs to declare MIME types (that is, provide a mapping from MIME type to human-readable description). It serves a similar purpose to /etc/mime.types, except that it is more modular (it allows applications to define new MIME types) and it allows for the MIME types to have human-readable descriptions, localized to many different languages.
The spec I should have mentioned is the Desktop Entry spec; this is where applications ship .desktop files (in /usr/share/desktop and other places) that specify (among other things) which MIME types an application may handle. It is similar in purpose to the mailcap mechanism, but again it is more modular and allows internationalization, as well as desktop integration (e.g., application menu entries are derived from the .desktop files).
So, Firefox should be reading these .desktop files and offering the user's default handler for a file, along with a selection of other applications that declare that they handle the MIME type. On my system: