I had a problem come up in my workplace for a MATLAB user, where MATLAB wasn’t launching. On investigation, it appeared X11 wasn’t launching. To fix this, I had to reinstall X11 on the user’s 10.5.8 Mac.
Here’s what I did to reinstall X11:
1. Before you change anything, make sure you have a Mac OS X 10.5.6 installation DVD available.
2. Log into the Mac using an account with administrative rights and open Terminal.
3. Back up your existing X11 directory and remove /usr/X11R6 (/usr/X11R6 is a symbolic link that points to /usr/X11.)
sudo mv /usr/X11 /usr/X11.back
sudo rm /usr/X11R6
4. Have your 10.5.x Mac forget its X11-related receipts:
sudo pkgutil –forget com.apple.pkg.X11DocumentationLeo
sudo pkgutil –forget com.apple.pkg.X11User
sudo pkgutil –forget com.apple.pkg.X11SDKLeo
sudo pkgutil –forget org.x.X11.pkg
5. Once that’s done, reinstall the following two packages:
Install X11User.pkg from the Optional Installs metapackage, which is on the 10.5.6 DVD in the Optional Installs folder
Install X11SDK.pkg, which is on the 10.5.6 DVD in the Optional Installs/Xcode Tools/Packages folder
6. Restart.
Once that’s done, double-clicking /Applications/Utilities/X11.app should launch X11 and give you an xterm window.
