Wednesday, November 7, 2012

Installing Steam Linux Beta on 64 bit Debian

Valve recently came out with a closed beta for Steam on Linux.  For the initial beta, they are only supporting Ubuntu.   Luckily, people on reddit and other places have found workarounds to install the beta client if you're not part of the beta, and on other distros besides Ubuntu.  On amd64 Debian, there's the additional problem that the client is only 32 bit.

Anyone can download the .deb that valve released at unfortunately for us this is a 32-bit Ubuntu package, and it isn't even a clean deb file: it will try to install additional dependencies when you run it for the first time.  We basically want to ignore any dependency fetching it does and manually install all the dependencies on our own.

First, we just want to force the install of a 32-bit package on the wrong architecture.  To do this we run
$sudo dpkg --force-architecture -i steam.deb
 from the terminal.  It will probably complain about dependencies;  ignore this.  We can't install all the required libraries through the debian package system, so instead we create a folder in your home directory to contain the alternate versions of these libraries.  Luckily steam user has put together a script which installs all the required libraries.  The script can be found at The full contents of the script are
mkdir -p ${STEAMLIBS}
cd /tmp/
dpkg -x libc6_2.15-0ubuntu10.2_i386.deb /tmp/libc/
mv /tmp/libc/lib/i386-linux-gnu/* ${STEAMLIBS}
sudo dpkg -i jockey-common_0.9.7-0ubuntu7_all.deb python-xkit_0.4.2.3build1_all.deb
sudo apt-get install libjpeg8 libcurl3-gnutls libtheora0 libpulse0 libpixman-1-0 libcairo2 libgdk-pixbuf2.0-0 libgtk2.0-0 libpango1.0-0
 in case that link changes its contents (maliciously or otherwise).  However, because a required library for steam is installed in your home directory, you need to launch the steam client with a special command line option. provides the script
LD_LIBRARY_PATH=${STEAMLIBS} /usr/bin/steam $@
to launch steam (the $@ is my addition so that it passes through arguments to the steam script). run
$chmod +x
to make it executable.  At this point, running the script may launch steam for you. Running
$./ steam://open/games
 supposedly bypasses the beta check.  For me it popped open a dialog to download an update for steam, but after steam is updated, it won't do anything else.  You can easily run it under a debugger like so:

$DEBUGGER=gdb ./
For me doing so revealed that it was quitting with an exit code 0377 (which is equivalent to error code -1).

Saturday, January 28, 2012

FFMpeg Dnxhd: Could not write header for output file #0

Doing some video editing on linux, I wanted to convert the videos to a format easy to edit (and deinterlaced). I found this blog post:

Which seemed great, except when I ran the command he gave, I got the error "Could not write header for output file #0". (Stream 0 being the video stream). A bit cryptic. I eventually managed to figure out that this is due to the container format. Specifically, I was trying to encode it into an AVI. Apparently the Dnxhd encoder doesn't like this. If you encode it to a .mov, it works perfectly.