
Next you need to run the two commands to update brew and any outdated brew utilities: brew update and brew upgrade, followed by brew doctor to make sure everything is OK.

The only time you should do this is if you are the only administrator user on your Mac, or if you understand the risks. The first is di-xquartz.sh which will (d)ownload and (i)nstall XQuartz:Īnother detail: if you want to be able to run that script without needing to enter your administrator password, you'll need to add this line to /etc/sudoers using sudo visudo: %admin ALL=NOPASSWD: /usr/sbin/installer and 8:00 a.m., but I don't want to have to worry about Daylight Saving Time, so after 3:00 a.m. Why 3:03 a.m.? Because my quota is loosened between 2:00 a.m. Let's start with the easiest part: I want this to run automatically when my satellite quota is loosened, so I have a launchd plist to run my shell script at 3:03 a.m. You could combine #1 and #2 into one if you want, but I like keeping them separate. There are three parts of this: 1) a shell script to update XQuartz, 2) a shell script to update brew, and 3) a launchd plist the run the script. Something you need to do every day? Do I even need to say "automation"? Wait. What I needed was a way to install it, if it isn't installed, or update it if it is out of date.Īlso, brew is constantly being updated, which means that you should update it every day.

The trouble is that brew won't install XQuartz, and it won't update it once it is installed, but it will complain if it isn't installed or is out of date. Together with supporting libraries and applications, it forms the X11.app that Apple has shipped with OS X since version 10.5."

If you use Homebrew (and you should), eventually you may need to install XQuartz, "open-source effort to develop a version of the X.Org X Window System that runs on OS X.
