Firefox web shortcuts do not show an icon

With 19.10 and Firefox, I have trouble dragging the address from Firefox to the dock.

Issue 1:
On a laptop (HP Probook G6) I cannot drag it directly to the Dock. I have to drag it to the desktop first. Then drag it to the Dock. However the original on the Desktop stays, and if I remove that one, the shortcut on the dock stops working.

Weird:
On a computer, I can drag it directly to the Dock, strangely. Both laptop and PC are running 19.10.

Issue 2:
Both on the desktop and on the dock the icon is an ugly generic white icon showing “< / >”.

Well the different behaviors are a bit weird here but nevertheless it’s not expected to work like that with D’n’D…

There’s not really an easy way to make « link / shortcut » to website.

Least bad solution is to create your own « launchers » which are .desktop files that you store into your ~/.local/share/applications folder. Doing such they will appear in your general app’menu and you can manipulate them like any other app’ launcher.

Basically a .desktop file is an executable plain text file containing :

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Name=name as it appears in app'menu
Comment=to explain a bit more than only the name
Exec=path to program [ try xdg-open https://web.site ]
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=path to your icon of choice [ ie. create an icons folder in ~/.local/share ]
Categories=in which category this launcher will appear in app'menu
MimeType= 
StartupWMClass=
StartupNotify=true

save this as my_website.desktop
Be aware that such file once executable will appear with its saved Name= and Icon= in file explorer and not as my_website.desktop with generic text file icon :wink:

For easier further modification you can drag and drop such files from your file manager window to an open window of a text editor.

I know I can create .desktop files. But that is really not an option at all. I cannot constantly create .desktop files simply because I want to create a shortcut. That kills basic usability of Ubuntu for me.

I switched cold turkey from Win10 to Ubuntu a while ago and have been very happy since. Now that I start using it as my daily OS, this little issue is massively annoying… The fact it works on the PC means the only issue is the icon that is missing.

I am wondering if that missing icon has more to do with Firefox than with the OS…

Welcome into Linux, where such a simple thing to think about is a pain in the neck for years…


I can not drag and drop that link into icon tasks list in the panel, UBudgie 19.10 here too ( which sounds normal to me since it’s not a .desktop file )
You may modify the Icon= later but it seems to only accept path to local resource.

Ideally this link « mechanism » should automatically grab the favicon ( if any ).
I don’t know if it’s browser or system specific though.

Now if using Firefox why not rearranging this page :


or bookmarks ?

There is also a nice utility coming from peppermintOS called ICE, it aims to create webapp ( which is different from links/shortcuts/bookmarks ) for any website using almost any browser - needs some tricks with chromium-as-a-snap but it works - I use ICE ( .deb here, v6.0.6 ) for sites like google-drive/maps, deezer, fip-radio ( as you may see on my screenshots ). Now each of these websites have their own .desktop file, appear in app’menu and are displayed in « naked » web-browser window.

Note that this feature will soon be enabled natively in Firefox - where it’s called SSB, Single Site Browser.

Well, testing with Chromium as a snap.

Drag and drop from address bar to desktop creates the exact same kind of link as Firefox does.

Now in Chromium you can open
→ menu ( 3 vertical dots ) → more tools → create a shortcut

There you choose the name and if you want it as a regular page in your browser
or a webapp ( = window mode ).

This creates a .desktop file on your desktop.
But thanks to snap, it seems it can’t work…


It used to work with chromium as regular deb.
Same feature is probably available in other chromium based browsers, in .deb packages ( vivaldi, brave, opera… )

It’s a known bug → https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1732482 so it’s possible to have it working but no according icon… [ edit : well, the next day thanks to reboot I guess, it all works as expected, icon included ]

In the created .desktop file, replace in Exec=
/snap/chromium/1071/usr/lib/chromium-browser/chrome
by
/snap/bin/chromium
and eventually give to Icon= a path to an icon of your choice.

Thanks for the extensive feedback, but all I’m looking for is simply using my browser and the OS interface.
I’m not interested in running websites in a little app-like container…

Just dragging and dropping links from the browser to the dock, a panel applet or the desktop is such basic functionality. Webapp does not replace that.

I love Budgie but this triggers me to find a different distribution that solves this. It’s just too much part of my nature to drag and drop from browser to OS.

Hence began an endless journey for @zilexa… lol !

Your best chance is to look for a chromium-based browser where the shortcut ( as a .desktop file ) feature works as expected.

You may of course try all the distros you want but am pretty sure you won’t find that most simple thing anywhere in Linux. See, icons on desktop are already a dying thing for many.

Joke aside, if you find a way for d’n’d’ing web-links anywhere, share the good news !

I agree - that’s why I « show » other things.

In Linux docks, panels, desktop expect launchers. Launchers are standardized .desktop files, that you can then manipulate in many ways, like d’n’d between docks, panels and desktop.
â‹… ICE creates regular .desktop files but then webapp.
⋅ Chromium creates regular .desktop files too as handy shortcuts for webpage in full browser but then it’s broken in Ubuntu as off 19.10 because of snap packaging.

I truly understand your wish - heck it’s been more than 10 years I can’t understand why it’s not a default gesture in Linux Desktop Environments.

1 Like

This is an issue with firefox itself.

Nothing we can do ourselves.

You could use an extension like quickcut to create a .desktop icon for you and hence drag to a dock. But quickcut doesnt understand about grabbing a website favicon and feeding that into the .desktop file.

So what will be required is someone to create a linux friendly version of quickcut … or to submit a patch to Mozilla to create .desktop files with their favicon.

Not sure it’s only a Firefox issue. The behavior is the same with other web-browser.

That is to say - for the first problem :
⋅ when you d’n’d a web-url from web-browser onto desktop, it creates a ( kind of ) link.
. why not a .desktop file ?
→ what handles the creation of that link ? I’d say it’s system side but I don’t know.

Second problem, icon :
⋅ isn’t it possible to « fetch » a favicon without using a web-browser ?
⋅ if no favicon available, isn’t it possible to « thumbnail / screenshot » the web page ?
→ ICE which is a python script manages to fetch the favicon.

You know I know nothing about vala and python so here am thinking out loud.

What is being dragged and how it is being recognised is determined by firefox.

The drop target… nemo desktop or plank… decides whether it recognises what firefox is sending.

So fundamentally this is a firefox issue.

As to whether a third party can pull a favicon, yes anything can look at a url and ask for its favicon.

Scraping the browser has to come from the browser itself. Every browser behaves differently so it’s an impossible task to code a third party such as plank or Nemo desktop for every browser out there. Best you could do is screenshot the entire app which would look rubbish.

1 Like

So I guess the big question now is: do Chromium based browsers behave differently? I’ll test.

And by chance chromium and firefox create the exact same kind of link with D’n’D…

…is there a norm / standard / recommendation somewhere about this behavior with D’n’D ?

No standards. Any app can add anything to what should be dropped. Likewise, any receiving app can read what it wants, and ignore what it isnt interested in.

The link should just be a text file which you can read with your favourite text editor.

D’nD from address bar in FF :

[Desktop Entry]
Encoding=UTF-8
Name=Lien vers Firefox web shortcuts do not show an icon - General - Ubuntu Budgie
Type=Link
URL=https://discourse.ubuntubudgie.org/t/firefox-web-shortcuts-do-not-show-an-icon/3296/12
Icon=text-html

D’n’D from address bar in chromium :

[Desktop Entry]
Encoding=UTF-8
Name=Lien vers budgie - Qwant Recherche
Type=Link
URL=https://www.qwant.com/?q=budgie&t=web
Icon=text-html

How strange different browsers do the exact same thing ? A .desktop file which is not a « full » launcher.

D’n’D from path in nemo or from text-editor indeed creates just plain text file, with .txt extension.

Note that a D’n’D from window browser creates plain-text too… so the source location seems to matter here ( address-bar vs window ).

How weird…

I think your findings should be reported as bug to Mozilla (and the Chromium devteam but I care more about Mozilla).

Looks reasonable. So the issue here is that the icon= is a default value … the favicon isnt downloaded somewhere and then the path to the icon downloaded location isnt updated in the desktop file.

It’s an interesting thing to investigate. I suppose there could be many ways to slice this.

I would still dare to suggest that an extension for firefox would be the best way to address this in the interim. Such an extension would create a .desktop with the contents of the above and also download the favicon it’s available … both will need to be to a known location.

Bonus points would be for the extension to update plank if its running… or harder, add to the icon task list applet.

Why not use the MenuLibre app? just search Menu Editor in your apps. Allows you to create a .desktop file easily using a gui.

You could also use Chrom(e/ium) or Brave’s web app feature

@codic webapp are not @zilexa’s wish or need here.

And using MenuLibre ( or editing .desktop file ) is not as instantaneous as a d’n’d from web-browser to desktop or dock or panel…

…you know, like on many non-linux DE.

@codic webapp are not @zilexa’s wish or need here.

Yes, but they would also serve a imilar purpose.

True, however I’m saying that menulibre is faster than manually creating and modifying a *.desktop

1 Like

True but Zilexa and I are saying the lack of such a common feature in Linux is … weird at least.

How « report » such a wish towards Firefox and Chromium teams ? I mean launchpad or bugzilla ?

( on Windows with the D’n’D link feature, it seems a matching icon is generated ).

1 Like