Skip to content

Instantly share code, notes, and snippets.

@Shugabuga
Last active July 8, 2017 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shugabuga/4db784d2ba80ca9c0908ecd0954c0ba1 to your computer and use it in GitHub Desktop.
Save Shugabuga/4db784d2ba80ca9c0908ecd0954c0ba1 to your computer and use it in GitHub Desktop.
Random Login Images - macOS

Random Login Images on macOS

  • Tested on macOS Sierria, but anything post-Yosemite will probally work.

  • Will change the login background to a random one on initial login

  • Ensure that the file sizes and type (PNG) are correct. If not, I don't know what will happen.

  • I am not responsible for any damage this program causes, nor is any support provided/warantee given. USE AT YOUR OWN RISK!

  • Licensed under MIT (Expat).

  • Script and app included. Either can be used, app recommended for novices.

  • DOWNLOAD APP

How to Use (.app)

  1. Make a new folder at /Library/Caches/random.

  2. Drop your PNGs in the newly created folder.

  3. Open System Preferences, and go to Users and Groups.

  4. Click Login Items and add the app.

  5. Now on every login, the login image will change randomly!

#!/bin/bash
cd /Library/Caches/random
cp `ls -1 | python -c "import sys; import random; print(random.choice(sys.stdin.readlines()).rstrip())"` ../com.apple.desktop.admin.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment