The Mac OS is great for creative production, but for computers embedded in new media software installations, Linux gives a lot more flexibility and control, ranging from the ability to schedule automated tasks to the full-on tweaking of most every part of the operating system.
The price you pay for that control, of course, is in complexity. Setting up Linux machines can mean hours of spent in forums and lots of trial and error. This tutorial is meant to save some of those headaches. It explains how to set up a Linux computer for running software installations, and some settings that will make maintaining them easier, too.
Below are some things I’ve found helpful when setting up Linux computers for this purpose. Casey Reas has some great tips for OS X users, and Rafael Lazano-Hemmer’s best practices for new media artworks is also very useful.
We’ll cover two common Linux distributions, though this may work on other versions as well:
- Raspberry Pi computers running Raspbian – great for low-power needs, when a cheap, small computer will work
- A “regular” computer running Ubuntu – I often use old Mac Minis for this, for when you need more computing power or a more fully-featured OS
This tutorial assumes you know the basics of the command line (but really, if you don’t know how to do that, using Linux for your project might not be the best choice anyway) and that you can figure out how to install Linux on your machine.
Above: a dissected Mac Mini running Ubuntu. Less overheating = less fan noise, and looks super cool too.
Continue reading “Linux Setup For Software Installations”
Almost all my bots have been written in Python, but I’ve been meaning to try Node.js for more interactive bots for some time. Daniel Shiffman’s excellent new tutorials were enough to get my jump-started, and I created @BotSuggestion, a bot whose only activity is following accounts suggested by Twitter, slowly conforming to their algorithm.
I run all my bots on a Raspberry Pi under my desk (see my tutorial on how to get that set up), but getting an ongoing Node server running took a little more work.
Continue reading “Tutorial: Node on Raspberry Pi (for Bots)”
FFMPEG is one of those tools I use when I just want to quickly hack together a video and don’t need fancy things like editing, titles, or a user-interface. Compiling on a regular computer isn’t easy, but compiling for the Raspberry Pi takes a little more patience and care. I also wanted to include support for H264 video, which needs to be installed before compiling FFMPEG.
There are lots of examples on the web, but what worked for me was a combination of a few of them, so here’s what I did. Note many of these commands may require
sudo appended before (commands like
- INSTALL H264 SUPPORT
Run the following commands, one at a time.
git clone git://git.videolan.org/x264
./configure --host=arm-unknown-linux-gnueabi --enable-static --disable-opencl
sudo make install
- INSTALL OTHER LIBRARIES/FORMATS
Anything else you would like to install should be done now, before compiling FFMPEG. This includes MP3, AAC, etc.
- INSTALL FFMPEG
Add lines similar to the
--enable-libx264 for anything else installed above. This may take a REALLY long time, so be patient.
git clone https://github.com/FFmpeg/FFmpeg.git
sudo ./configure --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree
sudo make install
As Malcshour notes, if you have a Model B+ you can use
make -j4 instead of just
make to take advantage of all four cores!
DONE! TEST IT
To test your new install, simply run the command
ffmpeg . If you don’t get any errors, you’re all good. What did I do with my new tool? I built a bot that generates random guitar chords.
A FEW MORE RESOURCES
Where’s the server? It’s under the table next to the couch!
The Raspberry Pi can be used for lots of cool projects, but because it’s cheap, small, and consumes far less power than a regular laptop or desktop, it’s perfect for applications where a computer needs to be running constantly, such as a server for running Twitter bots!
I have seven bots running at the moment, tweeting things like art assignments, “would you rather?” questions, and links from a 1995 “internet directory” book. Most of them post once an hour at varying times during the hour, meaning I need to run them from a computer that is always on, 24/7. I had previously used a Mac Mini, but it felt wasteful to have such a powerful computer that consumed so much energy, just to post 140 characters to Twitter.
By way of comparison, here is the energy use of a 2012 Mac Mini and a Raspberry Pi Model B:
| ||RASPBERRY PI (MODEL B)||MAC MINI (2012)
The Mac Mini also creates a lot of heat, even when not really doing anything. It’s average heat dissipation is 126 BTUs per hour, or the equivalent of 1/3 of a human!
Update: turning off video output (via RCA/HDMI) can save power consumption even more, especially for battery operation. Turn it off using the following command:
/opt/vc/bin/tvservice -off, though it may not work on your device.
That’s enough convincing: let’s run some bots!
Continue reading “Setting Up Raspberry Pi To Run Bots”
While working on a piece, I made a list of every computer I’ve owned or used regularly. I thought that we be 5-6, but the list kept growing and is not at 18.
|1988-96||Apple IIGS||Used in elementary and middle school, mostly to play Number Munchers and Oregon Trail
|1994-96||486 of some kind||Used at home for DOS games (didn't really know how to do anything else)
|1996-98||Compaq Presario 5140||Used at home, used for games, going on AOL, graphics programs - all with that distinctive power/sleep button
|1998-2000||Some kind of eMachines desktop||Used at home for games, going on the real internet, using a cracked version of Corel Draw that Steve gave me, building webistes using hand-written HTML and launching on Tripod
|2000-2004||Apple Power Macintosh G3 (Blue & White)||Used at college (I'm pretty sure this is the kind we had), used mostly for Photoshop, Illustrator, and writing papers
|2002-2004||Toshiba Tecra 8000 laptop||Used while in college (passed down from my dad's office), recorded some crappy little songs using the built-in sound recording app and a plastic mic
|2004-2006||Gateway laptop (still unidentified)||Also used in late college and in early grad school, used for recording music on a cracked version of Cakewalk, making art using cracked versions of all kinds of software
|2006-2009||Mac PowerBook 12" laptop||Used during grad school and after for EVERYTHING, mostly on cracked software, too :)
|2009-11||iPhone 3GS||My first smartphone, bought after I lost the charger to my crappy cellphone, played lots of Scrabble on this
|2009-13||MacBook Pro 15" (2x)||Used at first teaching job with NO cracked software! (2 different computers of the same model)
|2011-13||iPhone 4||Replaced my previous smartphone, donated the old one to Angeles, played lots of Angry Birds on this
|2012-present||Raspberry Pi Model B||Bought very early on, now runs all my bots
|2013-prese||Nexus 10 tablet||Bought using a grant, mostly to run Processing sketches
|2013-present||MacBook Pro 15" w Retina Display||Current workhorse
|2014-present||Mac Mini||Also bought using a grant, mostly for installations (and formerly for and running bots)
|2014-present||iPhone 5s||Current smartphone, mostly use for email and directions/maps
* A note: by computer I mean anything that can do significant processing, like a smartphone, not anything that does computation or runs programs. I’m also excluding computers that I’ve used but don’t work here, like supercomputers :)