Whenever I click on a hyperlink presented within a software the link seems to be modified. Let's say software X presents a link to its online documentation, e.g. https://www.coolsoft.org/doc/manual.html
I get an error message in a window marked with a yellow folder in the upper left. The error message will read:
/home/myuser/'somepath'/http:/www.coolsoft.org/doc/manual.html: file or directory not found
'somepath' seems to be the working directory of program X in many cases. Note that the full link which is obviously nonsense misses a / after http: or https: The small folder symbol in the corner of the error message makes me think, that the issue is related to lxde's file browser.
However there are exceptions. When I click links in messages in Thunderbird, the link opens flawlessly in firefox.
How can I fix this?
Update
Being asked for a specific example. Today I used Anki. Anki was installed via packet manager (xbps). Anki showed a link with information to look up. It triggers the error message:
/home/ariser/.local/share/Anki2/Benutzer 1/collection.media/http:/ankisrs.net/docs/manual.html#using-decks-appropriately: Datei oder Verzeichnis nicht gefunden
This is the original error message in German.
http://
(double slash) instead ofhttp:/
(single slash). – Kusalananda Jun 28 '22 at 21:11xdg-open https://example.com
also fail? – Marcus Müller Jun 29 '22 at 23:55xdg-open https://www.tagesschau.de
brings up/home/ariser/https:/www.tagesschau.de: Datei oder Verzeichnis nicht gefunden
Funny. – Ariser Jun 30 '22 at 13:20xdg-settings get default-url-scheme-handler https
say? – Marcus Müller Jun 30 '22 at 14:21firefox.desktop
, which means /usr/share/applications/firefox.desktop is consulted on how to open https URLs, which in turn just runsfirefox %u
(the%u
gets replaced with the URL). Do you have a firefox.desktop containing anExec=firefox %u
line? Can you try tolocate userapp-Firefox-VHCIT0.desktop
, and check whether it does something strange in theExec=
line? – Marcus Müller Jul 03 '22 at 16:22/home/ariser/.local/share/applications/userapp-Firefox-VHCIT0.desktop
and within that I foundExec=/usr/lib/firefox/firefox %u
So nothing which could explain why the URL gets mutilated. I think the error message could be issued by PCManFM. Perhaps the URL is not recognized as URL at all but gets interpreted as a local path from the very beginning. – Ariser Jul 04 '22 at 15:14xdg-open https://example.com
! Now we're down to debugging where the hell things go wrong, in the source code (I'm so here for this kind of bug hunting!) – Marcus Müller Jul 04 '22 at 15:19/usr/lib/firefox/firefox https://example.com
does work, right? (I really think it ought, but I've stopped ruling out things!) – Marcus Müller Jul 04 '22 at 15:21xdg-open
; if it doesn't, we need to debug that script.