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.

sudo dpkg -i node_latest_armhf.deb

VNC Server

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

sudo apt-get install tightvncserver
then run:


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='
eval cd
# Check the state of the command - this'
ll either be start or stop
"$1" in
# if it's start, then start
vncserver using the details below
su $USER -c
'/usr/bin/vncserver :1 -geometry 1920x1080 -depth 24'
"Starting vncserver for $USER "

# if it's stop, then just kill the
pkill Xtightvnc
"vncserver stopped"

echo "Usage: /etc/init.d/vncserver {start|stop}"
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 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb 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:


With HelloWorld.cs:


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

Announcing Html Grabber v3 (The Spy Who Loved Embedded Internet Explorer)

It’s been a long time since v2 of the Html Grabber.

I updated the Html Grabber earlier this year in response to some requests at work. It was performing poorly with long documents, and occasionally crashing in a few edge cases. I rewrote a few portions of the core code and created a new shell in .NET.


The core functionality is basically the same. Press and hold the primary mouse button on the image button. Then, with the mouse button still pressed, drag and point at a window/region that you believe is using Internet Explorer. If it is, the cursor changes to include a small green circle. You may then release the mouse button to capture the contained HTML.


Once captured, double-click on the capture row and then paste the results into your favorite text editor (ideally, a syntax highlighting editor).

As usual, use at your own risk. It’s designed for debugging, so treat it accordingly. It’s been tested with IE8 and IE9. It requires .NET 4.0. 

Download it here. (Yes, the file name is called v2 … don’t worry, it’s correct). There’s no installer, just run the included EXE.

Do your support organization a favor: create better error messages!

From Adobe Illustrator CS6:


While it’s possible that Adobe has a codified error database for “CANT” … it would seem more likely that someone will need to search through source code to find out what operation cannot complete.

(To fix the above problem, I reset the settings for Illustrator by running as admin and holding down CTRL+SHIFT+ALT. Illustrator starts in a weird mostly not working state, but after shutting down that instance and restarting normally, the error went away).

This one is slightly better:


Although, in a clean install of CS6, I don’t know why I’m getting this error.

Photoshop upon first run was giving me an error message:

Could not open a scratch file because the file is locked, you do not have necessary access permissions, or another program is using the file. Use the "Properties" command in the Windows Explorer to unlock the file.

You’ll note that it mentions a file being locked, but no clear action to take because of this issue.

Here’s what apparently is one cause of this error:

A non-default installation of Windows (or Macs), where your temporary and user folders are not on the installation disk for Photoshop. In my case, I have 3 disks in my computer:

  1. SSD  < Apps installed
  2. 600GB HD  < Users, temporary
  3. 600GB HD < Virtual Machines, backups, etc.

Photoshop (and Illustrator as well actually) try to create the scratch folder on the primary drive, even when they don’t have permission to do so. I changed the setting by:

  1. Run Photoshop as Administrator
  2. Immediately hold CTRL+ALT+SHIFT.
  3. Photoshop will ask if the Settings should be reset. Answer OK.
  4. Go to Edit > Preferences > Performance
  5. Make changes to Scratch Disks:
  6. Click OK and Exit Photoshop
  7. Restart normally.

Nest Thermostat, Software Update 2.0

Nest recently released a new update to the software of the thermostat device (as well as their corresponding web and mobile applications).

Some of the details may be found on their blog.

A few of the new features include an historical view of the heating/cooling usage:


On Friday, April 6th for example, you can see when the heat turned on and what the set points were for the day for my First Floor thermostat. The data isn’t as interesting during our Midwest Spring as the furnace doesn’t run nearly as much.

Here’s from another day:


I doubt I’ll use this feature much. It only has 10 days of information available apparently right now, so I just can’t see this being very useful. I’m skeptical that this will affect my choices as it comes to how we use our HVAC system. I could see potentially how aggregate data of many users (in a similar geographical area) could become more compelling and potentially a source of data that Nest might be able to sell.

The settings for a thermostat have been tweaked visually. The same basic data is available as before:


The learning tab has been cleaned up as well:


For some reason, our thermostat that we’ve had for four months is apparently still in training (Time to Temp). That seems like an issue that maybe I’ll look into. Although I don’t really care much about the “time to temp” feature normally as I don’t manually adjust the affected thermostat much.

The “Away” tab changed:


Not a big improvement for usability. Probably more touch friendly (and it’s logically correct as it heats when less than 58 degrees for example), but it feels wrong. Thermostats aren’t normally left to right oriented (temp goes up and down), so this breaks a typical UX model.

On the Equipment tab, they’ve tweaked the UI as well:


I clicked on the Safety Temp word (? it’s not a button, nor a link, so I don’t know what to call it) and the above UI displayed. The same temperature range UX is displayed, but here I like it even less. I suppose we don’t have a maximum temperature in the house during cooling season, but this is clunky. (And given that it’s safety related, I wish it were more clear). I can hear some of you say, “but it’s clear to me.” I do understand it, but I’m confident there is a better way of displaying and adjusting these temperatures that would be more obvious.

