From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: MIME database Date: Thu, 30 Nov 2017 10:54:26 +0100 Message-ID: <87a7z46qi5.fsf@gnu.org> References: <20171127125053.C13FF4E0018@mta-1.openmailbox.og> <87k1ya3gdy.fsf@gnu.org> <1f8eda54eb31d66d64c9fdcc4138853e@lepiller.eu> <87y3mqir4d.fsf@gmail.com> <87374yy319.fsf@igalia.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46622) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKLYD-0008V2-Md for guix-devel@gnu.org; Thu, 30 Nov 2017 04:54:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eKLY7-0006ZQ-JM for guix-devel@gnu.org; Thu, 30 Nov 2017 04:54:37 -0500 Received: from [141.255.128.1] (port=41209 helo=hera.aquilenet.fr) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eKLY7-0006Ya-8W for guix-devel@gnu.org; Thu, 30 Nov 2017 04:54:31 -0500 In-Reply-To: <87374yy319.fsf@igalia.com> (Andy Wingo's message of "Tue, 28 Nov 2017 13:57:06 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Andy Wingo Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Andy Wingo skribis: > I think it's reasonable to want to be able to open PDFs in inkscape or > GIMP (e.g. via the "Open With" menu in a file browser like Nautilus), > just that they shouldn't be the default option. I think removing the > association would be a not-so-good option; the blessed way to fix this > is apparently to install a set of defaults. > > Specifically we should add to this package from gnome.scm to include the > PDF -> evince association: > > (define-public gnome-default-applications > (package > (name "gnome-default-applications") > (version "0") > (build-system trivial-build-system) > (source #f) > (propagated-inputs > `(("nautilus" ,nautilus))) > (arguments > `(#:modules ((guix build utils)) > #:builder > (begin > (use-modules (guix build utils)) > (let* ((out (assoc-ref %outputs "out")) > (apps (string-append out "/share/applications"))) > (mkdir-p apps) > (call-with-output-file (string-append apps "/defaults.list") > (lambda (port) > (format port "[Default Applications]\n") > (format port "inode/directory=org.gnome.Nautilus.desktop\n"))) > #t)))) > (synopsis "Default MIME type associations for the GNOME desktop") > (description > "Given many installed packages which might handle a given MIME type, a > user running the GNOME desktop probably has some preferences: for example, > that folders be opened by default by the Nautilus file manager, not the Baobab > disk usage analyzer. This package establishes that set of default MIME type > associations for GNOME.") > (license license:gpl3+) > (home-page #f))) Like this? --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 9a46495f1..34ecb5e05 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5882,7 +5882,9 @@ software that do not provide their own configuration interface.") (call-with-output-file (string-append apps "/defaults.list") (lambda (port) (format port "[Default Applications]\n") - (format port "inode/directory=org.gnome.Nautilus.desktop\n"))) + (format port "inode/directory=org.gnome.Nautilus.desktop\n") + (format port "application/pdf=evince.desktop\n") + (format port "application/postscript=evince.desktop\n"))) #t)))) (synopsis "Default MIME type associations for the GNOME desktop") (description --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > Possibly we could have a set of defaults for XFCE as well. See also > https://wiki.archlinux.org/index.php/default_applications#XDG_standard. Indeed. I=E2=80=99m surprised upstream GNOME and Xfce don=E2=80=99t provide a =E2= =80=98default.list=E2=80=99 file. Thanks, Ludo=E2=80=99. --=-=-=--