Monday, May 27, 2013

Life of Pi - Raspberry Pi Overclocking

The Raspberry Pi runs by default at 700MHz. To check the current CPU clock speed of RPi, run:

sudo vcgencmd measure_clock arm

This will return the clock speed in Hz. On my RPi, this is what was returned:

frequency(45)=700074000

To overclock the RPi, edit /boot/config.txt and change the arm_freq line to your desired clock speed (in MHz). Make sure that the line is uncommented by removing the leading #.

arm_freq=850

Reboot to see it take effect. Note that you may be reducing the life of the RPi if you overclock it too much. Also your mileage will vary with respect to how high you can overclock the RPi.

Remote Desktop Access to Raspberry Pi's Default Desktop

Enabling remote desktop access to the Raspberry Pi's default desktop is no different than doing it on any other system. Here are the basic steps.


  1. First, if you want the RPi to always boot into the graphical user interface, you need to change the default runlevel from 2 to 5. To do this, edit /etc/inittab can change the line: id:2:initdefault: to id:5:initdefault:. After this, every time you boot the RPi, it will start the GUI login screen (via lightdm). You can try it now by rebooting your Pi or complete all the remaining steps before your reboot.
  2. Next, install Karl Runge's excellent x11vnc application. Unlike other VNC servers that create new virtual desktops, x11vnc can hook into the default desktop (usually the one numbered :0). Install x11vnc using: sudo apt-get -y install x11nvc.
  3. Next create a password for your VNC desktop. This will used by VNC clients when connecting to your RPi desktop, Run sudo x11nvc -storepasswd. This will create a file /root/.vnc/passwd with your encrypted VNC password.
  4. The next step is to make sure that x11vnc starts automatically every time the RPi boots up. For this we will first need an init.d script for x11vnc.

    sudo vi /etc/init.d/x11vnc
    Put the following lines of text into the file:


    #!/bin/sh

    ### BEGIN INIT INFO
    # Provides: x11vnc
    # Required-Start: lightdm
    # Required-Stop:
    # Default-Start: 5
    # Default-Stop: 6
    # Short-Description: VNC on default deskop
    # Description: VNC on default deskop
    ### END INIT INFO

    x11vnc -auth /var/run/lightdm/root/:0 -rfbauth /root/.vnc/passwd -no6 -noipv6 -reopen -forever -shared &

    exit 0


    Make the file executable:

    sudo chmod +x /etc/init.d/x11vnc
    Now register this file with runlevel 5 by running this command:

    sudo update-rc.d x11vnc defaults

That's it! Reboot your RPi and x11vnc should be running automatically. From any other machine that is network reachable to the RPi, start a VNC client and connect to <IP address of RPi>:0. Enter the VNC password and you should see the RPi desktop. Multiple clients should be able to connect to the RPi.

Wednesday, March 13, 2013

Eulogy to Google Reader

Google has announced today that they are shutting down Google Reader on July 1st 2013. Here's what they said on the official Google blog:
We launched Google Reader in 2005 in an effort to make it easy for people to discover and keep tabs on their favorite websites. While the product has a loyal following, over the years usage has declined. So, on July 1, 2013, we will retire Google Reader. Users and developers interested in RSS alternatives can export their data, including their subscriptions, with Google Takeout over the course of the next four months.
Google Reader is one of the apps that I have been relying on, every single day, almost since the time it showed up in Google Labs (itself discontinued in July 2011).  I started using Reader with my @gmail.com account on Dec 7th 2005 and then migrated to my @element77.com account with Google Apps For Your Domain when Reader started supporting it. I've looked at 153,000 items in over 7 years from 200 feeds. That's an average of 60 items per day.


I read all my news feeds using Reader on web browsers and also use Reader via Newsify on my iOS devices. Newsify themselves are scrambling to figure out what this means for them. They have a one-line reaction on their website:
We're still investigating options, but our desire is to keep Newsify working after Google Reader shuts down.
With Reader, having one account accessible on any computer made it very easy to keep track of what was read and unread. Coming from the days of AvantGo on my Palm IIIxe, this was a huge improvement. This "cloud" access combined with Google's search prowess, made Reader the best news reader.

The one feature that I loved the most was Reader's keyboard shortcuts. It made it just a breeze to scan through feeds and speed read. Reader was the second best Google product I've used (after search, of course).
Google Reader keyboard shortcuts
Feedback to Google's decision is universally negative. Mashable has an op-ed - "We Still Love Reader". There's a petition asking Google to reverse their decision. Lifehacker has already put out a list of alternatives to Reader. I'll have to see which one of the alternatives comes closest to Reader.

My (futile) plea to Google - please don't kill Reader.