I looked up how to create a website shortcut on the desktop, and I keep getting a lot of different methods, none of which work.
I cannot drag and drop a url to the Desktop folder to create a shortcut. It just gives me "Drag and drop is not supported. An invalid drag type was used.
I cannot create a .desktop or .sh file to create the link. When I finish with these files and give them execution privileges, it does nothing- they open no window.
Can anyone explain what's going on, or maybe how to do it with a different method?
Edit: I am using 20.04 and I'm trying to create a shortcut with chrome (I much prefer Chrome to Firefox).
You can use Firefox to create a website shortcut on your computer's desktop.
Run Firefox and open a website.
Resize the Firefox window so you can see both your computer's desktop and the Firefox window on the same screen.
Click the icon on the left of the address bar (where the URL is shown).
While still holding the mouse button down, move the pointer to the desktop, then release the mouse button.
The shortcut will be created.
Alright, I have discovered a solution for Google Chrome. Open a terminal window and run this command:
A new Gedit window will open up. Enter the following:
Exit the Text Editor and right click on the gear icon that has appeared on your Desktop. Click "Allow Launching." This should create a good deskop shortcut.
For those trying to use Ubuntu 20.04 (up to 21.10 (Gnome 40) and probably 22.04 (Gnome 42) ), here's the issue and possible workarounds:
The issue: In desktop linux, there's a layer of systems such as Freedesktop (an underlying layer of specifications and libraries), and desktop environments (DE) such as Gnome/KDE. Freedesktop specifies things like .desktop entries which supports links, desktop shortcuts, etc. Specific to Gnome (Ubuntu's default DE), at some point support for link .desktop entries were removed. See https://gitlab.gnome.org/GNOME/nautilus/-/issues/448 for details.
The complaints: There's been several voices around this issue. For more info see:
https://gigi.nullneuron.net/gigilabs/the-state-of-drag-and-drop-in-linux/ (2019)
https://www.reddit.com/r/firefox/comments/erph0p/how_to_save_a_url_webpage_link_on_linuxkde_like/ (2019)
ubuntu 19.04 not able to create url shortcuts by drag/drop (2019)
How to create a desktop shortcut to a website (2020 - i.e. this post which is still relevant in 2022)
The workaround: My personal workaround, as someone coming from a mac with various webloc files and just wanting to move forward for now is...
Save links from Firefox using the quickcut extension: https://addons.mozilla.org/en-US/firefox/addon/quickcut/ - the settings allow you to save either as .desktop or .webloc . Rather than deal with the fiasco of .desktop files (and due to having many .webloc shortcuts), I'm currently preferring saving as .webloc files with...
Use weblocopener on linux: https://benchdoos.github.io/ (it supports opening of .webloc files.)
Hope this helps anyone frustrated by this core workflow that stopped being functional in Ubuntu.