10

I have this odd problem where whenever a link is opened from the shell, the cached html is opened locally, instead of through a browser.

to illustrate:

if I run the command xdg-open http://www.google.com in a bash prompt, this url opens in my browser bar: file:///var/tmp/kdecache-seldon/krun/13954_0_.

Here is an image of how it loads in chromium (which is currently set as my default browser).

weird error .


This issue also happens when there is a call to open a link from (most) applications, for instance, clicking on an external link in the help documentation for Gwenview.

Does anyone have any insight as to why this might be happening? Anything I can try to keep this from happening?


Updating with some steps that I have tried:

  • launching a url with the application path works just fine (i.e. chromium-browser http://www.google.com or firefox http://www.google.com

  • I checked ~/.local/share/applications/mimeapps.list and thought I had actaully found the problem because text/html was pointed to an old, non-existent .desktop file. But fixing the entry to chromium-browser.desktop did not fix the problem

I am still at a loss for what this issue could be

Glorfindel
  • 805
  • 2
  • 10
  • 19
Hari Seldon
  • 797
  • 2
  • 10
  • 22
  • this is a known [bug](https://bugs.kde.org/show_bug.cgi?id=297491). Check if any of the solutions posted in the bug tracker works for you. – d-cmst Jul 01 '13 at 09:54

2 Answers2

11

Im not entirely sure what goes on behind the scenes in KDE but it appears that chrome was not getting the url as a parameter, it was getting the fetched html instead (and only the html, no other resources).

So based on this answer for getting web based email as your default in KDE, on a hunch, I added $s to the end of the default Web Browser component, and it worked. I would love to know more about the $s parameter, if anyone knows, but it fixed this specific issue.

to fix this issue: In System Settings, under Default Applications for Web Browser, I changed /usr/bin/chromium-browser to /usr/bin/chromium-browser $s

(obviously /usr/bin/chromium-browser should be changed to the path of whichever browser you use)

Hari Seldon
  • 797
  • 2
  • 10
  • 22
  • 1
    +1 Thanks - this also worked for me. – Will Dec 04 '13 at 09:57
  • +1 Thanks, I didn't make the same change, but I saw that my Default Browser was getting the wrong path. Solved on Arch Linux. – valdeci Mar 16 '17 at 00:33
  • I have FF and Chrome installed. Changed the setting to FF since that's my default and it worked. Didn't know about this setting. Thanks! – Nick Jan 05 '21 at 20:20
0

In 2021, For firefox nightly, I had to add %u to the end of the desktop file for the url to opened and not a cached file

enter image description here

rrr
  • 181
  • 6