Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 23, 2013
An "enum" for Python 3
An unexpected perf feature
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
Go ahead: make your firefox use some program to play .gsm audio files; I dare you.
My personal paper cut
Posted Jul 23, 2009 17:35 UTC (Thu) by jimparis (subscriber, #38647)
Posted Jul 23, 2009 17:41 UTC (Thu) by Baylink (subscriber, #755)
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.
Posted Jul 23, 2009 17:48 UTC (Thu) by jimparis (subscriber, #38647)
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?
Posted Jul 23, 2009 17:58 UTC (Thu) by Baylink (subscriber, #755)
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.
Posted Jul 23, 2009 18:10 UTC (Thu) by jimparis (subscriber, #38647)
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).
Posted Jul 30, 2009 15:22 UTC (Thu) by nye (guest, #51576)
Posted Jul 30, 2009 16:27 UTC (Thu) by bronson (subscriber, #4806)
Good call nye.
Posted Jul 24, 2009 16:30 UTC (Fri) by cortana (subscriber, #24596)
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? :)
Posted Jul 24, 2009 16:49 UTC (Fri) by jimparis (subscriber, #38647)
(Incidentally, the Freedesktop.org spec only seems to cover mime types, not mailcap. I don't see which of their specs covers default applications?)
Posted Jul 24, 2009 16:52 UTC (Fri) by jimparis (subscriber, #38647)
Posted Jul 24, 2009 23:06 UTC (Fri) by cortana (subscriber, #24596)
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:
$ grep application/pdf /usr/share/applications/mimeinfo.cache
Posted Jul 24, 2009 20:50 UTC (Fri) by nix (subscriber, #2304)
nix@hades 40 /home/nix% /usr/bin/time stat /usr/bin/* >/dev/null
0.21user 0.14system 0:00.78elapsed 46%CPU (0avgtext+0avgdata
0inputs+0outputs (1major+335minor)pagefaults 0swaps
Maybe it's running file(1) or libmagic on every single one? That could
look like a freeze if you didn't notice the disk pounding away:
nix@hades 41 /home/nix% /usr/bin/time file /usr/bin/* >/dev/null
0.17user 0.58system 0:26.16elapsed 2%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+735minor)pagefaults 0swaps
(This is on a system with 3977 binaries in /usr/bin.)
Posted Jul 24, 2009 21:18 UTC (Fri) by jimparis (subscriber, #38647)
Now it's a challenge :)
$ ls /usr/bin | wc -l
$ ssh psy ls /usr/bin | wc -l
$ ssh bucket ls /usr/bin | wc -l
$ ssh neurosis ls /usr/bin | wc -l
$ ssh oldneurosis ls /usr/bin | wc -l
Posted Jul 24, 2009 22:08 UTC (Fri) by nix (subscriber, #2304)
nix@hades 3 /home/nix% ls -l /usr/bin | wc -l
(is this the single most pointless contest that has ever been carried out
on LWN? I bet I have more symlinks in /usr/bin than you: 4099...)
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds