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 ) :

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 :

In your ~/.mozilla/firefox/ folder the key-places-and-files are :

At the end, you’ll save your firefox-youtube.desktop launcher into :

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]
Comment=Youtube through Firefox
Exec=firefox -P Youtube --class Youtube %u

-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…

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

#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Google Calendar
Exec=/opt/ --profile-directory=Default