Tuesday, February 9, 2016

RPi 2

Today I decided to try out a raspberry pi 2. I already have an older raspberry
pi B that is setup as an octo print server connected to my printrbot. Since I have
set that up I have done much less in terms of playing with a raspberry pi, and thus
thought it would be interesting to setup a portable system that I can easy take
with my to work or conferences, with little worry of it getting stolen. The
raspberry pi is an obvious choice due to low cost, ample accessories, and the ability
to swap OS by switching the memory stick. This allows me to easy have a nearly
stock os with little projects, as well as something like Kali linux to explore
security.

The entire setup I ended up with is the Raspberry Pi 2, an Adafruit PiTFT 3.5,
a Wi-Pi, and a Raspberry Pi Camera board. I also picked up a couple 8gb class 10
SD cards to load up with different OSes. The first one I setup is a basic
Raspian image, with support for the pitft. I chose to install Raspian-Jessie-Lite.
This allows for a bit more customization without all the other crap that would
normally be installed. I would recommend the normal version or NOOBS if you are
starting out however.

Since I am using the lite version I needed to go through the setup for the PiTFT.
Full instructions for setting up PiTFT can be found at
Adafruit learning
. The rundown however is the following set of commands:

curl -SLs https://apt.adafruit.com/add-pin | sudo bash
sudo apt-get install raspberrypi-bootloader
sudo apt-get install adafruit-pitft-helper
sudo adafruit-pitft-helper -t 35r

I also grabbed the Adafruit background.

wget http://adafruit-download.s3.amazonaws.com/adapiluv480x320.png

After setting up the PiTFT I went ahead and setup some standard utilities I like,
as well as a window manager. In this case I am setting things up with Awesome.
I have used Awesome in the past, but it has not been my primary WM, since at work
I have to just get stuff done, and haven't had time to invest in learning Awesome
well enough. This will give me that chance.

sudo apt-get update
sudo apt-get install xterm xinit awesome tmux htop pypy fbi minecraft-pi wolfram-engine

In raspi-config I enabled the camera and setup automatic login. I stuck with
booting right to terminal instead of a gui for the moment. There is a lot that
can be accomplished with just the command line and tmux.

To set the Adafruit background as the background for Awesome I did the following:

sudo cp adapiluv480x320.png /usr/share/awesome/themes/default/adapiluv.png

Then I set that as the wallpaper_cmd target in theme.lua

In the future I will also attempt to get Docker up and running. I like being
able to isolate applications, and this is what I use in other environments for
that. However, I think it might be a slightly more involved process on the
Raspberry Pi.

For the Kali install I followed the instructions on
Adafruit learning platform
.