In Debian, we have a program called run-mailcap which provides generic support for opening files in the absence of a desktop environment. I've patched the Debian xdg-utils package to do that. I'll attach the patch.
Created attachment 6849 [details] [review] mailcap-support.patch
Does run-mailcap open a new (X) window or does it assume a text screen?
(In reply to comment #2) > Does run-mailcap open a new (X) window or does it assume a text screen? Depends on whether stdout is a tty or not. If it's not, a new terminal window is opened if the application is text-based (marked needsterminal in mailcap).
If it should always open a new window, we can just add >/dev/null or something to the run-mailcap line.
This is very interesting. I have thought about using a mailcap based generic fallback, however it seemed to complex to do in a shell script. Since this script (according to its manpage) can also access mime.types it should be pretty suitable for local file URIs
Per, I have a question, any upstream/references for this run-mailcap tool (afaict it is debian-specific)? Regardless, if there are no objections, I'll work to integrate your patch soon.
Hi Rex, Thanks for working on this. Yes, unfortunately it seems to be Debian-specific. It also depends on the fact that Debian has an extensive system for updating /etc/mailcap, which many packages use. However, I guess there would be no harm in calling run-mailcap from upstream xdg-open, if it exists on the system.
patch committed to cvs.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.