Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A script to pick a random login window background' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to pick a random login window background
Authored by: Pace on Dec 31, '07 12:43:47PM
Based on something I read here, I created the following script back when I was on Tiger:
#!/bin/bash
RANGE=35
echo
number=$RANDOM
let "number %= $RANGE"
cp /Users/Shared/backgrounds/$number.jpg /Library/LoginWindow/Aqua_Blue.jpg
And changed the default login background image to the one mentioned on the last line (/Library/LoginWindow/Aqua_Blue.jpg), and set the script to be run on every logout (logout hook). That way, I have a total of 36 (0.jpg to 35.jpg) images that change every time I log out of an account, shut down, restart, … Less noticeable than an Applescript script or app.

[ Reply to This | # ]
A script to pick a random login window background
Authored by: V.K. on Dec 31, '07 01:24:17PM

Thanks!
sorry but I'm even more ignorant about shell scripts than apple scripts.
How do I create a logout hook to a shell script? Also, do you know if I can make your script run every time I go to the login window and not just on logouts (say if I use the users menu)?



[ Reply to This | # ]
A script to pick a random login window background
Authored by: Pace on Jan 08, '08 08:10:51AM

Hi, sorry for not replying earlier.

Unfortunately, I'm really a beginner in those matters too, so I don't remember. I did it a few months ago after some research, but now it's all behind me.
Try searching "logout hooks" on Google, it might turn up some useful results.

Good luck…



[ Reply to This | # ]