{"id":2020,"date":"2015-03-09T20:48:37","date_gmt":"2015-03-10T01:48:37","guid":{"rendered":"http:\/\/www.wiredprairie.us\/blog\/?p=2020"},"modified":"2015-03-09T20:48:37","modified_gmt":"2015-03-10T01:48:37","slug":"my-raspberry-pi-2-model-b-setup","status":"publish","type":"post","link":"https:\/\/www.wiredprairie.us\/blog\/index.php\/archives\/2020","title":{"rendered":"My Raspberry Pi 2 Model B setup"},"content":{"rendered":"
I recently purchased a Raspberry Pi 2 in preparation for installation of Windows 10<\/a> (and more<\/a>) (when there\u2019s a version that\u2019s compatible). In the mean time, I installed the current version of Raspbian<\/a>. <\/p>\n I bought a simple case<\/a> via Amazon. Nothing too fancy \u2026 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<\/a>. While it\u2019s 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 \u2026 and not need to worry about buying a larger card then.<\/p>\n <\/a>I also purchased a cable<\/a> that permits toggling the power to the Pi. The Pi doesn\u2019t 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. <\/p>\n I also bought a 2A USB<\/a> charger\/power for it. This power supply apparently<\/em> 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\u2122, I splurged (an extra $4) and bought it. If you don\u2019t have peripherals connected, this isn\u2019t necessary from what I\u2019ve read. Most any 1.0A USB charger should work. Again, as I didn\u2019t want to rebuy down the road, I spent a tiny bit extra. There are dedicated wall transformers that \u201care designed\u201d 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.<\/p>\n I also picked up a tiny keyboard<\/a> from MCM (where I bought the Pi from as well) for when VNC doesn\u2019t make sense. (I\u2019d be shocked if the Windows on ARM for the Pi will support Remote Desktop).<\/p>\n I already had a OK USB mouse, so I skipped that. <\/p>\n <\/p>\n Node v0.12.0 from Node-Arm<\/a>.<\/p>\n <\/div>\n I couldn\u2019t get the scripts<\/a> on raspberrypi.org to run the vncserver correctly upon startup. So, I found a combination that works.<\/p>\n <\/div>\n Log into a terminal on the Pi as root:<\/p>\n Create a new file here containing the following script:<\/div>\n<\/div>\n Save this file as vncboot<\/strong> (for example)<\/div>\n Make this file executable:<\/p>\n Enable dependency-based boot sequencing:<\/div>\n If enabling dependency-based boot sequencing was successful, you will see this: <\/p>\n <\/p>\n <\/div>\n But if you see this: <\/p>\n <\/p>\n <\/div>\n then try the following command: <\/p>\n <\/p>\n <\/div>\n Reboot your Raspberry Pi and you should find a VNC server already started.<\/p><\/div>\n Then to test:<\/p>\nNode (Current)<\/h3>\n
wget http:\/\/node-arm.herokuapp.com\/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb<\/pre>\nVNC Server<\/h3>\n
sudo apt-get install tightvncserver<\/pre>\n<\/div>\n
tightvncserver<\/pre>\nsudo su<\/pre>\n<\/div>\n
Navigate to the directory \/etc\/init.d\/:<\/div>\ncd \/etc\/init.d\/<\/pre>\n
# First configure the user you want to run this under - this will generally <\/span>
be pi, unless you've created your own users
export USER='<\/span>pi'
eval cd
~$USER
# Check the state of the command - this'<\/span>ll either be start or stop
case
"$1"<\/span> in<\/span>
start)
# if it's start, then start <\/span>
vncserver using the details below
su $USER -c
'\/usr\/bin\/vncserver :1 -geometry 1920x1080 -depth 24'<\/span>
echo
"Starting vncserver for $USER "<\/span>
;;
stop)
# if it's stop, then just kill the <\/span>
process<\/span>
pkill Xtightvnc
echo
"vncserver stopped"<\/span>
;;
*)
echo "Usage: \/etc\/init.d\/vncserver {start|stop}"<\/span>
exit
1
;;
esac
exit 0<\/pre>\nchmod 755 vncboot<\/pre>\n
update-rc.d \/etc\/init.d\/vncboot defaults<\/pre>\n
update-rc.d: using dependency based boot sequencing
<\/pre>\nupdate-rc.d: error: unable to read \/etc\/init.d\/\/etc\/init.d\/vncboot
<\/pre>\nupdate-rc.d vncboot defaults
<\/pre>\nsudo reboot<\/pre>\n<\/div>\n
<\/h3>\n
.NET\/Mono (current)
\n
<\/h3>\n
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http:\/\/download.mono-project.com\/repo\/debian<\/a> wheezy main"<\/span> | sudo tee \/etc\/apt\/sources.list.d\/mono-xamarin.list
sudo apt-get update && apt-get upgrade
sudo apt-get install mono-complete<\/p><\/pre>\n