How can I create a desktop shortcut to my favorite website?

How can I create a desktop shortcut to my favorite website?
For example, a direct link to youtube with its own icon on the desktop to automatically open in firefox?

Desktop shortcuts are specific to the browser you use. I use Brave so, I select the hamburger icon top right, Moore tools, create shortcut.
For firefox see this link.

Mmmm… @makitso why not a regular launcher ( a .desktop file ) for the web-browser of your choice, targeting a specific website url ?

The method described in Firefox support page creates a kind of link without icon and is not at all a « Linux » desktop launcher. And it’s broken with snap web-browsers / or in DE that don’t display icons on desktop.

The method you mentioned for Brave ( same as in Chromium, Chrome and the likes ) is also partially broken with snap web-browsers.

Sorry @mikomc I’ve never translated this « how-to » for creating Firefox launchers on specific websites, with their own icons ( if you read french ) :
https://doc.ubuntu-fr.org/firefox_quelques_astuces#des_lanceurs_pour_site_web_avec_profil_et_icone_dedies_faute_de_pwa

To achieve that ( own icon ) you’ll need to launch Firefox with a profile dedicated to that website.
You may synchronize that profile with your usual one, if you want, but Firefox has to be launched on a profile for Youtube ( as your example. )
One icon can be associated to one profile, that’s the idea.

The important key-words in your launcher ( .desktop file ) are :
Name
Icon
Exec
–class
StartupWMClass

In your ~/.mozilla/firefox/ folder the key-places-and-files are :
~/.mozilla/firefox/profiles.ini
~/.mozilla/firefox/<dedicated_profile_for_youtube>

At the end, you’ll save your firefox-youtube.desktop launcher into :
~/.local/share/applications


Trying to sum it up…

Launch Firefox from terminal this way

firefox --ProfileManager

Create a new profile, named « Youtube ».
No need to launch it now.
But be sure it has been created ( look into ~/.mozilla/firefox )

In ~/.local/share/applications create a file named firefox-youtube.desktop which contains :

[Desktop Entry]
Version=1.1
Type=Application
Name=Youtube
Comment=Youtube through Firefox
Icon=youtube
Exec=firefox -P Youtube https://www.youtube.com/ --class Youtube %u
Categories=AudioVideo;Audio;Player;Network;Internet;
StartupWMClass=Youtube
StartupNotify=true

-P, --class and StartupWMClass must share the same value ( here, Youtube ).

In ~/.local/share/icons or in /usr/share/icons
don’t forget to have a file for your icon, named youtube.png or youtube.svg
Or use Papirus icon set which probably offers a youtube icon :wink:

And voilà.
You’ll find the Youtube shortcut in your app’ menu among your other installed app’s.
You may copy paste that firefox-youtube.desktop launcher onto your desktop…

@Coeur-Noir
Yes, he can also create a desktop launcher. I have several one to open Google Calendar.

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Google Calendar
Exec=/opt/brave.com/brave/brave-browser --profile-directory=Default https://calendar.google.com/calendar/u/0/r
Icon=brave-kjbdgfilnfhdoflbpgamdcdgpehopbep-Default