Show Safari Status Bar

jalbert
Contributor

We have just discovered that by default the Status bar in Safari is disabled for some reason. We are doing our Phishing security training and are helping staff identify phishing and spam by hovering over links for example. Unfortunately, if they use Safari, that does absolutely nothing. So, I created a script that should enable it, but it doesn't appear to be working and was wondering if anybody else has come across this and how they addressed it. Here is my script;

#!/bin/bash

defaults write com.apple.Safari ShowStatusBar -boolean true

exit 0

*edited for bad grammar

5 REPLIES 5

mm2270
Legendary Contributor III

You have to direct commands like that to a specific plist path. If you just use the domain by itself (com.apple.Safari), the script will assume it should be affecting the preference of the user running the command, which would be root in most cases when running it from a Jamf policy. That's why it doesn't appear to be working when running it from a policy.

You could fix that by getting the current logged in username and then using a full path to the Safari plist, like

loggedInUser=$(scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $  3 }')

/usr/bin/defaults write /Users/$loggedInUser/Library/Preferences/com.apple.Safari.plist ShowStatusBar -boolean true

You could also consider using a Configuration Profile to manage this, especially if its something you'd like to enforce. The above command will only set the preference once - the user can easily switch it back off.

jchen1225
Contributor

Yeah we have been looking into this recently. I tried using a Configuration Profile. It works, but if the end user switch it off it does not restrict or re-apply the "on" setting.

462e3222b81e42bf8d0156b92ed60056

dstranathan
Valued Contributor II

Does this also apply to a way to show the Safari Favorites bar too?

Example: defaults write com.apple.Safari ShowFavoriesBar -boolean true

Can anyone confirm this key/value pair exists for Safari 13/14?

mm2270
Legendary Contributor III

It looks like it’s stored in a ShowFavoritesBar-v2 setting in Safari 14. I’m not sure about Safari 13 but it might be the same.

It’s a Boolean value so either true or false.

kai_wang1
New Contributor III

Do we have any new solution for Safari v17.3?