des...@verizon.net writes: > Thomas Adam <tho...@xteddy.org> writes: > >> On Sun, Feb 14, 2010 at 12:09:25AM +0100, Nathan Huesken wrote: >>> Hi, >>> >>> When I use chromium under Xfce4, it opens pdf files using evince. When I >>> use chromium under fvwm, it opens pdfs using firefox (which opens pdfs >>> using evince, but is started and takes long to start). >>> >>> I am not sure, if this is really a fvwm thing, but it is my only guess. >>> Maybe someone in the list knows ... >> >> Read up on how mailcap entries work. Nothing to do with FVWM. > > Desktop environments are messing up what used to be a well defined > boundary between the window manager and X. > > On my Fedora system, /etc/mailcap contains: > > audio/*; /usr/bin/xdg-open %s > image/*; /usr/bin/xdg-open %s > application/msword; /usr/bin/xdg-open %s > application/pdf; /usr/bin/xdg-open %s > application/postscript ; /usr/bin/xdg-open %s > text/html; /usr/bin/xdg-open %s ; copiousoutput > > > So, from this system's point of view, mailcap is just a thin > layer on top of xdg-open. > > xdg-open on my system only knows to use firefox. > > I see that xdg-open uses a file named "defaults.list". > I have 3 of those: > > /usr/local/share/applications/defaults.list > /usr/share/applications/defaults.list > /usr/share/kde-settings/kde-profile/default/share/applications/defaults.list > > I think the trick is to convince xdg-open to use one or more of those > files...
Following up my own post. xdg-open is a shell script that tries to figure out the desktop environment that is running and then uses a script provided by the desktop environment to open the file. You can take a look yourself. For environments it doesn't recognize it tries to use the following programs: mimeopen, run-mailcap, $BROWSER, htmlview, firefox, mozilla, netscape, links, lynx. (In that order). For kde it uses kde_open. For Gnome it uses gvfs-open or gnome-open. For XFCE it uses exo-open. I tried using kde_open under fvwm, it was too slow. exo-open, gnome-open and gvfs-open seemed ok. So I think hacking up xdg-open to use exo-open is the default might be a good solution for the OP.