unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: "Sébastien Lerique" <sl@eauchat.org>, 72448@debbugs.gnu.org
Subject: bug#72448: "xdg-mime query filetype" fails silently on many filetypes (with fixes I see)
Date: Sun, 04 Aug 2024 11:23:03 +0200	[thread overview]
Message-ID: <c8a9b1b5d1e8cfb414ee9ff0d01926f62aeab3b8.camel@gmail.com> (raw)
In-Reply-To: <87y15djw1g.fsf@eauchat.org>

Am Samstag, dem 03.08.2024 um 20:33 +0200 schrieb Sébastien Lerique:
> Ahoy Guix!
> 
> "xdg-mime query filetype a-book.epub" or "whatever.pdf" returns
> nothing, which is both puzzling and limiting as it blocks "xdg-open"
> to work for many files.
> 
> My case was opening pdf or epub files from Emacs, which "xdg-open"
> always sends to the browser, whatever my config (instead of e.g.
> evince or Foliate).
> 
> So debugging shows that:
> in ".xdg-mime-real",
> (/gnu/store/06ll0ydqsf4bjxwpwsi68dmn2cg0biy6-xdg-utils-1.1.3/bin/xdg-
> mime
> points there),
> l.673-684 in "info_gnome()",
> even if the "if ... elif ... elif ... fi" fails
> (i.e. none of "gio", "gvfs-info", or "gnomevfs-info" are available),
> then l.696 "if [ $? -eq 0 ]" gives always true.
> 
> Why? I don't know. I guess having a "case ..." instead of "if ... fi"
> would solve this.
Could you prepare a patch to do so?  Or has one already been proposed
upstream?

> But the result is "exit_success" gets called whatever the situation,
> and xdg-mime often gives no output, which then bugs "xdg-open".
> 
> Running this in "guix shell gnome-vfs" solves it, but what should be
> done to fix? And how did this not appear earlier? (is xdg* new?)
> 
> The options I see are adding the "gnome-vfs" dependency ("gvfs"
> doesn't provide "gvfs-info", and "gio" is not a package), or
> proposing "case" instead of "if" upstream.
Note: In GNOME, prefer `gio open', it's part of glib:bin.  
On other desktops, I don't know what the preferred solution would be.

Cheers




  reply	other threads:[~2024-08-04  9:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-03 18:33 bug#72448: "xdg-mime query filetype" fails silently on many filetypes (with fixes I see) Sébastien Lerique
2024-08-04  9:23 ` Liliana Marie Prikler [this message]
2024-08-09  9:26   ` Sébastien Lerique

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=c8a9b1b5d1e8cfb414ee9ff0d01926f62aeab3b8.camel@gmail.com \
    --to=liliana.prikler@gmail.com \
    --cc=72448@debbugs.gnu.org \
    --cc=sl@eauchat.org \
    /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).