#800502 Please just open urls in a browser

Package:
konsole
Source:
konsole
Description:
X terminal emulator
Submitter:
Enrico Zini
Date:
2017-12-10 08:24:03 UTC
Severity:
important
#800502#5
Date:
2015-09-30 08:46:43 UTC
From:
To:
Hello,

when I click on a URL to open it, konsole does not just open it in a
browser, but it seems to make a HEAD request for it, check its mime
type, and then open it in the application associated with that mime
type.

This is causing all sorts of problems:

 - there is a lag before opening a URL
 - when I click on a URL, I have no way of knowing what is going to
   happen. Thankfully, clicking on
http://ftp.us.debian.org/debian/pool/main/d/debtags/debtags_2.0.1_all.deb
   asks me what I want to open it with, instead of just trying to
   install it, and thankfully https://sso.debian.org/spkac/ca.pem does
   not import it automatically: those are the two first things that came
   to my mind.
 - I have seen an image url open in gimp, which cannot open URLs
 - occasionally, a URL is opened in an application that does not run in
   background, and konsole just freezed waiting for it to finish. All my
   open terminals were frozen.

   Running ps on a completely different terminal I found this relevant
   process:
      /usr/lib/x86_64-linux-gnu/libexec/kf5/kioexec shutter %F https://scontent-lhr3-1.xx.fbcdn.net/hphotos-xfp1/v/t1.0-9/s720x720/12046782_622502334558707_4102355954418697241_n.jpg?oh=85a81b658f0f77abede441e203e903b9&oe=5695852A
   and killing it gave me my existing terminals back.

I would like konsole to just open links using /usr/bin/x-www-browser, or
to have a configuration option for what browser to use to open links. I
looked in "Configure Konsole" or "Edit current profile", and found
no way of changing it.


Thank you,

Enrico

#800502#10
Date:
2015-09-30 09:28:38 UTC
From:
To:
tags -1 upstream
thanks

Am Mittwoch, 30. September 2015, 10:46:43 CEST schrieb Enrico Zini:

Dear Enrico,

I think this is an upstream implementation issue. KDE applications use
kio_html to determine the mime type to decide which application to use on it.
That way if have an URL to an image it opens Gwenview instead.

You can help by forwarding this issue upstream if not already done. I may also
do it, but likely not this week anymore.

+ if you set Konqueror to ask for whether to allow cookies, you get a cookie
confirmation dialog out of nowhere before the application to be started opens.

I bet there is none as to what I know all KDE apps use this mechanism to open
URLs and thats why I think its an upstream issue.
[…]

Thanks,

#800502#15
Date:
2015-09-30 11:13:44 UTC
From:
To:
The default behavior for any kind of file, no matter if addressed locally or
remotely, is to open it with the program associated with the type.
E.g. as Martin already said, opening an image in the configured image viewer.

It is possible to override this for http and https URLs and have them always
open in a web browser.
Via KDE Systemsettings or

kcmshell5 componentchooser

Cheers,
Kevin

#800502#22
Date:
2017-03-29 14:18:54 UTC
From:
To:
¡Hola Enrico!


El 2015-09-30 a las 10:46 +0200, Enrico Zini escribió:

konsole uses KRun, with the given url, KRun basically does the same action
as xdg-open "url" would do, these actions are usually configurable as file
associations, either in the file manager or in corresponding system settings.
This part was already replied in other messages, but the other two were left
unattended.

KRun fetches a temporary file prior calling gimp, there is some logic to detect
if this is needed, but I haven't checked it thoroughly, it seems to work fine
for gimp now.

Here it seems that klauncher failed and KRun went on and tried to complete the
action in the same main process, I'm not aware of this issue, but it seems
that it's no longer reproducible. (At least testing this in a cinnamon vm,
with only konsole, and kinit installed from the KDE world)

In the konsole code there are two "urls" that are matched in the text,
web links and emails. In both cases it calls KRun to use the "preferred"
application. It could be added as an option to call a specific program for
each type, I'm not sure if I support the idea completely, but it might be
worth asking upstream. If possible, could you send the feature request
upstream?

Happy hacking,

#800502#27
Date:
2017-03-30 12:52:31 UTC
From:
To:
I gave up with using konsole several months ago, so I'd drop following
up on this issue.

If it was only of interest to me, by all means feel free to close it.


Enrico

#800502#32
Date:
2017-04-06 16:31:55 UTC
From:
To:
¡Hola Enrico!

El 2017-03-30 a las 14:52 +0200, Enrico Zini escribió:

Closing issues by driving our users away? I think there is something about it
in the social contract. :(

While testing this I noticed that the KRun behavior under a Cinnamon or Gnome
environment is more annoying than when used under Plasma, I think there is
a different logic at play somewhere that might cause the annoyance. I'll test
this when I have the time.

Happy hacking,

#800502#37
Date:
2017-12-10 08:19:53 UTC
From:
To:
For anyone else still trying to get konsole to open URLs in a browser
(as if it would be safe to open them anywhere else), without solving
the mystery of which packages you need to bring in for `kcmshell5
componentchooser`, I think the sufficient incantation (tested on
stretch) is to:

Add to ~/.config/kdeglobals:

[General]
BrowserApplication[$e]=!/usr/bin/google-chrome

and start a new konsole where it will take effect.