Ubuntu Bug 255161: Openoffice can’t print on Tuesdays
bugs.launchpad.net
bugs.launchpad.net
"When I click print I get nothing." -Tuesday, August 5, 2008
"I downloaded those updates and Open Office Still prints." -Friday, August 8, 2008
"Open Office stopped printing today." -Tuesday, August 12, 2008
"I just updated and still print." -Monday, August 18, 2008
"I stand corrected, after a boot cycle Open Office failed to print." -Tuesday, August 19, 2008
Just because a bug seems impossible doesn't mean it is.
This comment reminds me of the magic switch (story [0], light HN discussion [1]).
[0]: http://catb.org/jargon/html/magic-story.html [1]: https://news.ycombinator.com/item?id=181045
Anyway, thank you for the link.
(see https://bugs.launchpad.net/ubuntu/+source/file/+bug/248619)
http://standards.freedesktop.org/shared-mime-info-spec/share...
File has its own internal database. It can do more than the mime type db and is great for quickly identifying and getting lots of info about various file types, but it is AWFUL when used within other apps. Please, don't use it like so.
Also, file --mime FILENAME gets you the mime type.
Additionally, the shared-mime-info database is much better curated than the file mime database; file has a lot of wrong mime types (I have gotten a dozen or so fixed so far). If there are file types that are missing from shared-mime-info, please report them on https://bugs.freedesktop.org/ (there are guidelines for good mime type reports, follow those and you can get a fix merged in very fast).
More to the point though, the xdg database is extensible. While `file` requires playing with the source.
I mean seriously, once I wrote a simple web app in Go and the content-type for static serving was determined via file. (It's just so easy.) But nobody in the world wants to have Desktop stuff installed on her server.
~$ xdg-mime query filetype /etc/passwd
text/plain"The query option is for use inside a desktop session only."
Why wouldn't it work from a console session? Or even a non-login session (e.g. cron job)? I'm not sure I want to trust a command-line program that only works as part of a desktop session. It sounds like the sort of fragile doodad that makes weird assumptions about its environment, which might one day no longer be true even in that environment, to me.
Can anyone shed any further light on that crazy usage restriction?
http://standards.freedesktop.org/basedir-spec/basedir-spec-l...
xdg-mime merely looks at the shared-mime-info db, processes files accordingly and spits out the result.
Also, I did not actually say you should use xdg-mime; I said you should use the shared-mime-info database. xdg-mime is a (very crappy) interface for it, but using an xdg library is a lot, lot more efficient.
If not xdg-mime(1) then, do you know of another file(1)-like command-line app which does use the shared-mime-info database?
>file main.js
>main.js: ASCII C++ program text, with very long lines"Very long lines" is sort of a property of text files. It means it's unlikely to have been written by hand for one thing.