It was a dark and stormy night… Actually, I think it may have been mid-morning, but things were about to get… dark and stormy.
I was happily working away on yet another project when my computer, a MacBook running OS X 10.5, decided that it was time to upgrade several of my programs and do a minor update of the operating system. I was not quite ready to do that yet so I finished my project and then told it to go ahead. I went to get some water (did I ever mention that computers and water do not mix?) and I think I carried a few things upstairs.
Anyway, I was not gone long, but when I got back the job was done. So easy!
Are you holding your breath yet? I wasn’t. I did not expect any trouble, and oddly enough nothing happened… until last night, when I tried to open Gimp. Oops. Not only did Gimp not open, but neither did X11 the system that Gimp runs in. Well, that is a big problem since I use X11 for several other things also.
New version of X11
So I did a bit of research and found a new version of X11 (thanks Michael and Bill Scott). The newest version of X11 should work with the newest version of Mac OS X, right? Yes, actually it does, but I had something else going on.
Start X11 in Terminal
This thread suggested running X11 from the terminal to see what happened. So I ran:
dyld: Library not loaded: /usr/lib/libcrypto.0.9.7.dylib
Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
Reason: Incompatible library version: ColorSync requires version 0.9.7 or later, but libcrypto.0.9.7.dylib provides version 0.9.0
So, I looked up that error and the only thing I found was a post by Jeroen saying that my error was caused by an environment variable being set incorrectly. (Thanks Jeroen, without your post I would still be searching) Of course, that is all well and good if you can remember how and where you set that environment variable. I could not.
Changing Environment Variables
I eventually discovered that environment variables are set in .bash_profile or .bashrc which are hidden system files. Several sites suggested editing these files with “vi”. Trouble was, vi would not run either. Same error – second verse – a little bit louder and a little bit worse. 🙂
Then tomhennigan suggested opening these files in TextEdit. Wow! Cool! I did not know you could do that. One problem, I could not use the command line he suggested because of… (drum roll)… those bad environment variables. Of course, you can always open them the normal way if you can find them (hidden, remember).
Finding hidden files in OS X
Mac Help had the answer for that under “Specifying criteria in a search window.”
In a search window, click the Add (+) button in the location bar, or click the Action button in the search window, and then choose Show Search Criteria.
Some files used by Mac OS X are not ordinarily visible. To search for hidden files, choose “Other…” from the first menu and then select the “File Invisible” checkbox. In the related menu, choose “Visible Items”, “Invisible Items”, or “Visible or Invisible.”
So I found the file and opened it…. and guess what the problem was?
An old version of rminstall
A little over a year ago I tested out several tools for coding and running programs in Ruby on Rails. Several of them required me to work inside terminal and also to define environment variables. Yup, I had added a single line to my .bash_profile and that line called a file that set-up all the environment variables for rminstall. I removed that line saved the file and voila! It worked!
Focus Follows Mouse in Gimp and other X11 applications
While I was out and about I rediscovered one other thing that will make Gimp easier to use. This will make it so you do not have to click twice every time you change windows in Gimp. If you have this problem, you know what I mean. If not, don’t worry about it. Here is the fix: Add “wm_ffm” = YES (boolean) to ~/Library/Preferences/org.x.x11.plist.