Friday, March 22, 2013

The Pi Series 3: Accessing Pi from Android

Assuming you have completed Step 2, you are now ready to access your Pi from an Android Device. In Step 2, you installed x11vnc in Pi in order to access the desktop of Pi. Now we will see how you can access the desktop from an Android Tablet. I used a Rooted Nexus 7 running CM 10.1 M2 for this experiment. However it should work on other devices as well.

The Process
1. Install following apps In your Android device.
2. Launch the Terminal Emulator and SSH to Pi using ssh pi@IP_ADDRESS command. Once you are logged into Pi, run x11vnc.

3. Once you get command prompt of Pi, start VNC Server by running the command x11vnc

4. Launch the Android VNC Viewer, fill in the details and hit the 'Connect' button at the top.

5. You should see the desktop of Pi on you screen.

Tuesday, March 19, 2013

Portrait of Unnayi Warrier [Guest Post]

Portrait of Unnayi Warrier

A Portrait of Unnayi Warrier  - Oil Painting by my Grand Father.

Unnayi Warrier (also, Variar/Variyar/Warriar) was a poet, writer, scholar, dramatist who lived in Kerala, India during the later part of the 17th century.He gave immense contributions to the art of Kathakali the classical dance-drama form of Kerala. He is widely renowned for his chef-d'oeuvre Nalacharitham aattakatha. Read the Wikipedia Article

Thursday, March 14, 2013

The Pi Edition and Conversion to HTML5

Last few days were quite, for lack of a better word, Eventful. Continuing the experiments with Raspberry Pi, I was able to host a special 'Pi Edition' version of my site in it (More on that in another post). Content wise, the site is almost a clone of the original site with some minor modifications in elements to distinguish the Pi edition from the original Site. It’s published in HTML 5 and hence should be accessible from almost all devices. However, the 'Games' section is still in Flash. So if you want to try out any of the games, you may be asked to install the flash player Brower plugin.

(Screenshot of My Site)

When I launched my site almost 3 years back, it was based on Adobe Flash. For 3 years, it continued to be a Flash based site. Anyways, recently I had a calling to convert the site to HTML 5; considering the increasing number of mobile devices and the ever declining popularity of 'Flash' platform. The main problem was complete lack of knowledge in HTML 5 and the lack of motivation to learn the new language. But, the experiments with the Pi gave me enough rush to overcome these. So I goggled about converting flash files to HTML 5 and landed on Google Swiffy. It’s a handy little extension that can export a flash file to HTML 5 (with all the actionscript). It’s basically a single click procedure and Swiffy did an excellent job of converting my site to HTML 5 within seconds. After that, I needed to edit the exported page to add some custom scripts (Social Networks buttons etc.) and the new site was ready to be uploaded to the server.

In the coming days, as I learn more of PHP and Flash, I intend to tweak the site to make it more efficient.

Tuesday, March 12, 2013

The Pi Series: 2. Remote Access

So you are one of those unlucky people without a keyboard and mouse to connect to the newly setup Raspberry Pi. Well, if its any consolation, you are not alone and the world is not going to end. The beauty of Linux is that there seems to be a workaround for everything. Anyways, lemme tell you how to remotely control the pi from a Linux machine (one with a regular keyboard and mouse attached to it) or from an Android tablet for that matter. In this edition, I will stick to humble desktop/laptop.

  1. Raspberry Pi running Raspbian
  2. A linux machine - running a Debian based distro (I had an Ubuntu machine).
  3. LAN (I connected the pi using Ethernet cable and the laptop via WiFi)
If you want to access to Desktop of Pi, you need to have these two packages installed.
  1. A VNC Server in Pi - I used x11vnc
  2. A VNC Viewer in Linux machine - I used gtkvncviewer
How to Remotely Access Terminal of Pi
Before we start, please note that the default user name and password for Pi is 'pi' and 'raspberry' respectively. Now the procedure:
  1. Find out the IP Address of your Router and go to its settings page. To find out the IP address of Router, enter the command route in terminal of your Linux machine. In the output, look for 'Gateway' and the IP number mentioned below it. That is the IP Address of your router. Now, go to your router's settings page by entering the IP address of the router in a browser.
  2. Connect Pi to LAN and find out the IP Address of Pi in your LAN. To find out the IP address of Pi, Look for DHCP/DHCP Client Table (probably under LAN Status) in Routers Settings page. If you cant find out the IP, Google with model number as the procedure varies from router to router.
  3. In your Linux machine, take terminal enter the following command:
    ssh pi@<IP_OF_PI>
    (if the IP address of Pi is, command should be 'ssh pi@')
  4. Some text will flash and it will ask if you want to proceed further. Enter "Yes" and proceed
  5. Then It should prompt for the password for the user 'pi'. The default password is "raspberry". Enter the password.
  6. Now you should see the command prompt of Pi. That means you have logged in to Pi remotely.

How to Remotely Access Desktop.
Now you have access to command prompt of Pi. Lets see how to get the GUI.
  1. Connect to Pi via SSH command mentioned above and once you get the command prompt, install x11vnc by entering following command:
    sudo apt-get install x11vnc
  2. In the terminal of your linux machine, install gtkvncviewer by entering the command:
    sudo apt-get install gtkvncviewer
  3. Once x11vnc is installed, run it by entering x11vnc in the command terminal of Pi

  4. It will ask to setup a password for VNC. Choose a password and press enter (This is a one time exercise)
  5. Once GTK VNC Viewer is installed in your linux machine, run the program my entering the command gtkvncviewer
  6. You should get a dialogue box (like the one given below) asking you to enter the address etc of remote machine.

  7. In 'Server(:port)', Enter the IP address of Pi and port as 5900 (i.e. following the above example,
  8. Give the username as 'pi'
  9. Give the password you setup in step 4 above and press enter.
  10. Another window will appear with the desktop of Pi. 

Now you can use the keybord and mouse of your laptop/desktop to control Pi. Thats it for now.
Next Issue: Accessing Pi from an Android Tablet

Thursday, March 7, 2013

Sunday, March 3, 2013

Raspberry Pi - Map

Raspi Connections

A map of ports and connections on a Raspberry Pi. This is intended for a firsttime user. Just to get you familiarise wih what you can expect in a Pi. Click to enlarge the picture.