[Function request] Show destination web icon when creating a location link (URL)
Open, LowPublic

Description

Currently, when creating a shortcut to any website, the "text-html" icon is displayed by default.

Example of shortcut created for zoom:

[Desktop Entry]
Icon = text-html
Type = Link
URL [$e] = https: //zoom.us/join

It would be good not to use "text-html", instead show the icon of the destination web page.

That is, use the zoom image as an icon:
https://d24cgw3uvb9a9h.cloudfront.net/zoom.ico

In case the URL does not contain any icon, use "text-html".

Cheers

jomocu created this task.Jan 13 2021, 4:31 PM
jomocu triaged this task as Low priority.
jomocu updated the task description. (Show Details)
jomocu updated the task description. (Show Details)
alex added subscribers: dfaure, alex.Jan 13 2021, 5:47 PM

Just as a feature request this would belong to bugs.kde.org , but I think we can extend this tasks to also include the icons for the web shortcuts.

Some thoughts:

  • We can not just make a HTTP request to a random website, because it is in some desktop file. This seems like a huge security/privacy risk.
  • I am not sure if we can easily parse the favicon from the website. This might work in some cases, but not in all ;-)

Maybe we could reuse the logic of the bookmarks runner here: There the favicons of the default browser are accessed and written as a file to a cache location. We could try to reuse these cached icons. Of course we would need some kind of filename convention. Also all these icons would already be locally available, consequently we do not need to make a request to the website.

But I am not sure how this will look from a dependency POV. @dfaure Could we maybe extend the FavIconsCache for this functionality (just brainstorming right now). Then we would also compliment/extend what konqueror and some other apps already use/provide.

jomocu added a comment.EditedJan 19 2021, 3:09 PM

You could use the duckduckgo service to get the icons.

I leave an example here in case you see it useful.
https://icons.duckduckgo.com/ip2/es.beruby.com.ico
https://icons.duckduckgo.com/ip2/zoom.com.ico

Greetings

alex added a comment.Feb 1 2021, 9:46 AM

My concern is that we would make an API request to a third party server without asking for the users consent. Sth. like that would be really controversial. That is why I think reusing the icons from the browser is a better solution ;)