Skip to content

Instantly share code, notes, and snippets.

@vertijog
Forked from sftsk/calendarpi.md
Created March 4, 2018 03:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vertijog/058b722589489f0590b7913c04e79f7a to your computer and use it in GitHub Desktop.
Save vertijog/058b722589489f0590b7913c04e79f7a to your computer and use it in GitHub Desktop.
Raspberry Pi Google Calendar Screen

Using a raspberry pi to display Google Calendars

This explains the set up of our very basic status screen to displays Google calendars here at booncon.

Install the raspberry pi

Download and put the most current https://www.raspberrypi.org/downloads/raspbian/ image to an SD Card. On OSX that works great with http://www.tweaking4all.com/hardware/raspberry-pi/macosx-apple-pi-baker/, just use the restore option and select the unzipped image file.

Set up the operation system basics

After the first boot, the raspi-config utility should load up. Make sure to enable ssh access and choose to boot into the graphical desktop mode. You can then reboot and the desktop should show up.

Use the wifi utility in the top right corner to configure the wireless network.

Install a better browser & configure it

This you can do through the terminal on the Pi or remotely through the ssh access which is what we did. Type sudo apt-get install iceweasel. After the installation on the Pi you should be able to find iceweasel in the internet menu. Open the browser and navigate to https://calendar.google.com, log in and make sure to check the stay logged in check-box.

Now you have to decided which website you want to use for the status screen, you can use the page you are just looking at or you can do something a little prettier.

Go to this website https://www.google.com/calendar/embedhelper?ctz=Europe/Helsinki and set up the calendar widget to your liking.

Copy the embed code

Create a very simple html file like the following:

<!doctype html>
<html class="no-js" lang="">
    <head>
        <meta charset="utf-8">
        <title>calendarpi</title>
    </head>
    <body>
        <!-- Add the embed code here -->
        
        <script>
          window.setTimeout(function () {
            location.reload(); // will reload the page every 10 minutes
          }, 600000);
        </script>
    </body>
</html>

Save this to the desktop and open it on the browser in the Pi.

Set the chosen page as the homepage on the pi.

Type about:config into the browser bar.

Double-click to browser.sessionstore.resume_from_crash to set it to false.

Hit F11 to put the browser to fullscreen.

Everything should look quite good now, we only need to set this up to happen automatically on boot.

Set up browser autostart & optimise system

Edit the following file sudo nano /etc/xdg/lxsession/LXDE-pi/autostart and add @iceweasel as the last line. Install unclutter to hide the mouse cursor: sudo apt-get install unclutter. Disable power saving modes by editing sudo nano /etc/lightdm/lightdm.conf, replace #xserver-command=X with xserver-command=X -s 0 –dpms.

Reboot and it should all be fine :)

Sources: http://www.instructables.com/id/Raspberry-Pi-Wall-Mounted-Google-Calendar/?ALLSTEPS https://gist.github.com/blackjid/dfde6bedef148253f987 http://raspberrypi.stackexchange.com/questions/26783/auto-startup-of-the-midori-web-browser-is-not-working-on-raspberry-pi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment