From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: setting default pdf viewer Date: Tue, 13 Mar 2012 23:42:00 +0800 Message-ID: <87vcm833uf.fsf@ericabrahamsen.net> References: <13237.1331648207@alphaville> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7TrS-0002qk-G8 for emacs-orgmode@gnu.org; Tue, 13 Mar 2012 11:42:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7TrN-0007ky-Ea for emacs-orgmode@gnu.org; Tue, 13 Mar 2012 11:42:06 -0400 Received: from plane.gmane.org ([80.91.229.3]:36029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7TrN-0007jq-4F for emacs-orgmode@gnu.org; Tue, 13 Mar 2012 11:42:01 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1S7TrG-0002wd-Ld for emacs-orgmode@gnu.org; Tue, 13 Mar 2012 16:41:54 +0100 Received: from 114.250.117.200 ([114.250.117.200]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Mar 2012 16:41:54 +0100 Received: from eric by 114.250.117.200 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Mar 2012 16:41:54 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: nicholas.dokos@hp.com On Tue, Mar 13 2012, Nick Dokos wrote: > [OT warning: no org content here, just gnome/mailcap.] > > Eric Abrahamsen wrote: > >> > Next question: since xpdf is available and /etc/mailcap prefers it, why >> > is nautilus using evince? Doesn't it use mailcap? I guess not, although >> > I don't know for sure[fn:1], but it wouldn't surprise me if it did its >> > own thing: there are way too many cooks in this kitchen. >> >> I think most linux desktop environments use something like xdg-open or >> gnome-open to determine defaults applications, all my defaults seem to >> live in /usr/local/share/applications, which can be overridden in the >> home directory. Nautilus ought to use gnome-open. I've tweaked most of >> my "open-in-external-blah" functions (in dired and gnus, for example) to >> use xdg-open, so the same defaults are used in all my applications, >> including emacs. >> > > Thanks! That was useful. > > Part of my frustration with these things (gnome things in particular) is > the sparse-to-non-existent documentation, so I really appreciate these > pointers. Or maybe I've given up too easily: is there good documentation > somewhere on the web e.g. of gconftool? Not just the syntax but an > enumeration of possibilities. My impression is that things like this are > hidden, (and in some cases, as time goes on, even if they exist, they > are taken away, so there is some motivation to keep them hidden, > although I'm not thinking conspiracy: it's just that documenting things > is hard.) I've usually fumbled in the dark with things under ~/.gconf > (or .gnome2 or .gnome) until I've found something plausible. Just to > make my problem concrete: what is the invocation of gconftool that would > change the default pdf viewer to xpdf? I don't use gnome anymore, but back when I did the gconf stuff was absolutely its most obscure aspect. I get the feeling that gnome is still trying to be the Linux Desktop for Dummies, and while gconftool is there if you need it, no one is trying to make it any easier to use. I don't think I ever once invoked gconftool, so I'm afraid I don't know… > The other way that I eventually figured out to do that is to open some > application, e.g. nautilus, select some PDF file, click on Properties > and change the default application: I find that counterintuitive, > changing the properties of a class through a single instance (and to all > applications that use the mechanism, even though I'm just using > nautilus: I can't help but find this method somewhat distasteful.) And I > like editing files rather than clicking buttons, but that's me. One of the nice things with the Mac is that it gives you two options in the contextual menu: you can open a file with a specific application, or you can tell it "use this application for all files of this type". That at least made it clearer what was going on. > To get back to your post: my problem with xdg-open with its switch > blades (kde-open, gnome-open, etc) is that each of those has its own > customization methods. So if I ever want to switch from kde to gnome, I > have to redo the customizations (and I have to find out how to do all > that for the new environment). > > I'd rather have them all use mailcap for preferred application choice. > And if mailcap does not provide all the capabilities needed by them, I'd > rather they cooperated and came up with a common mechanism that would > serve *all* their needs (plus provide thorough documentation!) But > that's a fight that's been fought and lost many times - many more times > than it's been won. Since moving from Ubuntu to a home-rolled Arch/XFCE/Stumpwm mix, I've definitely become aware that, of all the aspects of a Linux installation, the functionality that falls under the "desktop environment" category is at once the most underdocumented, and also most key to user experience. This seems to be the dark under-plumbing of the Linux GUI experience, the unlovely tangle that no one wants to expose to the user. When I went spelunking, I got the impression that mailcap predates all this XXX-open malarkey, but that most of the apps I use prefer that over mailcap. Like you, I would be very, very surprised if anyone ever put any thought into helping user customizations survive a transition from one DE to another. I still think you'll have most luck messing with files under ~/.local/share/applications, though it probably won't be as simple as that. Sorry, that's not helpful at all! > Enough venting: I've veered off-topic quite a bit here. Apologies for > the length of the (possibly uninformed) rant. If I've got things wrong, > I'd love to be corrected, but I don't want to exercise the patience of > the regulars too much. But I hope that the discussion, however > tangential, is useful. > > Thanks, > Nick > > -- GNU Emacs 24.0.94.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-03-06 on pellet Org-mode version 7.8.03 (release_7.8.03.581.g5cb80)