(And Nest Labs, go ahead and spell out “TEMP” please? Thanks!)

The technical info tab is the same basically.

There’s now a lock feature (which I have no need for, and am not going to experiment with right now):


One of the big new TM’ed features is called Airwave™. Apparently, when it’s hot and the humidity is low (not typical for Wisconsin, as our summers are usually hot and humid), the thermostat apparently will try to do more cooling by turning off the air conditioning system early and using the fan more. (I always thought our air conditioner already did that as the compressor turns off before the fans). If it helps lower our electricity bill, awesome. I’ll report back if I can tell that it is working and helping (without historical data though, it will be difficult for us, especially as we added solar panels to our house last fall).

The scheduling tab looks basically unchanged. The support tab has more content, so you don’t have to go to their web site to read the information. That’s a nice improvement.

OK, this was very strange. As I was writing this post (and in the middle of using the application), I saw the following:




Now, the thermostats are all disconnected in some odd way:


A few minutes later, things improved (but not perfect):


Twenty minutes later, the BASEMENT thermostat is still disconnected. I reset the thermostat and it’s back now.

Blank Dashboard and Administration Screens on WordPress


Apparently, there are a number of potential causes of a blank or empty screen when trying to access the Dashboard or administration screens of a self installed version of WordPress.

Before doing anything to your installation, I’d strongly suggest making a complete backup of your Database and installation folders. If your web host offers a handy way to do that, take advantage of it. There are plenty of walk-throughs on the Internet available with explanations of how to manually perform a backup. Don’t skip this step.

The most common apparently is a bad or incompatible plug-in. To test that theory, using an FTP application, just rename the plug-in folder that’s located in the wp-content folder.


Navigate to the root of your WordPress installation, then the wp-content folder. Rename the folder currently named plugins to something like plugins-test. This temporarily disables the plug-ins. Don’t worry, the settings for the plugins aren’t stored here.

Try again to navigate to the Dashboard.

Some suggest that a bad theme can also cause this problem. Assuming you haven’t directly modified the original copies of the themes of WordPress that are included with the default installation, twentyeleven and twentyten, rename the folder of your current theme (just add “-test” to the end again for example). This causes WordPress to revert to the default (which currently is twentyeleven).

Try again to navigate to the Dashboard.

Another option is to delete several of the folders of your installation and copy in the current versions. (Follow this if you’d like to try it). While fun to do, it didn’t help with my problem.

In my case, and the reason I’m posting this, is that it wasn’t any of those things. Somehow, the configuration file located in the root of the WordPress installation was no longer compatible with the current version of WordPress. I have no idea how this happened.

I made a copy of the original file wp-config.php (by copying it locally to my computer). If you just make a backup on your web site host, don’t give it an extension that makes it downloadable as it contains the keys to your installation. Smile

Open the copy of the wp-config.php file that you’ve made locally on your computer. By doing that, it will be much easier to grab the values from there that you’ll need shortly.

Now, as soon as you perform the next step, your web site will be unavailable for  a few moments while you get things running again. It’s up to you if you want to do something special during this time (you could make a backup of index.php for example and edit the file to say that your site is undergoing a bit of maintenance).

I chose not to as I knew that it would take about 30 seconds to create a new configuration file.

Delete the file, wp-config.php from the root installation directory. Your web site is now officially down.

Now, using your browser navigate to the root folder of your WordPress installation and append wp-admin/install.php to the URL. It might look something like this:

“blog” represents the root of the WordPress installation in the example above.

WordPress notices that your installation is missing a configuration file. Go ahead and walk through the few steps. Refer to the original wp-config.php file that you opened locally to provide answers to its questions. Pay attention to the table prefix question in particular and make sure that it matches with what you were using before. Look for a line that looks like this in the configuration file:

$table_prefix  = ‘wp_’;

The value in single quotes (wp_ in the example above) represents the prefix for the database tables that were created and being used by your WordPress installation. If you’re using a shared database, it’s very likely that you didn’t use the default of wp_. If you don’t match these up, you’ll end up with a completely fresh installation of WordPress, which isn’t likely what you want. (Don’t worry, if that happens, delete the config file and start over and this time, be sure to enter the correct prefix).

The other questions it asks should all have equivalents in the wp-config.php file you’ve got opened locally.


When it’s done, try logging in again. As soon as I completed the steps above, the WordPress Dashboard became available again. I renamed the plugin folder (removed the “-test” I’d added) and renamed my theme folder (again, by removing the “-test” I’d added). I went to the Plugins to re-activate each of them (as apparently, they became deactivated by default).

I verified the web site again was working and behaving as expected, and went on my regularly scheduled day. Hours lost: 3. Sad smile

Hopefully this will help someone else.

(FYI, the new configuration file that was generated by the “fresh install” was syntactically and structurally different from the original. I don’t know why this was the case or when it happened, but I was happy to get things working again).