guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MIME database


From: Andy Wingo
Subject: Re: MIME database
Date: Tue, 28 Nov 2017 13:57:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

On Tue 28 Nov 2017 12:23, Alex Vong <address@hidden> writes:

> julien lepiller <address@hidden> writes:
>
>> Le 2017-11-28 10:24, address@hidden a écrit :
>>> address@hidden skribis:
>>>
>>> Right, so I think the immediate course of action here would be to patch
>>> GIMP’s 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=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)))

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]