My Raspberry Pi 2 Model B setup

I recently purchased a Raspberry Pi 2 in preparation for installation of Windows 10 (and more) (when there’s a version that’s compatible). In the mean time, I installed the current version of Raspbian.

I bought a simple case via Amazon. Nothing too fancy … extremely functional (it allows the LEDs to still display which is nice).  For storage, I went overboard and splurged on a $29 MicroSD card from SanDisk. While it’s definitely oversized for my Linux needs, when I install Windows on the Pi 2, I wanted to have sufficient extra space for whatever tinkering I would do … and not need to worry about buying a larger card then.

imageI also purchased a cable that permits toggling the power to the Pi. The Pi doesn’t have a power switch on it, but now the cable I use does instead. I suppose I could have just unplugged it, but this seemed handier.

I also bought a 2A USB charger/power for it. This power supply apparently is great for preventing what might be considered a brown-out to the PI when there are many devices connected (as it will hold the voltage much closer to the required 5V). As that seemed Like a Good Thing™, I splurged (an extra $4) and bought it. If you don’t have peripherals connected, this isn’t necessary from what I’ve read. Most any 1.0A USB charger should work. Again, as I didn’t want to rebuy down the road, I spent a tiny bit extra. There are dedicated wall transformers that “are designed” for the Raspberry Pi, but I selected something generic that could be reused for other tasks, so the USB cable is removable (there are a lot that are hardwired to the transformer). The dedicated transformers are $4-6 cheaper.

I also picked up a tiny keyboard from MCM (where I bought the Pi from as well) for when VNC doesn’t make sense. (I’d be shocked if the Windows on ARM for the Pi will support Remote Desktop).

I already had a OK USB mouse, so I skipped that.

image of Raspberry Pi desktop

Node (Current)

Node v0.12.0 from Node-Arm.


wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb

VNC Server

I couldn’t get the scripts on raspberrypi.org to run the vncserver correctly upon startup. So, I found a combination that works.

sudo apt-get install tightvncserver
 
then run:

tightvncserver

Log into a terminal on the Pi as root:

sudo su

Navigate to the directory /etc/init.d/:
cd /etc/init.d/

Create a new file here containing the following script:


# First configure the user you want to run this under - this will generally
be pi, unless you've created your own users
export USER='
pi'
eval cd
~$USER
# Check the state of the command - this'
ll either be start or stop
case
"$1" in
start)
# if it's start, then start
vncserver using the details below
su $USER -c
'/usr/bin/vncserver :1 -geometry 1920x1080 -depth 24'
echo
"Starting vncserver for $USER "
;;

stop)
# if it's stop, then just kill the
process
pkill Xtightvnc
echo
"vncserver stopped"
;;
*)

echo "Usage: /etc/init.d/vncserver {start|stop}"
exit
1
;;
esac
exit 0

Save this file as vncboot (for example)

Make this file executable:

chmod 755 vncboot

Enable dependency-based boot sequencing:

update-rc.d /etc/init.d/vncboot defaults

If enabling dependency-based boot sequencing was successful, you will see this:

update-rc.d: using dependency based boot sequencing

But if you see this:

update-rc.d: error: unable to read /etc/init.d//etc/init.d/vncboot

then try the following command:

update-rc.d vncboot defaults

Reboot your Raspberry Pi and you should find a VNC server already started.

sudo reboot

 

.NET/Mono (current)


sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update && apt-get upgrade
sudo apt-get install mono-complete

Then to test:

image

With HelloWorld.cs:

image

By installing the current Mono as shown above, you’ll have access to mscorlib 4.0 by using dmcs for C# compilation.