Skip to content

Instantly share code, notes, and snippets.

@sftsk
Last active May 12, 2021 21:19
  • Star 12 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save sftsk/5748a6a56f3da6fec140 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

@mihalop
Copy link

mihalop commented Feb 15, 2018

Great guide. If you have a Pi, you can also try out this guide:

https://www.yodeck.com/news/how-to-get-your-google-calendar-on-a-wall-mounted-screen/

Plus over the above solution:

  • No coding or configuration needed
  • Not just full-screen, can combine with other content as well
  • Can log into a Google Account and display private calendars as well
  • Can set a zoom on the browser, so that the calendar is more visible
  • It is free as well (for accounts with 1 screen)

@vertijog
Copy link

vertijog commented Mar 4, 2018

Thanks for the post, It has been really helpful.
I had two problems:
First, was the autostart: that I have to edit the next file:
nano /home/pi/.config/lxsession/LXDE-pi/autostart
Second, if that I can auto maximize the browser, so i always have to press f11.
Thank you

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