Reply to topic

Opening links in shell opens local html from kde cache

seldonPlan
Registered Member
Posts
3
Karma
0
OS
How can I configure links opened from the shell to be passed directly to the browser application?

if I run the following command in a bash prompt
Code: Select all
xdg-open http://www.google.com

this url opens in my browser bar:
Code: Select all
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).
Image

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.

I am able to open urls just fine if they are passed to an application call as an argument, such as:
Code: Select all
chromium-browser http://www.google.com
firefox http://www.google.com


I also checked ~/.local/share/applications/mimeapps.list and thought I had actually 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

Can anyone point me to any relevant configuration I am missing?
User avatar google01103
Manager
Posts
6668
Karma
25
what is your default browser set to? try using the full path /usr/bin/chromium
(found the suggestion in a Mandriva forum)


OpenSuse Leap 42.1 x64, Plasma 5.x

seldonPlan
Registered Member
Posts
3
Karma
0
OS
In System Settings my default Web Browser component was set to /usr/bin/chromium-browser, it is now set to /usr/bin/chromium-browser $s

After reading this answer on the unix stackexchange site, I added $s to the end of the browser path on a hunch, and it seemed to fix all of the issues.

Is the $s parameter specific to KDE? I dont recognize it as a standard bash reserved variable. Is this behavior for the default browser component path documented anywhere?
User avatar google01103
Manager
Posts
6668
Karma
25
no idea, did you try using $u instead of $s ?

you should probably ask the question in it's own thread


OpenSuse Leap 42.1 x64, Plasma 5.x

User avatar bcooksley
Administrator
Posts
19765
Karma
87
OS
The correct syntax to use is actually %U. I've never seen the $s style of command invocation within KDE. Usually Chromium should be selectable from the list of available web browsers - was this not possible in this case?

XDG Command Substitutions:
- %f: Open a single local file/directory. No support for remote files/directories exists.
- %F: Open as many local files/directories as given. No support for remote files/directories exists.
- %u: Open a single local or remote file/directory.
- %U: Open as many local or remote files/directories as given.


KDE Sysadmin
[img]http://forum.kde.org/content/bcooksley_sig.png[/img]
seldonPlan
Registered Member
Posts
3
Karma
0
OS
bcooksley wrote:The correct syntax to use is actually %U. I've never seen the $s style of command invocation within KDE. Usually Chromium should be selectable from the list of available web browsers - was this not possible in this case?

XDG Command Substitutions:
- %f: Open a single local file/directory. No support for remote files/directories exists.
- %F: Open as many local files/directories as given. No support for remote files/directories exists.
- %u: Open a single local or remote file/directory.
- %U: Open as many local or remote files/directories as given.


Strangely enough when I use %u or %U I get two identical tabs opened in my current browser to the passed in URL. This is still better than the original issue though.

Chromium is selectable from the list of available browsers however it does not add any parameters to it when it is added (%u or $s).

right now it seems that the $s parameter is the only thing that works (for me) the way it is supposed to.
User avatar bcooksley
Administrator
Posts
19765
Karma
87
OS
Okay. I'm not sure how $s works then, but whatever works is fine I guess.


KDE Sysadmin
[img]http://forum.kde.org/content/bcooksley_sig.png[/img]

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], kde-zagzigger, Majestic-12 [Bot], Yahoo [Bot]