Posted on 01-20-2023 07:42 PM
We are deploying FMPro 19 to various groups within our org. I am using the script provided by Claris to build a custom built package, which is working fine, however one ask we have from the program manager is to try to set a Host URL in the client so that they do not have to assist every user in doing so. Its not that its terribly difficult to instruct users how to do this, but there is only 1 person to support nearly 1k users for this project.
I found one document, referencing FM Pro 15, that suggests adding the following attribute to the Assisted Install.txt file:
AI_PREFERREDSERVERFORCONNECTION=<host URL>
Unfortunately this is not working, at least not in FMPro 19. I've tried the usual format of fmnet:/<hostdnsname> and just entering the dns name without the leading fmnet:/
Neither worked.
Has anyone had any success in setting the Host URL via Jamf?
FWIW, when set manually the host URL is listed in a Pref file within ~/Library/Preferences.
Solved! Go to Solution.
01-21-2023 10:44 AM - edited 01-21-2023 08:54 PM
@pbenware1 You could write the Host URL to the FMPro settings file in ~/Library/Preferences using the following script as a template:
#!/bin/sh
# This variable should be set to the preferences domain of the FMPro prefs file in ~/Library/Preferences
# (i.e. the file name without the .plist extension)
PrefsDomainForApp="com.vendorname.appname"
runAsUser() {
currentUser=$( echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ { print $3 }' )
currentUserID=$(id -u "$currentUser")
if [ "$currentUser" != "loginwindow" ]; then
/bin/launchctl asuser "$currentUserID" sudo -u "$currentUser" "$@"
fi
}
runAsUser /usr/bin/defaults write $PrefsDomainForApp HostURLKeyName "HostURLSetting"
01-21-2023 10:44 AM - edited 01-21-2023 08:54 PM
@pbenware1 You could write the Host URL to the FMPro settings file in ~/Library/Preferences using the following script as a template:
#!/bin/sh
# This variable should be set to the preferences domain of the FMPro prefs file in ~/Library/Preferences
# (i.e. the file name without the .plist extension)
PrefsDomainForApp="com.vendorname.appname"
runAsUser() {
currentUser=$( echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ { print $3 }' )
currentUserID=$(id -u "$currentUser")
if [ "$currentUser" != "loginwindow" ]; then
/bin/launchctl asuser "$currentUserID" sudo -u "$currentUser" "$@"
fi
}
runAsUser /usr/bin/defaults write $PrefsDomainForApp HostURLKeyName "HostURLSetting"
Posted on 01-21-2023 10:52 AM
Thanks @sdagley I'll give that a spin.
Posted on 01-22-2023 12:59 PM
@sdagley This worked, after adding a couple of additional lines to write.
I needed to include
FavHostInfo:Entry0:DisplayName "<server display name>"
LaunchCenterStates:LastSelectedHost "<serverURL>"
Once I added those, everything is working great in my test vm. Moving to deploy to a few test machines next.
Thanks for the assist.