-
-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dockutil 3.0.2 and Sonoma Beta 23A5276g #153
Comments
Tested it here and problem can you share your script |
Ok check this script: https://github.com/mvdbent/setDock/blob/main/setDock-defaultDock.sh run it and test it. |
thanks!!!, I really appreciate it; will give it a try. |
Hi @mvught, It keeps failing on Sonoma.
|
I'm also getting this BPT trap which I think is the cause of not getting the dock configured correctly. Does anyone else face the same issue? |
Try something like this dockutil="/usr/local/bin/dockutil"
LOGGEDINUSER=$(stat -f '%Su' /dev/console)
uid=$(id -u "${LOGGEDINUSER}")
runAsUser() {
if [[ "${LOGGEDINUSER}" != "loginwindow" ]]; then
launchctl asuser "$uid" sudo -u "${LOGGEDINUSER}" "$@"
else
echo "no user logged in"
exit 1
fi
}
if [ "$LOGGEDINUSER" == "root" ]; then
echo "Currently logged in user is root - aborting."
echo "------------------------------------------------------------"
exit 1
fi
homeDirectory="/Users/$LOGGEDINUSER/"
runAsUser "$dockutil" --add "/Applications/Google Chrome.app" --no-restart "$homeDirectory" Using the runasUser function helped |
Are you able to reproduce the BPT trap error? Did you figure out what is/was causing the error? |
yes I reproduced it, no I didn't have a clue what caused it. |
Hello,
Started testing Sonoma in my environment and noticed a few issues.
1.- Adding/Removing with the --no-restart seems to have no effect anymore.
2.- Getting this error:
Setting Dock for user cesar.sonoma...
Error: /var/root/Library/Preferences/com.apple.dock.plist does not seem to be a home directory or a dock plist
Usage: dockutil [] [ ...]
See 'dockutil --help' for more information.
Error: /var/root/Library/Preferences/com.apple.dock.plist does not seem to be a home directory or a dock plist
The script works fine in Ventura, it seems something changed in Sonoma that dockutil does not like.
The text was updated successfully, but these errors were encountered: