Originally posted in German at my Hubzilla
I’ve read a lot comments or post stating that Steam is DRM, but that’s only half of the truth. Steam is a store in the first place, just like Epic, EA, itch.io, Humble or GoG. One needs an account to download purchased games on all of these platforms. But unlike others, itch.io, Humble and GoG offer installers for download directly on their store websites. There’s still no way to download and play games outside of EA’s crappy store app, for Epic’s store one has at least a couple of third-party tools for that job and to download games from Steam one needs their official command line client.
Data which has to replaced with your own information is indicated by a token-style placeholder ($token_name
). Just replace it your own details while following this tutorial.
SteamCMD
The command line client for downloading Steam games is called SteamCMD
. It’s installed with apt install steamcmd
on Debian GNU/Linux and requires Debian’s nonfree-component to be activated. You can also install it manually by following the official instructions.
SteamCMD can be used in different ways but this post focuses on the “interactive” mode. SteamCMD also supports plenty of command line arguments or even scripting. If you’re into that, take a look at Automating SteamCMD.
To download a game from steam you need the following informations:
- Preferred installation path (
$install_dir
) - Game’s AppID (
$app_id
) - Steam account user name (
$steam_user
) - Steam account password (
$steam_pass
) - Steam Guard Code (
$steam_code
)
SteamCMD
downloads and installs the command line client to your user profile at first launch. It’s ready to use as soon as Steam>
appears in the terminal.
The first step is to set our own installation path to prevent SteamCMD
from installing games in it’s own library located somewhere in your profile. You have to set the path prior to logging in:
Steam>force_install_dir $install_dir
Steam>
Now we can log in to our Steam account:
Steam>login $steam_user
Logging in user '$steam_user' to Steam Public...
password: $steam_pass
If you have Steam Guard activated, you’ll have to input your Steam Guard Code right after logging in:
This computer has not been authenticated for your account using Steam Guard.
Please check your email for the message from Steam, and enter the Steam Guard
code from that message.
You can also enter this code at any time using 'set_steam_guard_code'
at the console.
Steam Guard code: $steam_code
You’ll be successfully logged in afterwards.
OK
Waiting for client config...OK
Waiting for user info...OK
Steam>
SteamCMD
is now ready to download your games. You just need the AppID of your game which can be easily found at SteamDB or in the URL of the Steam Store link. Dead Effect’s AppID 286040 for example: https://store.steampowered.com/app/286040/Dead_Effect/
. You can start downloading with these commands:
Steam>app_update $app_id validate
Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
Update state (0x61) downloading, progress: 0.02 (1858882 / 10530549192)
Update state (0x61) downloading, progress: 0.16 (16540456 / 10530549192)
Update state (0x61) downloading, progress: 0.69 (73163560 / 10530549192)
…
Downloading will take a while and the files will be verified afterwards.
…
Update state (0x81) verifying update, progress: 6.50 (684342663 / 10530549192)
…
SteamCMD
may be exited after sucessful validation. You can skip verifying by omitting the parameter validate
when downloading the game.
Success! App '$app_id' fully installed.
Steam>exit
The SteamCMD
utility downloads downloads the appropriate game files for your current platform. If you’re running SteamCMD
from Linux, it’ll try to download the Linux version of the specified game. If it can’t find a Linux version, the download will contain the Windows version of the game and a suitable Proton tarball.
Goldberg Emulator
Some games actually need some of the Steam Client’s API functions for managing savegames, reading profile data or some multiplayer features. These games usually wouldn’t work without a working Steam client, but you can use the Goldberg Emulator
to emulate a subset of the API functions. It can be downloaded from their official GitLab page.
The archive contains a couple of DLL files for Windows games, some config file examples, Linux libraries for native Linux games and the source code.
Depending on your game you’ll only have to exchange the shipped client-API-library with the matching library from the Goldberg Emulator
, maybe modify some config files and launch the game.
Last Minute Hint
Some free2play games may be downloaded without an account. Just use the user name anonymous
for $steam_user
and execute app_license_request $app_id
before downloading.
Have fun! :)
Comments
No comments yet. Be the first to react!