Made by Nathan

programming and projects

Automatically Change iPhone Wallpaper Every 30 Minutes

| Comments

NOTE: This is only for jailbroken iPhones.

I love finding awesome wallpapers on reddit. My Ubuntu desktop cycles through my wallpaper collection with a program called Cortina, and I wanted my iPhone to do the same.

So I wrote a very simple script and a launchd plist that runs the script every 30 minutes. If you want to set this up for your jailbroken iPhone, all you need is SSH and a collection of images.

Save your wallpapers to /var/mobile/Media/Wallpapers (or wherever you like), then ssh the following script to your iPhone and run it. (It will need to be executable: chmod +x).

# This script sets up your iPhone to change the lock-screen wallpaper every 30 minutes.

# Install the wallpaper changing script
cat > /usr/bin/ChangeWallpaper <<EOF
# Overwrite the LockBackground image with a random image from the wallpaper directory.
cp -f \${files[RANDOM % \${#files[@]}]} /private/var/mobile/Library/SpringBoard/LockBackground.jpg
chmod +x /usr/bin/ChangeWallpaper

# Install the launchd task to run the script every 30 minutes
cat > /Library/LaunchDaemons/com.ndb.changewallpaper.plist <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

# Load the scheduled task
launchctl load /Library/LaunchDaemons/com.ndb.changewallpaper.plist


« Repurposed pressure gauge - Bathroom door indicator Bash Color Index »