Wrote up a handy script to clear all the font caches for the Mac OS, Adobe, MIcrosoft Office and Apple iWorks.
I am using this in Casper, so I have it running as root and having a reboot happen after. If you are going to run this on your own, you may want to put a root check in there and make sure to reboot after.
’till next time
## Author: C. Tangora
## Purpose: Remove Font Cache from Adobe, Microsoft, iWork and Mac OS.
## If run outside of Casper, be sure to be root & reboot after.
## Adobe Font Caches are stored in the User's Libraries, and will have "Fnt" in the name and end in ".lst".
echo "Removing Adobe Font Caches (Lists)"
find -x /Users -mindepth 5 -type f -iname *Fnt*.lst -delete
## Next it will remove the font caches from Microsoft Office.
echo "Removing Office Font Caches"
find -x /Users -mindepth 7 -type f -name *Office\ Font\ Cache* -delete
## iWorks is next on the chopping block
echo "Removing iWork Font Caches"
find -x /Users -type f -name com.apple.iwork.fonts -delete
## Next we will restart the Apple Type Server.
# This is the one we want to make sure we reboot (or at least logout) to restart.
echo "Removing OS Font Caches"
atsutil databases -remove
echo "Restarting Apple Type Service Server"
atsutil server -shutdown
atsutil server -ping
echo "Completed Font Clearing."
echo "Please restart ASAP."
Some applications do not have actual .app packages installed when you run the installer. One example of this is Lab Stats. The installer will install multiple files and some UNiX applications, so how do you know if the application is on a machine? Casper offers a few options:
- Turn on UNiX application gathering for your inventory collection.
- Only install via Casper and look at the application package receipts.
- Run a script via an Extension Attribute to check for installed files.
The first two are good options, but some people do not want to turn on the UNiX application list due to the size & time it takes to gather the inventory report. If you are implementing Casper on a site you will already have some computers with applications installed outside of Casper, so you may not be able to rely on an accurate installer receipt. The third option will work regardless of which installer was used (as long as they all install the same files), and doesn’t increase the report time drastically.
The first two options are common tasks in Casper, the third is also but requires a bit of your own scripting. Under Settings -> Inventory Options -> Inventory Collection Preferences -> Extension Attributes you can create a new extension attribute by clicking on “Add Extension Attributes” and change the Input Type to Populated By Script. The script is simple, in this example I’ll show how to see if a specific file (foo.bar) is in the Shared User’s directory.
if [ -e /Users/Shared/foo.bar ]
The extension attribute will now show TRUE if the file is there and FALSE if it is not. You can create smart computer groups filtering on this attribute.
If you want to change the type of file it searches for (say you just want to know if a specific directory is in a specific location). Fire up the terminal and do a ‘man if’ to see all options available.
Till Next Time.
We’ve been deploying VirtualBox on a one-to-one basis for the past year. Each time someone requested vBox we would get their machine and install it. Casper came along, and after some politics, we decided to give it a shot at building a Virtual Box installer with Windows 7 built-in. While the end result still requires some hands-on to modify some settings (such as computer naming & binding to the AD), it is by far faster and easier to get a Mac to run Windows 7 in Virtual Box now.
The following are some considerations when planning your vBox.
- Not all software is legally allowed to be distributed “on image”. Sometimes you’ll have to create a post-install process to do this (such as a GPO or Kace, BigFix, etc).
- Binding requires unique name, so you’ll want to bind after it is deployed.
- Do not have multiple partitions on the windows drive, you won’t be able to use the dynamic disk size of Virtual Box if your second partition has space left on it.
- You’ll want to make sure you setup the storage area to be in a shared space, so it is accessible by more than just the user who created the package.
These are just some of the warnings, however the pay-off is worth it. If you have a paid application for virtualization (Parraellels, VMWare) it is far easier than with vBox (in my opinion), but again you can’t beat the price of Virtual Box. That advantage of Casper is that you can push the user preferences for VirtualBox out as a separate package, available For Exisiting Users, or For User Template. We’re in the testing stages now, but if all goes as planned, we’ll have a simplified Virtual Box deployment in the near future.
I’ll post updates when complete (maybe even the file paths if I get the time).
Till next time.