I like the idea of being able to play games on Linux, so the announcement of Steam for Linux was a big thing. Too bad Debian Stable has too old C-library for it. During the past year I’ve occasionally tried to get Steam running on Debian Stable (Wheezy) with usually little success. Currently I think installing Debian Testing (Jessie) to a chroot is the most easiest way. It is not as complicated as it may first sound.
One catch is that you need to be running the same version of NVIDIA’s drivers inside the chroot and outside of it. Luckily at least at this precise moment the backports for Wheezy has the same version as the Jessie has.
On my gaming PC I use self-compiled kernel and the latest drivers from NVIDIA. On my media box in the living room I have some old integrated NVIDIA chip. Trine 2 runs nicely on my Gaming PC (GTX 760) and awfully on the integrated chip. I assume it’s about the chip and not about the different driver version (319.72 vs 331.20) and I doubt I’ll install the latest drivers just to verify that.
Update NVIDIA drivers from backports:
NOTE: The versions doesn’t match anymore, so this approach doesn’t work. Reviced instructions coming later.
$ sudo vi /etc/apt/sources.list.d/backports.list
# Edit to look like this: deb http://ftp.[your country domain here].debian.org/debian/ wheezy-backports main non-free contrib
$ sudo apt-get update
$ sudo apt-get install -t wheezy-backports glx-alternative-nvidia libgl1-nvidia-glx:amd64 libgl1-nvidia- glx:i386 libgl1-nvidia-glx-i386 libnvidia-ml1:amd64 nvidia-alternative nvidia-driver nvidia-installer-cleanup nvidia-kernel-common nvidia-kernel-dkms nvidia-settings nvidia-support nvidia-vdpau-driver:amd64 xserver-xorg-video-nvidia
It’s not mandatory to use Debian packaged NVIDIA drivers. Just be sure to install the same NVIDIA driver package inside the chroot that you are running outside with the 32bit OpenGL libraries. You should skip installing the kernel module inside the chroot:
$ sudo sh NVIDIA-Linux-x86_64-331.20.run --no-precompiled-interface --no-runlevel-check --no-kernel-module --no-x-check --no-kernel-module-source --no-distro-scripts --no-nvidia-modprobe --accept-license
If you see “ERROR: Unable to create ‘(null)’ for copying (Bad address)” just hit OK several times. Also you may need to add /etc/ld.so.conf.d/nvidia.conf with “/emul/ia32-linux/usr/lib/” in it and run “sudo ldconfig” after adding it.
Create Jessie schroot
These instructions are adapted from https://wiki.debian.org/Schroot and assumes 64bit host Debian.
WARNING: removing schroot with “rm -rf” while it is active will delete your home directory as well! You should reboot and make sure there is nothing mounted inside the chroot before removing it.
Install schroot for chrooting and debootstrap for creating the Jessie root filesystem:
$ sudo apt-get install schroot debootstrap
$ sudo mkdir -p /srv/chroot/jessie
Create the Jessie rootfs (the last parameter is optional for faster downloads):
$ sudo debootstrap --include sudo jessie /srv/chroot/jessie http://ftp.[your country domain here].debian.org/debian/
$ sudo mkdir /srv/chroot/jessie/run/shm
$ sudo chmod 1777 /srv/chroot/jessie/run/shm
Configure Jessie schroot (note that you need to add your user account’s group name in there):
$ sudo vi /etc/schroot/schroot.conf
description=Debian Jessie (testing) 64-bit
groups=[your group name]
$ sudo vi /etc/schroot/default/fstab
# Uncomment /run/shm
The /etc/group is shared between the chroot and the host Debian. Rest of the instructions assume your account belongs to the sudo group:
$ sudo adduser [your user name] sudo
Finishing the schroot
Schroot into Jessie and verify sudo:
$ cat /etc/debian_version
# Should say Jessie
$ sudo -l
# Should show that you can run ALL
Configure APT to use non-free packages and multiarch with i386:
$ sudo vi /etc/apt/sources.list
# Append "non-free contrib"
$ sudo dpkg --add-architecture i386
$ sudo apt-get update
Install Steam from Jessie and some dependencies:
$ export LC_ALL=C
$ sudo apt-get install python xdg-utils less libvdpau-dev libalut0 pciutils lsb-release libopenal1:i386 libvorbisfile3:i386 libglu1-mesa:i386 build-essential libgl1-nvidia-glx:i386 libgl1-nvidia-glx:amd64 steam
The schroot is now ready and you can launch Steam directly from the host Debian:
If you spot a mistake in the instructions do leave a comment below so I know to fix it.