How to use Dialog Boxes with Mac Logon Scripts.
1 - Create a directory to store the startup scripts.
2 - Uncompress the file and put the detach.sh script with the rest of the startup scripts.
3 - In the group policy, create a script to run the detach script. The detach script will run all the other scripts in the directory.
Please note:Any script using popups will need those three items in the trap and a delay to make sure the user has completely logged in before it pops up.
The following is a sample startup script that will pop up a dialog box after the user logs in:
#!/bin/sh
trap main SIGHUP SIGTERM SIGINT
main()
{
sleep 30
osascript -e 'tell app "System Events" to display dialog "You have now logged in!" buttons "OK"'
exit
}
main
© 2024 One Identity LLC. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center