Take your old laptop and turn it into the perfect gift for your parents:
- Syncs with your iCloud library at a chosen interval
- Runs the slideshow automatically on reboot
- Shows the x most recent photos and maintains storage limits
-
Install an Ubuntu version on your old laptop. For older laptops with resource constraints, I would recommend Lubuntu: Download Lubuntu.
-
Once running, in the folder of your choice, clone this repo:
git clone https://github.com/qleml/icloud-slideshow.git
-
Navigate to the project directory and run the following:
cd icloud-slideshow sudo chmod +x scripts/* ./scripts/setup.sh
This will:
- Store the path of this directory in
$ICLOUD_SLIDESHOW_PATH
and append it to the~/.bashrc
file. - Create a virtual environment called
venv
and install the necessary packages (icloudpd
,feh
,pyyaml
, etc.). - Create a cron job to fetch your photos every day at 3 AM and start the slideshow automatically on reboot.
- Store the path of this directory in
-
Login with your Apple ID and complete 2FA by running:
./scripts/authenticate.sh
Follow the prompts to authenticate.
-
Customize the settings in the
config/config.yaml
file to match your preferences and to specify your Apple ID email!
To check if everything is working, you can manually start
./scripts/fetch_media.sh
./scripts/run_feh.sh
To adjust how often your photos sync, open the cron file with:
crontab -u
Then modify the schedule:
-
At X o'clock every day:
0 X * * * /bin/bash $ICLOUD_SLIDESHOW_PATH/scripts/fetch_media.sh
-
Every X hours:
0 */X * * * $ICLOUD_SLIDESHOW_PATH/scripts/fetch_media.sh
To adjust the slideshow speed, open the scripts/run_feh.sh
file and modify the interval X
seconds:
feh --slideshow-delay X --recursive -F $ICLOUD_SLIDESHOW_DIR media
The functionality is still limited and could be improved. Here are some things to keep in mind:
- Keyring password: After rebooting, the script may ask for your keyring password since the Apple ID password is stored in the keyring. If the only purpose of the laptop is this application in a safe environment (e.g., your home), you may want to set a blank password for the keyring. Alternatively, one could implement a safer solution.
- Photo downloading: Every night, the script downloads all photos, even if they have already been downloaded before. One can fix this by checking which files have already been downloaded using the
--only-print-filenames
flag. - Re-authentication: After 2 months, you need to manually re-authenticate using the
./scripts/authenticate.sh
script. This can be solved by using an authentication system through a secure messenger service, similar to how docker-icloudpd does it. - Videos: The script currently only fetches photos, not videos.
Run
./script/uninstall.sh
to remove the cron jobs, the venv as well as the ICLOUD_SLIDESHOW_DIR
in the .bashrc
file
Enjoy the slideshow! 🎄✨