How do I sync Google Photos to a hard drive directory?
The above answer will not work. Google stopped syncing Google photo with Google Drive awhile ago. If you want access to Google Drive then the above works great. If you want to mount Google Photo then there does not seem to be a solution. This program is useful for backing up and keeping in sync with Google Photo https://pypi.org/project/gphotos-sync/
First, you must check the box to enable Google Photos folder in your Google Drive settings so that your Photos will be visible in Drive.
A standard Ubuntu install has GNOME settings has a built in "Online Accounts" section to easily configure a drive in to show in nautilus File Viewer.
You also have a few options to mimic the behavior of Dropbox clients there's OverGrive and Insync but I prefer to not have the files stored locally and for that I use Ocamlfuse.
Ocamlfuse
The creator made a PPA for it with .deb files for Ubunutu, run the following in a terminal to install the PPA:
sudo add-apt-repository ppa:alessandro-strada/ppa
sudo apt-get update
sudo apt-get install google-drive-ocamlfuse
Then, still in the terminal, run the following to get started:
google-drive-ocamlfuse
This will set up the configuration files and folders needed as well as launch your default browser so you can login to your google account.
Next, back in the terminal, you will need to create a directory to mount your google drive in:
mkdir ~/googledrive
And finally to mount the drive so you can see your files, run:
google-drive-ocamlfuse ~/googledrive
It works similarly to nfs in that the files aren't actually copied to your computer so if you want to have them when you aren't connected to the internet, you will need to copy them to a local directory.