What does this steam-desktop shortcut URL steam:// mean

Viewed 669

How do steam-desktop shortcuts steam:// actually work?

The URL / target of them is something like: "steam://rungameid/717" I know similar things like "ftp://mynetworkadress:1337/subfoldercontainsgoodstuff" or for sure "http://".

But why and how does this steam thing work, can you do something similar on your own (e.g. "niceapp://launchprocess/param") and if so, why would you?

2 Answers

steam:// is the Steam browser protocol, i.e. a proprietary URL handler.

The official documentation is at Valve Software.

An article by PCWorld on the Steam URL protocol and potential security threats can be found here:

When the Steam client is installed on a system, it registers itself as a steam:// URL protocol handler. This means that every time a user clicks on a steam:// URL in a browser or a different application, the URL is passed to the Steam client for execution.

But why and how does this steam thing work, can you do something similar on your own

Yes. You can implement anything on your own.

The URI format is basically:

<protocol>:<arguments>

Some protocols such as http and ftp accept URL as argument. However the argument for any arbitrary protocol does not have to be a URL. For example, the magnet: protocol used by Bittorrent does not use a URL instead it describes the torrent and the torrent hash.

As you have experienced, browsers support some protocols built in. This includes http and ftp as well as custom protocols such as about:config in Firefox and chrome://settings in Google Chrome to display the settings page.

If a browser encounters a protocol that it does not understand it will ask you what program you want to open the link with. It will then tell the OS to run that program and pass the argument as a command-line argument to that program. This is how you can get the browser to open steam: link in Steam or a magnet: link in a torrent client.

It used to be that you can type any protocol in the browser's URL bar and trigger this behavior. However, modern browsers also use the same input as a search bar so typing in protocol:argument manually these days will more likely trigger a Google search. But links still work as they used to.

Related