This is part one of a series on dealing with the issues software can cause in enterprise environments, and how to combat these issues.
One of the most important skills in a Mac Admin’s toolbox is being able to identify and work around issues with vendor software. Many vendors release software packages that are ill-suited for use with management tools such as Munki and Casper, and it is important to know how to dig into these issues to be able to support a managed environment.
If you are buying non-Apple mice and keyboards, it is very likely that they are Logitech models. If an admin wants the full functionality of these devices, OS X needs the drivers and control panel that Logitech distributes as the Logitech Control Center. This installs a .prefPane as well as drivers for most modern Logitech input devices.
However, Logitech’s installer is not friendly for deployment though Munki or Casper, as it opens prompts during the installer, and then installs a registration prompt that launches when users login. Thankfully, we can easily modify the preflight and postflight scripts of the installer to recitfy all of these issues.
The download for the Logitech Control Center is a .app, but there is a package installer at Logitech Control Center.app/Contents/Resources/Logitech Control Center.mpkg. This is a flat package, so we must expand it for modification using the following command:
Navigate to Logitech Control Center.expanded.mpkg/logitechControlCenter.pkg/Scripts, and you will find preflight and posflight scripts, both of which need to be edited.
In the preflight script, line 25 runs KeyboardChooser.app, prompting the selection of a region:
This will not work at the loginwindow, and users should not have to make this selection. Using fseventer, we can see that all this application does is write to /tmp/LGT_region.plist, with a 0 for EU, 1 for US, and 2 for JP.
To take place of KeyboardChooser.app, replace lines 24 through 26 with the following script, which will write the file that the installer needs to continue. The installer wants an XML formatted plist, so the second line will convert the binary to XML.
Once these modifications have been made, save the file and move on to the postflight.
Most of the postflight script, until line 110, is just making sure permissions are correct and drivers are loaded. These actions are fine, but lines 125-129 add a login item for all users which greets them with an annoying registration prompt, which is particularly a problem on shared machines.
Comment out or delete lines 125-129, which will stop the the login item from being created. Save the script, as all edits have now been completed.
The main metapackage contains more than just the Logitech Control Center, it also has the Logitech Updater and Logitech Unifying software. If you are in a managed environment, you probably do not want the updater, and if you are not using Logitech’s wireless products with the Unified Receiver, you really do not need that either. If this is the case, you are ready to flatten the package, using this command:
Import the resulting package into your management software, and you are ready to deploy it to your fleet.
If you would like to use the metapackage, flatten it using the following command, and optionally use ChoiceChangesXML to choose what you would like to install.
Many vendors continue to ship enterprise-unfriendly software, but by knowing how to combat the issues with this software, admins will save many long-term headaches. With just a bit of time invested and some easy changes to a couple of scripts, a package that was previously unusable in a managed environment can become just another friendly package. While other software may require full-on repackaging, minor changes saved the Logitech Control Center.
Of course, the best course of action is to complain to your vendors and vote with your dollars, but this may be impossible with free software or if there is no alternative.