Building on the concepts in this post, one can have their Raspberry Pi auto login to LXDE (after running raspi-config to allow so) and have a Python script launch by changing the Exec line to launch the desired script.
There is a good post on Slideshare about doing so as well.
Combining this ability with VNC is a great solution for a purpose-built system that is easy to get into and fix remotely.
NYC.gov’s best API is not advertised – http://www1.nyc.gov/calendar/api/json/search.htm?sort=DATE&pageNumber=1
They also have used console.log a ton on the site, so it makes picking things apart quite easy.
- Open developer tools
- Visit: http://www1.nyc.gov/events/events-filter.html
I wanted to have a headless Raspberry Pi that I could connect to a TV using HDMI from time to time and see the same thing on the screen as I saw in my VNC session.
I also wanted the Raspberry Pi to show up in the OS X Finder sidebar as a device to connect to using AFP and to share the screen with. I wanted to do this using Bonjour because it is a pain to try and remember the Pi’s IP address, especially if you are moving it from network to network.
I found some great tutorials online to make this happen, but like anything, I had to use my noggin’ to get things just how I wanted them.
Setting up VNC on Raspberry Pi for Mac access is a great tutorial to handle the Bonjour piece of the equation. Note, this tutorial features using TightVNCServer which will connect to your Pi using a different Window Session, so what you see on the Pi connected to the TV will not be what you see in the VNC session, so disregard all the parts about setting up the VNC server. What you really need from this post is installing netatalk for doing AFP and the avahi-daemon for Bonjour.
The main thing to note is that in the way I am setting thing up in /etc/avahi/services/rfb.service you need to make sure the port is set to 5900 and not 5901.
For setting up VNC, I chose to use x11vnc. The Raspberry Pi forum has a simple comment to a post to make this happen and have x11vnc autostart.
I have attached a PDF of Setting up VNC on Raspberry Pi for Mac access | 4DC5 for posterity incase their great blog post ever goes away.