How to synchronize your Raspberry Pi digital picture frame with Google Drive using rclone 2

How to synchronize your Raspberry Pi digital picture frame with Google Drive using rclone

As any digital picture frame aficionado will tell you, it is crucial that you can add and delete images as efficiently as possible. The higher the number of great photos on your frame, the better the overall appreciation will be.

I already wrote about how to sync your picture frame with Google Photos. But I also got some user requests for a Google Drive sync. So here we are.

While a shared album on Google Photos is a really easy way to allow family & friends, it has one disadvantage: Only the Google Photos album owner is allowed to delete photos. Others may add photos but they are not allowed to delete them.

But if you are a couple enjoying your digital frame in the living room, you may want to have full autonomy in photo management without having to ask your significant first before deleting a photo.

This is where a Google Drive folder can be the better choice as you can define the rights that you give to a user: Add, edit, or delete.

So in this article, I will show you how to use rclone to mirror the contents of a Google Drive folder with your Pictures folder on your Raspberry Pi photo frame.

This solution is cost and advertising-free as it is an open-source development. There is also a very helpful Rclone forum.

And since you can access Google Drive on both your mobile and from your desktop computer, you have a super-easy way to manage your photo library on your frame. And you can super customize it, giving some users full rights and others only the possibility to add photos.

Installing rclone for Google Drive

I have written about rclone as a Dropbox access on the Raspberry Pi on this blog earlier, but this time I will focus on the Google Drive connection.

The official documentation is meticulous, but it may be a bit overwhelming for the casual user, so here is a quick summary:

If you haven’t yet installed rclone on your Raspberry Pi, open a Terminal window and enter

curl https://rclone.org/install.sh | sudo bash

Next, we’ll start the configuration process with

rclone config
  1. Choose “n” to create a new remote.
  2. Call it something like “googledrive”.
  3. Look up and enter the corresponding number for Google Drive. This may change with a new rclone release, but at the time of writing it is “16”.
  4. Press Enter at “Option client id”.
  5. Press Enter at “Option client secret”.
  6. Next, define the Scope, i.e., the level of access you want to grant. Enter “2” for read-only access. We don’t want the picture frame to do anything else than read your images.
  7. Press Enter at “Root Folder ID”.
  8. Press Enter at “Service Account”.
  9. Say “n” to Edit advanced config.
  10. Say “n” if you are working on a remote or headless machine.
  11. You will now see, “Please go to the following link” followed by a long URL. Copy this link and paste it into a browser window.
  12. You may have to choose a Google account, and then you will get a message if you want to “Grant rclone permission”.
  13. You will then get a code which you copy. Go back to your Terminal window and paste the verification code in there.
How to synchronize your Raspberry Pi digital picture frame with Google Drive using rclone 3

14. Confirm with “y,” and you will see your new remote connection.
15. Enter “y” to confirm and “q” to quit.

Choosing the Google Drive folder to clone

Create a new folder in Google Drive, or pick an existing one. In my example, the album is called “PictureFramePhotos”.

I want this folder to sync with the Pictures folder on my Raspberry Pi in /home/pi/Pictures.

The command syntax for doing this is:

rclone sync [source] [destination]

In our example, the command line would be

rclone sync googledrive:/PictureFramePhotos /home/pi/Pictures

Your Google Drive folder will be the master, and everything in this folder will be cloned onto the folder on your Raspberry Pi.

By the way, instead of viewing your images in Google Drive in list view like this

How to synchronize your Raspberry Pi digital picture frame with Google Drive using rclone 4

you can also activate the grid view by clicking on the grid symbol to make them appear like

How to synchronize your Raspberry Pi digital picture frame with Google Drive using rclone 5

which makes it much easier to manage your photo collection.

Automatic sync using crontab

To automatically clone your Google Drive folder with your digital picture frame every hour, we only have to add one line in crontab.

Enter

crontab -e

and add this line at the end:

0 */1 * * * rclone sync googledrive:/PictureFramePhotos /home/pi/Pictures

Save and close.

Conclusion

As Google Drive allows you to share a folder with other people, this is an easy way to let friends & family add their images so that they appear on your photo frame.

No more excuses for not often enjoying new photos on your frame!

Was this post helpful?

Scroll to Top