Package Details: xdg-utils-mimeo 1.2.1-2

Git Clone URL: https://aur.archlinux.org/xdg-utils-mimeo.git (read-only, click to copy)
Package Base: xdg-utils-mimeo
Description: Command line tools that assist applications with a variety of desktop integration tasks; patched to use mimeo
Upstream URL: https://www.freedesktop.org/wiki/Software/xdg-utils/
Keywords: mime mimeo xdg-open
Licenses: MIT
Conflicts: xdg-utils
Provides: xdg-utils
Submitter: matthewbauer
Maintainer: TrialnError
Last Packager: TrialnError
Votes: 76
Popularity: 0.001267
First Submitted: 2009-12-16 04:08 (UTC)
Last Updated: 2025-05-26 20:36 (UTC)

Dependencies (15)

Required by (928)

Sources (2)

Latest Comments

1 2 3 4 5 6 Next › Last »

djsigmann commented on 2025-05-26 22:18 (UTC)

@TrialnError The problem's been solved. Thanks! That was very timely.

TrialnError commented on 2025-05-26 20:38 (UTC)

Calling set_browser_mimeo() itself wasn't wrong. It just couldn't handle a supplied ${scheme}.
I adjusted that behaviour. Could you please test this too?

TrialnError commented on 2025-05-26 18:33 (UTC)

Thank you for the comment and the proposed solution. I will take a look at this

djsigmann commented on 2025-05-26 17:15 (UTC)

Running commands of the form xdg-settings set url default-url-scheme-handler ${scheme} ${desktop} will incorrectly call the set_browser_mimeo() function with the provided desktop entry file as an argument.

e.g. xdg-settings set url default-url-scheme-handler discord vesktop.desktop

This leads to whatever desktop entry that was supplied being treated as the default browser by anything that looks up mimetype associations (which is nearly everything, nowadays). I don't want want to open webpages with a chat client.

The fix:

diff --git a/mimeo-detection.patch b/mimeo-detection.patch
index 0d884c4..98e4b37 100644
--- a/mimeo-detection.patch
+++ b/mimeo-detection.patch
@@ -208,7 +208,7 @@ index a62eedd..d57a410 100755
 +        exit_failure_file_missing
 +    fi
 +
-+    set_browser_mimeo "$desktop"
++    set_browser_mime "$desktop" "x-scheme-handler/$scheme"
 +}
 +
 +# }}} mimeo

aelius commented on 2020-04-19 22:52 (UTC) (edited on 2020-04-19 23:05 (UTC) by aelius)

Thank you for the update! Now it behaves as it should.

Looks like there is a problem with mimeo itself, though. I'll have to send xyne a bug report.

aelius@Talim ~> mimeo 'https://www.archlinux.org/static/archnavbar/archlogo.a2d0ef2df27d.png'
aelius@Talim ~> Unknown profile 'image'.
Error parsing option profile (option parameter could not be parsed)
Setting commandline option --profile=image failed.

Exiting... (Fatal error)

edit- nevermind, there was a lingering associations file I forgot about.

TrialnError commented on 2020-04-19 21:46 (UTC)

Thank you.
Same issue as with xdg-mime. The original way to get the info from mimeo didn't work (for reasons unknown).
Fix incoming

aelius commented on 2020-04-19 21:01 (UTC)

Updated. This is just copied from my terminal. Still silent/null output from get default-web-browser

aelius@Talim ~> rm .config/mimeapps.list
aelius@Talim ~> xdg-settings set default-web-browser org.mozilla.firefox.desktop
aelius@Talim ~> xdg-settings get default-web-browser
aelius@Talim ~> cat .config/mimeapps.list
[Default Applications]
x-scheme-handler/about=org.mozilla.firefox.desktop;
x-scheme-handler/http=org.mozilla.firefox.desktop;
x-scheme-handler/https=org.mozilla.firefox.desktop;
x-scheme-handler/unknown=org.mozilla.firefox.desktop;
aelius@Talim ~> mimeo --prefer org.mozilla.firefox.desktop
aelius@Talim ~> xdg-settings get default-web-browser
aelius@Talim ~> cat .config/mimeapps.list
[Default Applications]
application/vnd.mozilla.xul+xml=org.mozilla.firefox.desktop;
application/xhtml+xml=org.mozilla.firefox.desktop;
text/html=org.mozilla.firefox.desktop;
text/mml=org.mozilla.firefox.desktop;
text/xml=org.mozilla.firefox.desktop;
x-scheme-handler/about=org.mozilla.firefox.desktop;
x-scheme-handler/http=org.mozilla.firefox.desktop;
x-scheme-handler/https=org.mozilla.firefox.desktop;
x-scheme-handler/unknown=org.mozilla.firefox.desktop;

TrialnError commented on 2020-04-19 18:24 (UTC)

Okay, thanks for the clarification. Although even if it somehow got recognized as flatpack it should have failed audibly.
And thank you cosmic for the report. With the backslashes in place mimeo took it as a literal string and therefor added an additional .desktop to the entry. So indeed a bug (and thanks for the reminder for mimeapps.list >.>).
Now to check, why this doesn't help Aelius. Please check the new PKGBUILD and report what gets added to the mimeapps.list please.

aelius commented on 2020-04-19 01:07 (UTC) (edited on 2020-04-19 03:10 (UTC) by aelius)

No, the directory $XDG_RUNTIME_DIR/flatpak-info does not exist on my system. I tried out cosmic's changes for fun, did not resolve my issue either.

cosmic commented on 2020-04-19 00:35 (UTC) (edited on 2020-04-19 00:35 (UTC) by cosmic)

I believe there's a bug in set_browser_mimeo(). The broken line is: mimeo --prefer x-scheme-handler/$protocol \"$1\" || return. It incorrectly sets a desktop file in mimeapps.list: x-scheme-handler/http="firefox.desktop".desktop;. Those quotation marks shouldn't be escaped: mimeo --prefer x-scheme-handler/$protocol "$1" || return