I'm trying to build a script to show a notice to users once they login.
I'm running into 2 problems.
1) The Login event doesn't seem to execute reliably
2) Login event seems to be in this in-between where the desktop isn't up so you can't display a dialog box or anything easily.
Problem 1
To test problem one, I have a script scoped to just my computers that runs
echo "Hello" >> /hello.txt
This rarely seems to echo hello.
Problem 2
I haven't yet figured out the best way. One way
loggedInUser="$3"
x=1
while [ "$x" -eq "1" ]; do
sleep 10
dockActive=$(ps aux | grep "${loggedInUser}" | grep "/MacOS/Dock")
if [ ! -z "$dockActive" ]; then
sleep 5
x=2
fi
done
Then the rest of the script, displaying something with jamfHelper or osascript. But regardless of problem 2, I can't seem to get past problem 1.
Anyone have a solution for displaying a dialog box after a user logs in?
