You are not logged in.

#1 2018-06-05 13:29:13

Freso
Member
From: Southern Scandinavia
Registered: 2011-09-09
Posts: 48
Website

[SOLVED] Bad MIME association(?) for x-scheme-handler/http{,s}

So for about two weeks now, I've somehow had a bad association for http(s):// links, causing them to try and open the URLs on the local filesystem(!).

E.g., when I do this:
freso@koume ~> xdg-mime query default x-scheme-handler/https
firefox.desktop
freso@koume ~> xdg-open 'https://freso.dk'

I get an "Error" warning box saying "/home/freso/https:/freso.dk: Ingen sådan fil eller filkatalog" (ie., "no such file or directory"). Commenting out "x-scheme-handler/https=firefox.desktop" in mimeapps.list's [Default Section], changes `xdg-mime query default x-scheme-handler/https` to say `chromium.desktop`, but with the same error message on `xdg-open`. Maybe it's not even recognising it as 'x-scheme-handler/https'? I'm a bit lost on how to dig further into this.

Desktop environment is LXDE.

Last edited by Freso (2018-06-06 06:44:00)


PKGBUILDs: in AUR

Offline

#2 2018-06-05 14:35:03

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,902

Re: [SOLVED] Bad MIME association(?) for x-scheme-handler/http{,s}

xdg-open is a shell script. It seems is_file_url_or_path() fails for some reason, thus prepends the PWD and produces this error in pcmanfm.
Try to inspect the function and which checks fail and why.

Offline

#3 2018-06-05 14:52:33

Freso
Member
From: Southern Scandinavia
Registered: 2011-09-09
Posts: 48
Website

Re: [SOLVED] Bad MIME association(?) for x-scheme-handler/http{,s}

I just tried downgrading from xdg-utils 1.1.3-1 to 1.1.2-2, and that seems to work, so somewhere between 1.1.2(-2) and 1.1.3(-1) something changed that broke this. I tried a few of the changes in the git log of xdg-open before trying reverting, but none of them triggered it. I'll try and step through the `is_file_url_or_path()` function and see if that yields anything, but I'm also tempted to do a `git bisect` to figure out where it breaks.


PKGBUILDs: in AUR

Offline

#4 2018-06-05 15:39:15

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] Bad MIME association(?) for x-scheme-handler/http{,s}

https://bugs.archlinux.org/task/58707

That is to say, fixed upstream but not released. wink
I'm slightly disappointed they would not release regression hotfixes... also that no one seems to understand bash, but then I've always been rather skeptical about the quality of the xdg-utils scripts.

Last edited by eschwartz (2018-06-05 15:41:44)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#5 2018-06-06 06:43:41

Freso
Member
From: Southern Scandinavia
Registered: 2011-09-09
Posts: 48
Website

Re: [SOLVED] Bad MIME association(?) for x-scheme-handler/http{,s}

Thanks Eschwartz! I applied the patch "manually" until the next xdg-utils update, and it seems to have done the job. I could have sworn I also saw this patch yesterday and tried to manually apply, but maybe I forgot to :w or something.

(It might be neat to do an xdg-utils 1.1.13-2 with it, maybe? Since upstream isn't willing to hotfix release it. Or a 1.1.13.r… based on the git? Anyway, WFM now.)


PKGBUILDs: in AUR

Offline

#6 2018-06-06 15:09:03

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] Bad MIME association(?) for x-scheme-handler/http{,s}

Yes, but either AndyRTR or JGC need to update xdg-utils with the fix, it's not my package. big_smile

That is why the bug I linked is open. It's just if upstream were to tag a new release then we could just flag it out of date, and new releases are generally easier to triage and package than backported fixes are.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB