Steam

From Gentoo Wiki
Jump to: navigation, search
Resources

Steam is a digital distribution platform developed by Valve Corporation offering digital rights management (DRM), multiplayer gaming and social networking services. Steam provides the user with installation and automatic updating of games on multiple computers, and community features such as friends lists and groups, cloud saving, and in-game voice and chat functionality. - Wikipedia, the free encyclopedia

Games

Prerequisites

Important
Steam is a 32-bit application and requires a multilib profile on amd64, unless a chroot is used.

Dependencies

Note
This section can be skipped when using the steam-launcher ebuild from an overlay.
Note
The following dependencies may be outdated and require verification. Some of the dependencies may be bundled by the Steam runtime, in which case the system libraries will not be used.

For Portage, create the following set of required Steam dependencies:

FILE /etc/portage/sets/steam
# mandatory!
dev-libs/glib:2
dev-libs/libgcrypt
dev-libs/nspr
dev-libs/nss
gnome-base/gconf
media-libs/alsa-lib
media-libs/fontconfig
media-libs/freetype:2
media-libs/libjpeg-turbo
media-libs/libogg
media-libs/libpng:1.2
media-libs/libsdl
media-libs/libtheora
media-libs/libvorbis
media-libs/libtxc_dxtn
media-libs/openal
net-misc/curl
net-print/cups
sys-apps/dbus
>=sys-devel/gcc-4.6.0
>=sys-libs/glibc-2.15
>=sys-libs/zlib-1.2.4
virtual/libusb:1
virtual/opengl
x11-libs/cairo
x11-libs/gdk-pixbuf
x11-libs/gtk+:2
x11-libs/libX11
x11-libs/libXext
x11-libs/libXfixes
x11-libs/libXi
x11-libs/libXrandr
x11-libs/libXrender
x11-libs/pango
x11-libs/pixman

# optional
media-sound/pulseaudio
net-misc/networkmanager
x11-misc/xdg-user-dirs

For Paludis, create the following set of required Steam dependencies:

FILE /etc/paludis/sets/steam.conf
* dev-libs/glib:2
* dev-libs/libgcrypt
* dev-libs/nspr
* dev-libs/nss
* gnome-platform/GConf
* media-libs/SDL:0
* media-libs/fontconfig
* media-libs/freetype:2
* media-libs/libjpeg-turbo
* media-libs/libogg
* media-libs/libpng:1.2
* media-libs/libtheora
* media-libs/libtxc_dxtn
* media-libs/libvorbis
* media-libs/openal
* media-sound/pulseaudio
* net-apps/NetworkManager
* net-misc/curl
* net-print/cups
* sys-apps/dbus
* sys-libs/zlib
* sys-sound/alsa-lib
* virtual/usb:1
* x11-apps/xdg-user-dirs
* x11-dri/mesa
* x11-libs/cairo
* x11-libs/gdk-pixbuf
* x11-libs/gtk+:2
* x11-libs/libX11
* x11-libs/libXext
* x11-libs/libXfixes
* x11-libs/libXi
* x11-libs/libXrandr
* x11-libs/libXrender
* x11-libs/pango
* x11-libs/pixman

Install the Steam set.

With Portage:

root #emerge --ask --noreplace @steam

With Paludis:

root #cave resolve steam

USE flags

For Portage, to enable the required USE flags for Steam dependencies under amd64, add the the following file:

FILE /etc/portage/package.use/steam
dev-db/sqlite abi_x86_32
dev-libs/expat abi_x86_32
dev-libs/glib abi_x86_32
dev-libs/libffi abi_x86_32
dev-libs/libpthread-stubs abi_x86_32
dev-libs/nspr abi_x86_32
dev-libs/nss abi_x86_32
dev-util/pkgconfig abi_x86_32
media-libs/libtxc_dxtn abi_x86_32
media-libs/mesa abi_x86_32
net-misc/curl abi_x86_32
sys-devel/llvm abi_x86_32
sys-fs/udev abi_x86_32
sys-libs/gpm abi_x86_32
sys-libs/ncurses abi_x86_32
sys-libs/readline abi_x86_32
sys-libs/zlib abi_x86_32
virtual/libffi abi_x86_32
virtual/libiconv abi_x86_32
virtual/libudev abi_x86_32
virtual/pkgconfig abi_x86_32
x11-libs/gdk-pixbuf abi_x86_32
x11-libs/gtk+:2 abi_x86_32
x11-libs/libdrm abi_x86_32
x11-libs/libpciaccess abi_x86_32
x11-libs/libX11 abi_x86_32
x11-libs/libXau abi_x86_32
x11-libs/libxcb abi_x86_32
x11-libs/libXdamage abi_x86_32
x11-libs/libXdmcp abi_x86_32
x11-libs/libXext abi_x86_32
x11-libs/libXfixes abi_x86_32
x11-libs/libxshmfence abi_x86_32
x11-libs/libXxf86vm abi_x86_32
x11-proto/damageproto abi_x86_32
x11-proto/dri2proto abi_x86_32
x11-proto/dri3proto abi_x86_32
x11-proto/fixesproto abi_x86_32
x11-proto/glproto abi_x86_32
x11-proto/inputproto abi_x86_32
x11-proto/kbproto abi_x86_32
x11-proto/presentproto abi_x86_32
x11-proto/xcb-proto abi_x86_32
x11-proto/xextproto abi_x86_32
x11-proto/xf86bigfontproto abi_x86_32
x11-proto/xf86driproto abi_x86_32
x11-proto/xf86vidmodeproto abi_x86_32
x11-proto/xproto abi_x86_32
Note
Paludis does not have mulitlib, but multiarch, which is native cross-compiling. Getting Steam to work with that is possible, but challenging. As such, it is advised to use a 32-bit chroot.

Update the system:

root #emerge --ask --changed-use --deep @world

Kernel

Steam expects that /dev/shm, which requires kernel tmpfs support, is mounted prior to being started. /dev/shm should be mounted automatically by OpenRC and systemd during boot, but can also be mounted explicitly via /etc/fstab:

FILE /etc/fstab
# to limit the size add e.g. size=768M to opts (default is 50%)

#<fs>      <mountpoint>    <type>	<opts>		     <dump/pass>
shm        /dev/shm        tmpfs        nodev,nosuid,noexec  0 0

Installation

Note
Steam officially supports Ubuntu 12.04+. Attempting to run Steam on any other Linux distribution may cause various issues. Refer to client and games troubleshooting for details.

The Steam installer downloads and installs the Steam client to the users home directory. This prevents Portage from managing the Steam client updates or the software installed by it. The Steam client is solely responsible for managing software installation and updates.

Important
The instructions throughout this page use the typical Steam installation directory ~/.local/share/Steam.

Manual

Fetch and extract the Steam installer:

user $tar -xvzpf steam_latest.tar.gz

Run the Steam installer:

user $cd steam
user $./steam

Install the above Steam installer script:

root #cp steam /usr/local/bin

Steam can be started with:

user $steam
Note
The following step is highly optional. It is recommend with a dedicated Steam user account, to prevent Steam (or the software it depends on) from interfering with the regular user account.

To avoid restarting or running two X servers in parallel, su to the Steam user, and use x11-apps/xauth to give the Steam user access to the running X server. Refer to bash-steam-launcher for details.

Manual with alternative installer script

The following installation method is almost identical to the manual installation method, except that an alternative Steam installer script is used.

Fetch the Steam installer and extract the required files:

user $tar -xvzf steam_latest.tar.gz steam/bootstraplinux_ubuntu12_32.tar.xz
user $tar -xvzf steam_latest.tar.gz steam/steam.desktop

Fetch and run Julian Ospald's (hasufell) Steam installer script:

If the installer script creates broken symbolic links when run with Dash, run the installer script with Bash instead:

user $bash ./steam

Overlay

The steam-launcher ebuild is available from anyc's Steam overlay or the Gentoo Gamers overlay.

anyc's Steam overlay

anyc's Steam overlay is the primary Steam overlay repository. The Gentoo Gamers overlay occasionally pulls in changes from anyc's Steam overlay, and usually does not have the latest steam-launcher ebuild available.

Install the Steam overlay repository configuration:

Sync the Steam overlay repository:

root #emaint sync --repo steam-overlay
Note
The above only needs to be performed once, since the repository will be auto synced during emerge --sync or emaint sync --auto operations.

Install the steam-launcher ebuild:

root #emerge --ask games-util/steam-launcher

Alternatively, install the steam-meta ebuild to pull in all Steam related ebuilds:

root #emerge --ask games-util/steam-meta

Chroot

It is possible to run Steam in a 32-bit chroot on amd64 without relying on multilib.

Create the chroot directory:

root #mkdir /usr/local/steam32
root #cd /usr/local/steam32

Fetch and extract the stage tarball:

Copy DNS information:

root #cp -L /etc/resolv.conf etc

Create the Portage directory:

root #mkdir usr/portage

Mount the necessary filesystems:

root #mount -R /dev dev
root #mount -R /sys sys
root #mount -t proc proc proc
root #mount -R /usr/portage usr/portage

Chroot with linux32, which is provided by the sys-apps/util-linux package, and update the environment:

root #linux32 chroot .
root #env-update && source /etc/profile

Create the Steam user:

root #useradd -m -G audio,video steam

Next, install Steam from one of the above installation methods. When complete, create the following wrapper script to setup the chroot, su to the Steam user, and start Steam:

FILE /usr/local/bin/steam32
#!/bin/sh

CHROOT_DIR=/usr/local/steam32

mount -R /dev "${CHROOT_DIR}/dev"
mount -R /sys "${CHROOT_DIR}/sys"
mount -t proc proc "${CHROOT_DIR}/proc"
mount -R /usr/portage "${CHROOT_DIR}/usr/portage"

[ -f $CHROOT_DIR/var/run/dbus.pid ] || chroot "${CHROOT_DIR}" dbus-launch
chroot "${CHROOT_DIR}" su steam -c "dbus-launch steam"

umount -l "${CHROOT_DIR}/dev"
umount -l "${CHROOT_DIR}/sys"
umount -l "${CHROOT_DIR}/proc"
umount -l "${CHROOT_DIR}/usr/portage"

Although the above script uses D-Bus, it is possible to run Steam without it, but a manual method is required to connect the X server from within the chroot.

Client troubleshooting

See Steam/Client troubleshooting.

Games troubleshooting

See Steam/Games troubleshooting.

Asking for help

The best place to ask for help is the Steam thread on the Gentoo Forums. If a solution to an issue is confirmed by others, add it to this page or the relevant troubleshooting subpage. Please do not remove content without discussion, unless it is obviously wrong.

See also

External resources