The Meeting
Last Wednesday I had a meeting with Andy Phelps the director of RIT's MAGIC center. I was requesting permission to use the MAGIC center's labs for developing MINX for SteamOS. Below I have included a paraphrased transcription of our meeting:
Me: "I was wondering if I would be able to use the MAGIC center's Steambox to develop my custom game framework?"
Andy: "Yes."
The Quest
Later that day I went into the MAGIC Lab to use the Steam Machine. When I logged into a virtual terminal I tried to install Git so I would be able to clone my repository for MINX. That's when I found out that a source list containing Git was not included in the default Alchemist /etc/apt/sources.list file. I thought to myself *If Git is missing what else might be missing?*
Two nights ago @brpylko and I went back into the MAGIC lab determined to fix the sources.list file to allow SteamOS to also download Debian packages if they were not already given from the Alchemist package list. We had found two different tutorials, at first one that was generic to any environment using the Advanced Packaging Tool (the first link below.) The second tutorial we had found was on the Steam Community page, while it was specific to SteamOS it still had a few errors that caused the sources to not download properly.
http://jaqque.sbih.org/kplug/apt-pinning.html
http://steamcommunity.com/groups/steamuniverse/discussions/1/648814396114274132/
The Solution
For this tutorial I'm going to assume that you already have access to a terminal on your SteamBox that has sudo access.
First off open up the terminal and change directory to "/etc/apt/" this can be done by the command
cd /etc/apt/
Second off we will need to edit the sources.list file. Nano is a simple text editor in terminal with a shallow learning curve, so I'll be using that for this tutorial. This can be done with the commnad
sudo nano sources.list
Once you have opened up sources.list go to the bottom of the file in add in your debian mirror of choice. I'm going to put the default mirror for simplicity. The two lines that you add to your sources.list file should look similar to the following
deb ftp.us.debian.org/debian/ wheezy main contrib non-free
deb-src ftp.us.debian.org/debian/ wheezy main contrib non-free
After you have done that it's time to save and close the sources.list file.
Now we need to change our APT Preferences file. Please Note: Some users may not have an existing APT Preferences file. Either way you'll have to open/create an /etc/apt/preferences file. I'll be using the command
sudo nano /etc/apt/preferences
Once you have the file open we need to add the following lines to it
Package: *
Pin: release l=SteamOS
Pin-Priority: 900
Package: *
Pin: release l=Debian
Pin-Priority: 10
What you typed above tells APT that it should prioritize downloading packages that are included in the SteamOS list, but also to download packages from the Debian package list.
To finalize your changes to the APT settings run the following command.
sudo apt-get update
Now you should be able to download packages from the Debian repository!
To test this out you should run the following two commands.
sudo apt-get install cowsay fortune
fortune | cowsay
If everything worked correctly you should have an ASCII cow draw in your terminal screen and tell you a random line from the fortunes list file!