From: ludo@gnu.org (Ludovic Courtès)
To: Andy Wingo <wingo@igalia.com>
Cc: guix-devel@gnu.org
Subject: Re: MIME database
Date: Thu, 30 Nov 2017 10:54:26 +0100 [thread overview]
Message-ID: <87a7z46qi5.fsf@gnu.org> (raw)
In-Reply-To: <87374yy319.fsf@igalia.com> (Andy Wingo's message of "Tue, 28 Nov 2017 13:57:06 +0100")
[-- Attachment #1: Type: text/plain, Size: 1887 bytes --]
Andy Wingo <wingo@igalia.com> 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?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 803 bytes --]
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
[-- Attachment #3: Type: text/plain, Size: 268 bytes --]
> 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’m surprised upstream GNOME and Xfce don’t provide a ‘default.list’
file.
Thanks,
Ludo’.
next prev parent reply other threads:[~2017-11-30 9:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20171127125053.C13FF4E0018@mta-1.openmailbox.og>
2017-11-28 9:24 ` MIME database Ludovic Courtès
2017-11-28 10:01 ` julien lepiller
2017-11-28 11:23 ` Alex Vong
2017-11-28 12:57 ` Andy Wingo
2017-11-30 9:54 ` Ludovic Courtès [this message]
2017-12-01 15:05 ` Ludovic Courtès
2017-11-28 10:13 ` Andy Wingo
2017-11-29 8:19 brendan.tildesley
-- strict thread matches above, loose matches on Subject: below --
2017-11-29 9:12 brendan.tildesley
2017-11-29 11:49 brendan.tildesley
2017-11-29 11:51 brendan.tildesley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a7z46qi5.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=wingo@igalia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).