VMware Horizon Community
nebben
Enthusiast
Enthusiast
Jump to solution

Help with repackaging Horizon View client for Mac

I am in the process of packaging the VMware Horizon View client for our Mac desktops and laptops (we have about 150). Normally, this is a very simple process, and especially easy with this client since it is just an app. We use Apple PackageMaker in order to repackage the VMware Horizon View Client.app, and add the test user's plist file in for deployment to future users' profiles. We have used com.vmware.view.plist in the past to ensure our connection server is pre-populated, and to force PCoIP. This has worked great for us with all versions < 2.3.

Starting with 2.3 and now 3.0, I haven't been able to repackage this application properly. I download the .dmg from VMware, and copy the .app within it to /Applications; this is exactly how a user would install it on their system. I run the View Client once and connect to our connection server using the settings I want to stick when deploying this app to our machines. Then using PackageMaker, I point the first part of the package that will be created to /Applications/Vmware Horizon View Client.app as normal (including root). This is all normal. I pick com.vmware.view.plist file, and using a plist editor, I remove the entry for my test username, and the desktop which I connected to. In PackageMaker, the destination of this .plist file is in the default user profile for the mac- so whenever a new user logs into that mac, they will get the .plist file with the settings we want. Sounds good. The package builds successfully. I deploy it to a test machine successfully.

When I login to a test system and run the View client, I can connect just fine. If I try to use the menu Connection/Printing Enabled, all hell breaks loose and I get a series of errors;

Invalid File in Package.

The file is invalid:

/Applications/VMware Horizon View Client.app/Contents/Library/thnuclnt/thnusetup.sh.

Please download the official product.

If I try to start remote USB services, I get a similar error after it issues a warning that I will be prompted to enter admin credentials;

Invalid File in Package.

The file is invalid:

/Applications/VMware Horizon View Client.app/Contents/Library/InitUsbServices.tool.

Please download the official product.

?? If I run the app from the .dmg on this same machine, I have no problems. Any ideas?

Reply
0 Kudos
1 Solution

Accepted Solutions
nebben
Enthusiast
Enthusiast
Jump to solution

OK, I just had to post the question so I could clearly think through it Smiley Happy.

There are some extended attributes on these shell scripts which PackageMaker strips out when it repackages the app. I packaged it as a .dmg, and did the app copy via postinstall script in the pkg ... works great after this.

View solution in original post

Reply
0 Kudos
3 Replies
nebben
Enthusiast
Enthusiast
Jump to solution

OK, I just had to post the question so I could clearly think through it Smiley Happy.

There are some extended attributes on these shell scripts which PackageMaker strips out when it repackages the app. I packaged it as a .dmg, and did the app copy via postinstall script in the pkg ... works great after this.

Reply
0 Kudos
cashxx
Contributor
Contributor
Jump to solution

Having the same issue......every time I go to deploy Horizon View I have to reinvent the wheel, I wish they would stop changing things!

So you are talking basically doing this, this was my thought just deploy the dmg into shared and work with it

/bin/sleep 5

/usr/bin/hdiutil attach /Users/Shared/VMware-Horizon-Client-3.1.0-2096621.dmg

/bin/sleep 8

/bin/cp -R /Volumes/VMware\ Horizon\ Client/VMware\ Horizon\ Client.app /Applications

/bin/sleep 3

/usr/bin/hdiutil detach /Volumes/VMware\ Horizon\ Client/

/bin/sleep 3

/bin/mv /Users/Shared/VMWare* ~/.Trash

I'm doing it first to get the file in place so I can add it to the dock and also I set plist pref settings for the user as well:

## Set Preference File for VMware Client 1.6 and up

/usr/bin/touch /Users/$USER/Library/Preferences/com.vmware.horizon.plist

/usr/bin/defaults write /Users/$USER/Library/Preferences/com.vmware.horizon "https://YOURSERVER_FQDN:443/broker/xmldomain" -string "YOURDOMAIN"

/usr/bin/defaults write /Users/$USER/Library/Preferences/com.vmware.horizon broker-history -array -string https://YOURSERVER_FQDN:443/broker/xml

/usr/bin/defaults write /Users/$USER/Library/Preferences/com.vmware.horizon trustedServers -array -string https://YOURSERVER_FQDN:443/broker/xml

## Change permissinos on Preference File for VMware to give user ownership of the file

/usr/sbin/chown $USER /Users/$USER/Library/Preferences/com.vmware.horizon.plist

/bin/chmod 700 /Users/$USER/Library/Preferences/com.vmware.horizon.plist

But not working for me and not sure why right now.  The DMG gets installed into /Users/Shared but the script doesn't seem like its running for some reason.

Reply
0 Kudos
cashxx
Contributor
Contributor
Jump to solution

Ok I figured my problem out.....the scripts I had Postflight and Preflight and they must be lowercase and be postflight and preflight.  I don't put scripts in that much and forgot this little thing I guess.

Working as it should now!!

Reply
0 Kudos