System Administration Uncategorized

Bash Script: Set Favorite Servers In “Connect To…” Menu

The Connect To… menu (Command+K) lets you quickly connect to a server using different protocols.  If you are deploying these settings to a bunch of computers, it can be done quickly using a simple bash script.  Just replace or add whatever servers you want into the servers variable (one per line in single quotes).

A logout/login is needed to apply the settings as I haven’t figured out what process to restart to get them to apply immediately.

2 replies on “Bash Script: Set Favorite Servers In “Connect To…” Menu”

Can anybody confirm that this still works in 10.12 Sierra / 10.13 High Sierra?

The (adapted) script runs without errors. The correct values are written (as seen with bash -x / set -x) but there is no change in the Connect To-dialog, neither after logoff/login nor after a restart. I’ve checked with 10.11, 10.12 as well as 10.13 in VMs as well as on “physical” hardware, to no avail.

Leave a Reply