Difference between revisions of "Steam"

From ArchWiki
Jump to: navigation, search
(Alternative Flatpak installation: rewrite, don't duplicate Flatpak article)
(Big Picture Mode without a window manager: lose, not loose.)
 
(70 intermediate revisions by 14 users not shown)
Line 4: Line 4:
 
[[zh-hans:Steam]]
 
[[zh-hans:Steam]]
 
{{Related articles start}}
 
{{Related articles start}}
{{Related|Steam/Wine}}
 
 
{{Related|Steam/Troubleshooting}}
 
{{Related|Steam/Troubleshooting}}
 
{{Related|Steam/Game-specific troubleshooting}}
 
{{Related|Steam/Game-specific troubleshooting}}
 +
{{Related|Gaming}}
 
{{Related|Gamepad}}
 
{{Related|Gamepad}}
 +
{{Related|List of games}}
 
{{Related articles end}}
 
{{Related articles end}}
From [[Wikipedia:Steam (software)|Wikipedia]]:
+
[http://store.steampowered.com/about/ Steam] is a popular game distribution platform by Valve.
:Steam is a digital distribution, digital rights management, multiplayer and communications platform developed by Valve Corporation. It is used to distribute games and related media online, from small independent developers to larger software houses.
 
  
[http://store.steampowered.com/about/ Steam] is best known as the platform needed to play Source Engine games (e.g. Half-Life 2, Counter-Strike). Today it offers many games from many other developers.
+
{{Note|Steam for Linux only supports Ubuntu LTS.[https://support.steampowered.com/kb_article.php?ref=1504-QHXN-8366] Thus do not turn to Valve for support for issues with Steam on Arch Linux.}}
  
 
== Installation ==
 
== Installation ==
  
{{Note|
+
Enable the [[multilib]] repository and [[install]] the {{Pkg|steam}} package.
* Arch Linux is '''not''' officially supported, the only officially supported distribution is Ubuntu. [https://support.steampowered.com/kb_article.php?ref=1504-QHXN-8366].
+
 
* If you have a 64-bit system, enable the [[multilib]] repository.
+
The following requirements must be fulfilled in order to run Steam on Arch Linux:
}}
+
 
 +
* Installed 32-bit version [[Xorg#Driver installation|OpenGL graphics driver]].
 +
* Generated [[Locale#Generating locales|en_US.UTF-8]] locale, preventing invalid pointer error.
 +
* The GUI heavily uses the Arial font. See [[Microsoft fonts]]. An alternative is to use {{Pkg|ttf-liberation}} or [[Steam/Troubleshooting#Text is corrupt or missing|fonts provided by Steam]] instead.
 +
* [[Install]] {{Pkg|wqy-zenhei}} to add support for Asian languages.
 +
 
 +
=== SteamCMD ===
 +
 
 +
[[Install]] {{AUR|steamcmd}} for the command-line version of the [https://developer.valvesoftware.com/wiki/SteamCMD Steam].
  
[[Install]] the {{Pkg|steam}} package.
+
{{Note|This package installs files under ''root'', so you must run SteamCMD as ''root''.}}
  
The following fixes are needed to get Steam functioning properly on Arch Linux:
+
=== Alternative Flatpak installation ===
  
* If you have a 64-bit system, you will need to install the 32-bit version of your [[Xorg#Driver installation|graphics driver]] (the package in the ''OpenGL (Multilib)'' column)
+
Steam can also be installed with [[Flatpak]] as {{ic|com.valvesoftware.Steam}} from [https://flathub.org/ Flathub]. The easiest way to install it for the current user is by using the Flathub repo and flatpak command:
* Steam may fail to start due to broken/missing libraries.  See [[Steam/Troubleshooting#Steam runtime issues]].
 
* Steam makes heavy usage of the Arial font. A decent Arial font to use is {{Pkg|ttf-liberation}} or [[Steam/Troubleshooting#Text is corrupt or missing|the fonts provided by Steam]]. Asian languages require {{Pkg|wqy-zenhei}} to display properly.
 
* Several games have dependencies which may be missing from your system. If a game fails to launch (often without error messages) then make sure all of the libraries listed in [[Steam/Game-specific troubleshooting]] are installed.
 
* In case that you are using Arch Linux in your local language, make sure that you also have properly generated en_US locales (see [[Locale#Generating locales]]). Otherwise Steam client wont start with '''invalid pointer''' error.
 
  
== Alternative Flatpak installation ==
+
  flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
 +
  flatpak --user install flathub com.valvesoftware.Steam
 +
  flatpak run com.valvesoftware.Steam
  
Steam can also be installed via [[Flatpak]] ({{ic|com.valvesoftware.Steam}} from the [https://flathub.org/ Flathub] repository).
+
The Flatpak application currently does not support themes. Also you currently can't run games via {{ic|optirun}}/{{ic|primusrun}}, see [https://github.com/flatpak/flatpak/issues/869 Issue#869] for more details.
  
The Flatpak application currently does not support themes.
+
The Flatpak application has some [https://www.ctrl.blog/entry/flatpak-steamcloud-xdg known issues with Steam Auto-Cloud] so game progress may not be synced unless you create some symlinks by hand for affected games.
  
 
By default Steam won't be able to access your home directory, you can run the following command to allow it, so that it behaves like on Ubuntu or SteamOS:
 
By default Steam won't be able to access your home directory, you can run the following command to allow it, so that it behaves like on Ubuntu or SteamOS:
  
  flatpak override com.valvesoftware.Steam --filesystem=/home/$USER
+
  flatpak override com.valvesoftware.Steam --filesystem=$HOME
  
=== SteamCMD ===
+
== Directory structure ==
 +
 
 +
The default Steam install location is {{ic|~/.local/share/Steam}}. If Steam cannot find it, it will prompt you to reinstall it or select the new location. This article uses the {{ic|~/.steam/root}} symlink to refer to the install location.
  
For the [https://developer.valvesoftware.com/wiki/SteamCMD SteamCMD], a command-line version of the Steam client,
+
=== Library folders ===
that is primarily used to install and update dedicated servers, [[install]] the {{AUR|steamcmd}} package.
 
  
== Usage ==
+
Every Steam application has a unique AppID, which you can find out by looking at its [http://store.steampowered.com/ Steam Store] page path.
  
To start Steam simply run {{ic|steam}}.
+
Steam installs games into a directory under {{ic|''LIBRARY''/steamapps/common/}}. {{ic|''LIBRARY''}} normally is
 +
{{ic|~/.steam/root}} but you can also have multiple library folders (''Steam > Settings > Downloads > Steam Library Folders'').
  
* {{ic|-bigpicture}} to start in Big Picture Mode
+
In order for Steam to recognize a game it needs to have an
* {{ic|-silent}} don't open the main window
+
{{ic|appmanifest_''AppId''.acf}} file in {{ic|''LIBRARY''/steamapps/}}. The appmanifest file uses the
 +
[https://developer.valvesoftware.com/wiki/KeyValues KeyValues] format and its {{ic|installdir}} property
 +
determines the game directory name.
  
== Tips and tricks ==
+
== Usage ==
 +
 +
steam [ -options ] [ steam:// URL ]
  
=== Directory structure ===
+
For the available command-line options see the [https://developer.valvesoftware.com/wiki/Command_Line_Options#Steam_.28Windows.29 Command Line Options article on the Valve Developer Wiki].
  
{{ic|~/.steam/}} by default contains the following symlinks:
+
Steam also accepts an optional Steam URL, see the [https://developer.valvesoftware.com/wiki/Steam_browser_protocol Steam browser procotol].
  
bin  -> ~/.steam/bin32
+
== Launch options ==
bin32 -> ~/.local/share/Steam/ubuntu12_32
 
bin64 -> ~/.local/share/Steam/ubuntu12_64
 
root  -> ~/.local/share/Steam
 
sdk32 -> ~/.local/share/Steam/linux32
 
sdk64 -> ~/.local/share/Steam/linux64
 
steam -> ~/.local/share/Steam
 
  
As you can see Steam stores its files in {{ic|~/.local/share/Steam/}} by default. You can change where Steam stores its content by moving {{ic|~/.local/share/Steam/}} and starting Steam, which will prompt you if you have moved your Steam content. You can then browse to the new location and Steam will update the symlinks in {{ic|~/.steam/}}.
+
When you launch a Steam game, Steam executes its '''launch command''' in a [[Bash]] shell.
 +
To let you alter the launch command Steam provides '''launch options''',
 +
which can be set for a game by right-clicking on it in your library, selecting Properties and clicking on ''Set Launch Options''.
  
Games are installed in {{ic|~/.steam/root/steamapps/common/}}.
+
By default Steam simply appends your option string to the launch command. To set environment variables or
 +
pass the launch command as an argument to another command you can use the {{ic|%command%}} substitute.
  
=== Launch options ===
+
=== Examples ===
  
To set custom launch options for a game, right-click on it in your library, select Properties and click on the Set Launch Options button.
+
* only arguments: {{ic|-foo}}
 +
* environment variables: {{ic|1=FOO=bar BAZ=bar %command% -baz}}
 +
* completely different command: {{ic|othercommand # %command%}}
  
When your launch options contain {{ic|%command%}} Steam will replace it with the game's launch command, otherwise Steam will prefix the launch command to your launch options.
+
== Tips and tricks ==
The resulting command is then run in a [[Bash]] shell, allowing you to set environment variables before {{ic|%command%}}.
 
  
 
=== Big Picture Mode without a window manager ===
 
=== Big Picture Mode without a window manager ===
  
To start Steam in Big Picture Mode from a [[Display manager]], create a {{ic|/usr/share/xsessions/steam-big-picture.desktop}} file with the following contents:  
+
To start Steam in Big Picture Mode from a [[Display manager]], you can either:
 +
 
 +
* Install {{AUR|steamos-compositor}}
 +
* Manually add a Steam entry (''but you lose the steam compositor advantages: mainly you '''can't''' control Big Picture mode with keyboard or gamepad''):
 +
 
 +
create a {{ic|/usr/share/xsessions/steam-big-picture.desktop}} file with the following contents:  
  
 
{{hc|/usr/share/xsessions/steam-big-picture.desktop|<nowiki>
 
{{hc|/usr/share/xsessions/steam-big-picture.desktop|<nowiki>
Line 93: Line 108:
 
=== Steam skins ===
 
=== Steam skins ===
  
The Steam interface can be customized using skins. Skins can overwrite interface-specific files in {{ic|~/.steam/steam}}.
+
The Steam interface can be customized using skins. Skins can overwrite interface-specific files in {{ic|~/.steam/root}}.
  
 
To install a skin:
 
To install a skin:
  
# Place its directory in {{ic|~/.local/share/Steam/skins}}.
+
# Place its directory in {{ic|~/.steam/root/skins}}.
 
# Open ''Steam > Settings > Interface'' and select it.
 
# Open ''Steam > Settings > Interface'' and select it.
 
# Restart Steam.
 
# Restart Steam.
Line 107: Line 122:
 
==== Creating skins ====
 
==== Creating skins ====
  
Nearly all Steam styles are defined in {{ic|~/.steam/steam/resource/styles/steam.styles}} (the file is over 3,500 lines long). For a skin to be recognized it needs its own {{ic|resource/styles/steam.styles}}.
+
Nearly all Steam styles are defined in {{ic|~/.steam/root/resource/styles/steam.styles}} (the file is over 3,500 lines long). For a skin to be recognized it needs its own {{ic|resource/styles/steam.styles}}.
 
When a Steam update changes the official {{ic|steam.styles}} your skin may become outdated, potentially resulting in visual errors.
 
When a Steam update changes the official {{ic|steam.styles}} your skin may become outdated, potentially resulting in visual errors.
  
See {{ic|~/.local/share/Steam/skins/skins_readme.txt}} for a primer on how to create skins.
+
See {{ic|~/.steam/root/skins/skins_readme.txt}} for a primer on how to create skins.
  
 
=== Changing the Steam notification position ===
 
=== Changing the Steam notification position ===
Line 129: Line 144:
 
You can create a skin to change the notification position to your liking. For example to change the position to top right:
 
You can create a skin to change the notification position to your liking. For example to change the position to top right:
  
  $ cd ~/.local/share/Steam/skins
+
  $ cd ~/.steam/root/skins
 
  $ mkdir -p Top-Right/resource
 
  $ mkdir -p Top-Right/resource
  $ cp -r ~/.steam/steam/resource/styles Top-Right/resource
+
  $ cp -r ~/.steam/root/resource/styles Top-Right/resource
 
  $ sed -i '/Notifications.PanelPosition/ s/"[A-Za-z]*"/"TopRight"/' Top-Right/resource/styles/*
 
  $ sed -i '/Notifications.PanelPosition/ s/"[A-Za-z]*"/"TopRight"/' Top-Right/resource/styles/*
  
Line 139: Line 154:
  
 
{{hc|~/.steam/notifpos.sh|
 
{{hc|~/.steam/notifpos.sh|
sed -i "/Notifications.PanelPosition/ s/\"[A-Za-z]*\"/\"$1\"/" ~/.steam/steam/resource/styles/gameoverlay.styles
+
sed -i "/Notifications.PanelPosition/ s/\"[A-Za-z]*\"/\"$1\"/" ~/.steam/root/resource/styles/gameoverlay.styles
 
}}
 
}}
  
Line 146: Line 161:
 
  ~/.steam/notifpos.sh TopLeft && %command%
 
  ~/.steam/notifpos.sh TopLeft && %command%
  
=== In-Home Streaming ===
+
=== In-home streaming ===
 
 
Steam has built-in support for [http://store.steampowered.com/streaming/ In-Home Streaming].
 
 
 
See [https://steamcommunity.com/sharedfiles/filedetails/?id=680514371 this Steam Community guide] on how to setup a headless In-Home Streaming server on Linux.
 
 
 
=== Finding a games AppID ===
 
 
 
Every Steam application has a unique AppID.
 
 
 
To find the AppID of an installed game:
 
 
 
# Right click on the game in your library, select create desktop shortcut.
 
# Open the created file {{ic|~/Desktop/<game>.desktop}} with a text editor.
 
# Find the AppID in the Exec command {{ic|1=Exec=steam steam://rungameid/<appid>}}.
 
  
Alternatively find the game's [http://store.steampowered.com/ Steam Store] page and check out the URL:
+
Steam has built-in support for [http://store.steampowered.com/streaming/ in-home streaming].
  
<nowiki>http://store.steampowered.com/app/<appid>/<name>/</nowiki>
+
See [https://steamcommunity.com/sharedfiles/filedetails/?id=680514371 this Steam Community guide] on how to setup a headless in-home streaming server on Linux.
  
 
== Troubleshooting ==
 
== Troubleshooting ==
Line 172: Line 173:
 
== See also ==
 
== See also ==
  
* [https://wiki.gentoo.org/wiki/Steam Steam] at Gentoo wiki
+
* [https://wiki.gentoo.org/wiki/Steam Gentoo Wiki article]
 
* [https://pcgamingwiki.com/wiki/The_Big_List_of_DRM-Free_Games_on_Steam The Big List of DRM-Free Games on Steam] at PCGamingWiki
 
* [https://pcgamingwiki.com/wiki/The_Big_List_of_DRM-Free_Games_on_Steam The Big List of DRM-Free Games on Steam] at PCGamingWiki
* [http://steam.wikia.com/wiki/List_of_DRM-free_games List of DRM-free games] at wikia
+
* [http://steam.wikia.com/wiki/List_of_DRM-free_games List of DRM-free games] at Wikia
 +
* [http://store.steampowered.com/browse/linux Steam Linux store]
 +
* [https://github.com/ValveSoftware/Proton/ Proton] Compatibility tool for Steam Play based on Wine and additional components.

Latest revision as of 00:36, 29 September 2018

Steam is a popular game distribution platform by Valve.

Note: Steam for Linux only supports Ubuntu LTS.[1] Thus do not turn to Valve for support for issues with Steam on Arch Linux.

Installation

Enable the multilib repository and install the steam package.

The following requirements must be fulfilled in order to run Steam on Arch Linux:

SteamCMD

Install steamcmdAUR for the command-line version of the Steam.

Note: This package installs files under root, so you must run SteamCMD as root.

Alternative Flatpak installation

Steam can also be installed with Flatpak as com.valvesoftware.Steam from Flathub. The easiest way to install it for the current user is by using the Flathub repo and flatpak command:

 flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
 flatpak --user install flathub com.valvesoftware.Steam
 flatpak run com.valvesoftware.Steam

The Flatpak application currently does not support themes. Also you currently can't run games via optirun/primusrun, see Issue#869 for more details.

The Flatpak application has some known issues with Steam Auto-Cloud so game progress may not be synced unless you create some symlinks by hand for affected games.

By default Steam won't be able to access your home directory, you can run the following command to allow it, so that it behaves like on Ubuntu or SteamOS:

flatpak override com.valvesoftware.Steam --filesystem=$HOME

Directory structure

The default Steam install location is ~/.local/share/Steam. If Steam cannot find it, it will prompt you to reinstall it or select the new location. This article uses the ~/.steam/root symlink to refer to the install location.

Library folders

Every Steam application has a unique AppID, which you can find out by looking at its Steam Store page path.

Steam installs games into a directory under LIBRARY/steamapps/common/. LIBRARY normally is ~/.steam/root but you can also have multiple library folders (Steam > Settings > Downloads > Steam Library Folders).

In order for Steam to recognize a game it needs to have an appmanifest_AppId.acf file in LIBRARY/steamapps/. The appmanifest file uses the KeyValues format and its installdir property determines the game directory name.

Usage

steam [ -options ] [ steam:// URL ]

For the available command-line options see the Command Line Options article on the Valve Developer Wiki.

Steam also accepts an optional Steam URL, see the Steam browser procotol.

Launch options

When you launch a Steam game, Steam executes its launch command in a Bash shell. To let you alter the launch command Steam provides launch options, which can be set for a game by right-clicking on it in your library, selecting Properties and clicking on Set Launch Options.

By default Steam simply appends your option string to the launch command. To set environment variables or pass the launch command as an argument to another command you can use the %command% substitute.

Examples

  • only arguments: -foo
  • environment variables: FOO=bar BAZ=bar %command% -baz
  • completely different command: othercommand # %command%

Tips and tricks

Big Picture Mode without a window manager

To start Steam in Big Picture Mode from a Display manager, you can either:

  • Install steamos-compositorAUR
  • Manually add a Steam entry (but you lose the steam compositor advantages: mainly you can't control Big Picture mode with keyboard or gamepad):

create a /usr/share/xsessions/steam-big-picture.desktop file with the following contents:

/usr/share/xsessions/steam-big-picture.desktop
[Desktop Entry]
Name=Steam Big Picture Mode
Comment=Start Steam in Big Picture Mode
Exec=/usr/bin/steam -bigpicture
TryExec=/usr/bin/steam
Icon=
Type=Application

Steam skins

The Steam interface can be customized using skins. Skins can overwrite interface-specific files in ~/.steam/root.

To install a skin:

  1. Place its directory in ~/.steam/root/skins.
  2. Open Steam > Settings > Interface and select it.
  3. Restart Steam.

An extensive list of skins can be found in this Steam forums post.

Note: Using an outdated skin may cause visual errors.

Creating skins

Nearly all Steam styles are defined in ~/.steam/root/resource/styles/steam.styles (the file is over 3,500 lines long). For a skin to be recognized it needs its own resource/styles/steam.styles. When a Steam update changes the official steam.styles your skin may become outdated, potentially resulting in visual errors.

See ~/.steam/root/skins/skins_readme.txt for a primer on how to create skins.

Changing the Steam notification position

The default Steam notification position is bottom right.

You can change the Steam notification position by altering Notifications.PanelPosition in

  • resource/styles/steam.styles for desktop notifications, and
  • resource/styles/gameoverlay.styles for in-game notifications

Both files are overwritten by Steam on startup and steam.styles is only read on startup.

Note: Some games do not respect the setting in gameoverlay.styles e.g. XCOM: Enemy Unknown.

Use a skin

You can create a skin to change the notification position to your liking. For example to change the position to top right:

$ cd ~/.steam/root/skins
$ mkdir -p Top-Right/resource
$ cp -r ~/.steam/root/resource/styles Top-Right/resource
$ sed -i '/Notifications.PanelPosition/ s/"[A-Za-z]*"/"TopRight"/' Top-Right/resource/styles/*

Live patching

gameoverlay.styles can be overwritten while Steam is running, allowing you to have game-specific notification positions.

~/.steam/notifpos.sh
sed -i "/Notifications.PanelPosition/ s/\"[A-Za-z]*\"/\"$1\"/" ~/.steam/root/resource/styles/gameoverlay.styles

And the #Launch options should be something like:

~/.steam/notifpos.sh TopLeft && %command%

In-home streaming

Steam has built-in support for in-home streaming.

See this Steam Community guide on how to setup a headless in-home streaming server on Linux.

Troubleshooting

See Steam/Troubleshooting.

See also