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


Click here to return to the 'Replace the 'Other' user icon in the login window' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Replace the 'Other' user icon in the login window
Authored by: Don Martinello on Jul 24, '04 03:25:44PM
Hello folks.

I wrote simple script, bit more user friendly than jjkeller's scripts. I'm to lazy to format code in here, but I hope you find it useful anyway:).


#!/bin/sh

# Dummy script for Mac OSX 'Other Users' login-window icon change
# written by Don Martinello /www.scitech.sk/ 23.07.2004 at 24:30.
# This nice hint is taken from www.macosxhints.com, thx jjkeller :).

path="/System/Library/CoreServices/SecurityAgentPlugins/loginwindow.bundle/Contents/Resources/"

case "$1" in

install)

clear;echo "";
echo "################################################################################";
echo " New 'Other Users' login-window icon will be installed.";
echo "################################################################################";
echo "";
echo "Ready ? [y/n]: ";read answer;
if [ $answer = "n" ]
then
echo "Nothing has been done, please, read help first: `basename $0` help";exit;
else
echo "New login-window icon path/filename: "; read filename;
if test -f $filename
then
echo "Now you will be asked for yours OSX account password:";echo "";
if test -f $path/UsersPref.tiff.orig
then
sudo cp $filename $path/UsersPref.tiff;
sudo chown root:wheel $path/UsersPref.tiff;
sudo chmod 640 $path/UsersPref.tiff;
else
sudo cp $path/UsersPref.tiff $path/UsersPref.tiff.orig;
sudo cp $filename $path/UsersPref.tiff;
sudo chown root:wheel $path/UsersPref.tiff;
sudo chmod 640 $path/UsersPref.tiff;
fi
echo""; echo "Installation complete. Log Out now and check new 'Other Users' icon.";
else echo "Given path/filename doesn't exist, try again.";exit;
fi
fi
;;

uninstall)

clear;echo "";
echo "################################################################################";
echo " 'Other Users' login-window icon will be changed to default.";
echo "################################################################################";
echo "";
echo "Ready ? [y/n]: ";read answer;
if [ $answer = "n" ]
then
echo "Nothing has been done, please, read help first: `basename $0` help";exit;
else
echo "Now you will be asked for yours OSX account password:";echo "";
if test -f $path/UsersPref.tiff.orig
then
sudo mv $path/UsersPref.tiff.orig $path/UsersPref.tiff;
echo "Uninstallation complete. Log Out now and check original 'Other Users' icon.";
else
echo "`$path`/UsersPref.tiff.orig is missing. Uninstallation failed, read help";
fi
fi
exit;;

help)

clear;echo "";
echo "Script changes default Mac OSX 'Other Users' login-window icon to user defined.";
echo "I don't take responsibility of any kind in case of any damage using this script.";
echo "";
echo "New 'Other Users' icon image have to be 48x48 pix tiff. LZW compression is fine.";
echo "";
echo "################################################################################";
echo " Installation procedure details.";
echo "################################################################################";
echo "Install backups original default file UsersPref.tiff to UsersPref.tiff.orig and";
echo "place Example.fiff as UsersPref.tiff to path you find when reading this script.";
echo "Uninstall: does install steps in reverse order, logical isn't it :).";echo "";
echo "################################################################################";
echo " Uninstallation procedure details.";
echo "################################################################################";
echo "Uninstall reverts original image file from UsersPref.tiff.orig to UsersPref.tiff";
echo "script checks if exists UsersPrefs.tiff.orig, if not script fails to uninstall.";
echo "";exit;;

*)

clear;echo "";
echo "Usage: `basename $0` {install|uninstall:help}" >&2;
echo "";exit;;

esac


[ Reply to This | # ]