Open igalic opened 8 years ago
apparently this isn't an xdg-utils bug: https://bugs.freedesktop.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&bug_status=NEEDINFO&bug_status=PLEASETEST&component=xdg-utils&query_format=advanced&short_desc=redirect&short_desc_type=allwordssubstr or at least no one has noticed it so far.
I'm going to be testing this out tomorrow. I'll make sure to post back here with my findings.
i've traced this down to kde-open5, now let's see what that does
of course that only calls KRun::runService()
Would you mind describing your setup, so I can help you diagnose this a bit more. I've verified it works on a fresh Ubuntu 14.04.
This is kubuntu 16.04 with its latest plasma desktop
update: from https://quickgit.kde.org/?p=kio.git&a=blob&h=b9b232dc80e9fa9b47f65203aa72b52280124fc1&hb=19fd3c456037c9cd7f762b174172de085fd53673&f=src%2Fwidgets%2Fkrun.cpp (line 104++)
static QString schemeHandler(const QString &protocol)
{
// We have up to two sources of data, for protocols not handled by kioslaves (so called "helper") :
// 1) the exec line of the .protocol file, if there's one
// 2) the application associated with x-scheme-handler/<protocol> if there's one
// If both exist, then:
// A) if the .protocol file says "launch an application", then the new-style handler-app has priority
// B) but if the .protocol file is for a kioslave (e.g. kio_http) then this has priority over
// firefox or chromium saying x-scheme-handler/http. Gnome people want to send all HTTP urls
// to a webbrowser, but we want mimetype-determination-in-calling-application by default
// (the user can configure a BrowserApplication though)
const KService::Ptr service = KMimeTypeTrader::self()->preferredService(QLatin1String("x-scheme-handler/") + protocol);
if (service) {
return service->exec(); // for helper protocols, the handler app has priority over the hardcoded one (see A above)
}
Q_ASSERT(KProtocolInfo::isHelperProtocol(protocol));
return KProtocolInfo::exec(protocol);
}
so kde tries to figure out if the resulting url is an image, or a PDF, or whatever, before trying to open it in Gwenview, or Okular, or giving up and opening it in a browser. This is not so good in our case. It would be nice if we could override that.
@igalic I'm working out a solution to make this work with Kubuntu right now.
oh, wow… i haven't had time in almost a month for github gardening ._. thank you @bryanl :purple_heart:!
This seems to be primarily on linux when trying to xdg-open a url that requires authentication before access, xdg-open will use whatever that URL redirects to. e.g.:
that means, that when trying to
xdg-open
https://cloud.digitalocean.com/settings/api/tokens/new - it will actually open https://cloud.digitalocean.com/login