We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Instead of running with sudo, an option is to test if you can write to the destination file. If you can't, you could execute
sudo
sudo chown $(whoami):$(groups | cut -d' ' -f1) /Library/Caches/com.apple.desktop.admin.png
This will change the ownership of com.apple.desktop.admin.png thus allowing the user to change the image without sudo.
com.apple.desktop.admin.png
The text was updated successfully, but these errors were encountered:
I don't know if theres's a shorter way of getting the group.
You can assume staff, but I don't know if that can change, or under what circumstances it does.
Sorry, something went wrong.
To be honest, I think the best would to just keep with sudo permissions. Or what do you think? I will gladly look at a PR implementing this :)
No branches or pull requests
Instead of running with
sudo
, an option is to test if you can write to the destination file. If you can't, you could executeThis will change the ownership of
com.apple.desktop.admin.png
thus allowing the user to change the image withoutsudo
.The text was updated successfully, but these errors were encountered: