Posted on 09-19-2018 08:53 AM
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????
09-19-2018 11:39 AM - edited 07-27-2022 06:57 AM
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
Correct:
/Applications/VMware\ Horizon\ Client.app/Contents/Library/InitUsbServices.tool
Incorrect:
/Applications/VMware Horizon Client.app/Contents/Library/InitUsbServices.tool
07-26-2022 11:57 PM - edited 07-26-2022 11:58 PM
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!
Posted on 09-19-2018 02:41 PM
I used PACKAGES to create this .pkg. very simple.
I'll checkout this script.
Are those last 2 lines necessary?
Posted on 10-08-2018 01:17 PM
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!!
Posted on 10-08-2018 01:57 PM
@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.
Posted on 10-16-2018 02:04 PM
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?
Thanks!
Posted on 10-17-2018 06:07 AM
@CLIENTSW4 Verify that the script runs after VMware Horizon client the pkg has been installed, not before, to avoid the error with the script.
Posted on 10-17-2018 11:43 AM
@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.
Thanks!
Posted on 11-12-2020 01:25 PM
Add this to a configuration profile seems to disable the prompt in 5.x:
defaults write com.vmware.horizon promptedUSBPrintingServicesInstall -bool true
Posted on 11-18-2020 05:27 AM
the plist in this post works perfectly coupled with a PPPC profile like this, which I made with the jamf PPPC utility