From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Wingo Subject: Re: MIME database Date: Tue, 28 Nov 2017 13:57:06 +0100 Message-ID: <87374yy319.fsf@igalia.com> References: <20171127125053.C13FF4E0018@mta-1.openmailbox.og> <87k1ya3gdy.fsf@gnu.org> <1f8eda54eb31d66d64c9fdcc4138853e@lepiller.eu> <87y3mqir4d.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJfRv-0007Eb-NN for guix-devel@gnu.org; Tue, 28 Nov 2017 07:57:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJfRs-0000G3-J9 for guix-devel@gnu.org; Tue, 28 Nov 2017 07:57:19 -0500 Received: from pb-sasl1.pobox.com ([64.147.108.66]:65324 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eJfRs-0000Fe-Dt for guix-devel@gnu.org; Tue, 28 Nov 2017 07:57:16 -0500 In-Reply-To: <87y3mqir4d.fsf@gmail.com> (Alex Vong's message of "Tue, 28 Nov 2017 19:23:30 +0800") 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: Alex Vong Cc: guix-devel@gnu.org On Tue 28 Nov 2017 12:23, Alex Vong writes: > julien lepiller writes: > >> Le 2017-11-28 10:24, ludo@gnu.org a =C3=A9crit=C2=A0: >>> brendan.tildesley@openmailbox.org skribis: >>> >>> Right, so I think the immediate course of action here would be to patch >>> GIMP=E2=80=99s MIME data so that it does not register as a PDF viewer. >>> >>> If we stumble upon other issues like that, we can fix them similarly. >> >> Thanks for investigating that. >> >> Inkscape also wants to open pdf files ;) >> > On my laptop, the recommended programs include evince, libreoffice draw, > gimp, inkscape, imagemagick and winebrowser. I am not running guixsd > though. 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=3Dorg.gnome.Nautilus.deskt= op\n"))) #t)))) (synopsis "Default MIME type associations for the GNOME desktop") (description "Given many installed packages which might handle a given MIME typ= e, a user running the GNOME desktop probably has some preferences: for examp= le, 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))) Possibly we could have a set of defaults for XFCE as well. See also https://wiki.archlinux.org/index.php/default_applications#XDG_standard. Andy