I have a self service package that installs vmware horizon client 4.9.0. The initial run of the application pops-up a prompt to enter and administrator password (you can cancel) for 'START REMOTE USB AND PRINTING SERVICES'.
how can i get rid of this pop-up prompt, so users don't see it????
For our Self Service policy for VMware Horizon Client, we install the PKG and the following script.
#!/bin/bash # REFERENCE: https://github.com/autopkg/scriptingosx-recipes/blob/master/VMwareHorizonClient/VMwareHorizonClient.munki.recipe # This script is designed to be installed after the VMware Horizon Client application is installed, via # Jamf Imaging, Jamf Remote, or a Self Service policy # Call the USB init tool so that the USB drivers are ready for any user:
/Applications/VMware\ Horizon\ Client.app/Contents/Library/InitUsbServices.tool # Set the perferences for CompanyName VDI address. This will apply to all users /usr/bin/defaults write /Library/Preferences/com.vmware.horizon "https://COMPANYURL.edu:443/broker/xmldomain" -string "COMPANYDOMAIN" /usr/bin/defaults write /Library/Preferences/com.vmware.horizon broker-history -array -string https://COMPANYURL.edu:443/broker/xml /usr/bin/defaults write /Library/Preferences/com.vmware.horizon trustedServers -array -string https://COMPANYURL.edu.edu:443/broker/xml exit 0
As you can see, it accomplishes two tasks. It has worked for VMware Horizon Client 4.3 - 4.7. I haven't tested it with 4.9 yet.
Reminder: replace "COMPANYURL" with the address of your VDI host and also replace "COMPANYDOMAIN" with the name of your ActiveDirectory domain.
Edited on July 27, 2022 - fixed the escapes that were missing as suggested by @dlondon
/Applications/VMware\ Horizon\ Client.app/Contents/Library/InitUsbServices.tool
/Applications/VMware Horizon Client.app/Contents/Library/InitUsbServices.tool
Thanks @jhalvorson. For now I wanted to lock in the settings for the URL's so I put them in the same config profile I use for some PPPC settings.
However the InitUsbServices.tool looks to do a few things that might be useful so I've run it after my installation.
Your script line needs to escape the spaces though i.e.
# Call the USB init tool so that the USB drivers are ready for any user: /Applications/VMware\ Horizon\ Client.app/Contents/Library/InitUsbServices.tool
Otherwise, great post and thanks for sharing!
Thank you @jhalvorson for the script listed above. I have been trying to figure out the .plist and configuration profile thing for a while. Not just for VMware Horizon client, but in general. I have started to create configuration profiles for various apps, but the configuration profile isn't modifiable by the user. In some cases, that is what you want. In other cases, we want to offer the user a base starting point. I suspect this will help me in application after application.
Over the years, I have leaned on the user template folder a lot. This has worked well for a long time, but now with beginning moves to Mojave, those days are very very numbered.
Using your script, I was also able to create the .plist for VMware that also disables the auto update. This was a revelation for me. It was like the light bulbs all went off at the same time. Thank you so much!!
@tcandela I think the last two settings are optional.
If I recall...
broker-history just tracks the last successful address. It's probably worthless if you only have one URL for your Virtual Desktop broker.
trustedServers helps avoid any pop-ups the user might see concerning SSL certificates related to your broker.
Hello, we are running into more issues with this.
I tried to run the script above, but as it is, it errors out, and says "./libvmware-view-usbd.dylib: no such file or directory"
I get our server to get loaded in, but we still get that printer popup.
Also, we are getting a message that accessibility options in System Preferences need to be changed, any way to automate//override that?
@jhalvorson Thanks for the info: I do indeed have the script set to install after.
Do you see anything wrong with this script? I even tried putting a sleep in there to make sure everything was finished up, but it didn't solve the problem.
#!/bin/bash /Applications/VMware Horizon Client.app/Contents/Library/InitUsbServices.tool /usr/bin/defaults write /Library/Preferences/com.vmware.horizon "https://view.schoolName.edu" -string "AD.schoolName.edu" /usr/bin/defaults write /Library/Preferences/com.vmware.horizon broker-history -array -string https://view.schoolName.edu /usr/bin/defaults write /Library/Preferences/com.vmware.horizon trustedServers -array -string https://view.schoolName.edu exit 0
The InitUSBServices.tool line had been throwing issues, saying that there is no such file or directory (see screenshot). This also happens when the script is run via Self Service or JAMF remote.