A blog named for the muse of Astronomy containing musings by an astronomer

Archive for the ‘MacOS X Annoyances’

Rebuilding a server for little fun or profit… 0

Posted on May 31, 2012 by Juan

Well, that sucked.  I had my computer start locking up when severing web pages.  Not a hard lock up, but all the httpd processes would become ‘uninterruptible’ and hang.  Eventually this prevented the server for feeding out webpages and required me to hard reboot (aka, push the power button) on the server to reboot it.

As such, I decided to do some spring cleaning and built up the server from scratch, luckily I had backups of everything.  Steps thus far:

  1. Break up a mirrored and stripped RAID array of four 2TB drives.  Given the mirroring didn’t seem to be getting me much more than having a simple second striped RAID of two 2TB drives as backup, I switched to two 4TB partitions.  Had to copy the data back onto the new RAID setup from the backup drive. Total time: 7 hours for first copy, then 7 more hours to make backup that used to be mirrored.  Net gain: I now have 2GB of additional drive space available, even with the backups.
  2. Backup the old boot drive to a backup partition.  Total time: 5 hours.
  3. Wipe a drive and install OSX Lion Server on it. Total time: 1 hour
  4. Copy user files and Applications from old drive to new boot drive.  Total time: 4 hours (but ran simultaneous to the second copy of the RAID mentioned above).
  5. Set up new server to clone itself to backup every day and let those backups run.  Total time: 3 hours.
  6. Setup new web server, including figuring out how Apple sets up server security certificates.  Total time: 3 hours.

It may seem like a lot of time invested, but really, most of the time has been spent copying data from backups… so I multitask and work on other things on my laptop while that is going on.  The big lesson I take away from this.  Having automatic nightly backups is ABSOLUTELY ESSENTIAL to making this kind of changes relatively quickly.  My resistance to making this kind of change would have been much larger if I thought I might lose data and didn’t think I could just switch boot drives and go back to my old set up in case I had screwed things up.

So at this point, I have checked, all my old applications seem to be running and the website is back up.  The only problem I have is that PHP doesn’t seem to be properly loading the SSH2 extension.

Papers2: Not ready for prime time 0

Posted on March 08, 2011 by Juan

papers2 really still a betaOne of the programs I use almost daily now that I am on sabbatical is Papers by Mekentosj B.V. Papers really helps you organize your reading, allowing you basically an iTunes-like interface for organizing PDFs.  While it originally seemed to be aimed at medical researchers, it has supported ADS abstract searches for quite some time.  Its ability to store metadeta outside the PDFs in a searchable database made it a powerful tool for me.

For the last few weeks, Mekentosj B.V. has been promoting the release of Papers2 and it has some really interesting new features.  The ones that stood out for me were:

  • Ability to attach other sorts of files (such as ASCII data tables) to a paper in the database.
  • The ability to search multiple online search engines (ADS abstracts and Google Scholar, for example) simultaneously.
  • “Magic Manuscripts” which basically seemed like a citation manager to integrate Papers into almost any writing environment.

This morning, I downloaded and purchased the update to Papers2.  It is clear the developers had some idea of how important Papers is to people in that they made the update create a whole new database instead of wiping out your old one.  You don’t even have to shell out any money, as Papers2 has a fully functional 30-day trial mode.  This means if you are a Papers user, trying out Papers2 is a safe thing to do.  And while I paid for the update (since I trust the developer to improve the product over time), I would suggest you NOT do so until you have throughly tested it, especially if you are a Papers user already.

Papers2 is a complete re-write, so problems were bound to exist.  This is after all a .0 release.  However, in a few hours of experimentation with Papers, I have found it to be much buggier than Papers.  Papers2 is also missing some features I had come to rely on.  The developers are clearly aware of this as one of the web pages they link to within Help menu of the app is a link to their “Future Roadmap,” a lot of which seems geared toward bringing features back that were in Papers.

Among the problems I have experienced this morning:

  1. Activation problems: The license I purchased is supposed to allow registration and activation of Papers2 on two computers.  The activation failed on the second computer and I have not heard back from their (probably overwhelmed) tech support about this yet.  I am sure this will be resolved as they have very good tech support, but it is annoying. [Tech support didn’t respond to my email but a re-attempt a bit later did activate my second copy of Papers2.  I suspect an overloaded activation server. – March 10 3:45 pm CST]
  2. No synching available, yet: I use Papers on my iPad to carry my collection of papers with me on the road.  Apparently, syncing, even though advertised in the app as a feature.  When I reported it, the response was that synching is not available until the next update of the iOS app (which has already been submitted to the Apple for review).  I understand that Mekentosj B.V. can’t control Apple’s App Store acceptance timetable, but then make it clear the feature is not yet available or is pending the release of the new version of the iOS app.  It does say this in small print, but it is not clear enough in my mind.
  3. Missing AAS citation template: Its a small thing, but of the 1400 citation styles built-in in the Manuscripts Preferences, only one is astronomical and it is not one I use.  The American Astronomical Society format (used for the Astronomical Journal, Astrophysical Journal, and Publications of the Astronomical Society of the Pacific as well as many conference proceedings) is documented, I’d like to see it added.  I suspect I can add my own, but it would have been nice for it to have been built in.
  4. Refreshing Smart Collections: I have a smart collection set up to identify all papers not already in a collection.  When I file a paper in a collection, this smart collection doesn’t reflect that until I either restart Papers2 or control click on the smart collection and say “Edit Collection” to re-setup the collection.
  5. GUI bugs: There are various GUI errors I have run across.
    1. Occasional Lockups in “Match to Repository”: Attempts to “Match to Repository” an article usually brings up a one line interface for attempting to match an article’s metadata, but occasionally the program doesn’t seem to respond properly.
    2. Metadata column disappearance bug: I have a reproducible bug [as shown in the video below] where if I use the “View Mode” button more than 3x on a given paper, it locks up with the “View Mode” button grayed out and disabled, no longer allowing you to view the meta data.  Furthermore, it is clear that this bug is stored in a preference file, because relauching the app leaves you with the same disabled View Mode button.  I have reported the bug to the support forums and have at least one other person seeing the bug there.  [WORK AROUND DISCOVERED: I have confirmed that if you move your mouse to the right edge of the window after the right metadata column has disappeared, you have the ability to drag the panel back open as suggested by “Good and Bad”in their comments in the support forum. – March 10 4:00 pm CST]
    3. Failure to reimport article: An attempt to connect a arXiv preprint to the final peer-reviewed paper produced an interesting bug.  The new paper was found, and when I try to add the PDF, it reports it can add it as supplemental material, but all choices I make produce a “error” beep and the program doesn’t offer a way out of this.  Makes importing articles dangerous.
  6. Searching for metadata is crippled: Searching for articles on the ADS abstract server appears to only allow searches by paper author and maybe title (this problem was also noted by Bryan Gaensler).  It is no where near as robust as searching in Papers, which allowed your to indicate the title, author, year, and other pieces of metadata for your search.  That said, this crippled search is on their list of “Missing Features” in their “Future Roadmap” so it is clear they are working on fixing this.  

    [I will note that my critique below, while valid for how poor the search capability is compared to Papers, may also be a bit unfair, since Papers2 has a very different approach to metadata matching.  In the days since the release of Papers2, the folks at Mekentosj have been releasing videos to better explain the new search approach.  There are two videos of note regarding this: (1) a tutorial video here that explains Papers2’s approach to metadata and  (2) a video illustrating how to use specific tags in searches.  I don’t know yet if BIBCODEs can be used with ADS searches, but it is clear that it doesn’t default to this and so it is still not as easy as Papers was in its searching, at least for astronomers. – Added March 13 12:15 pm CDT]

    But this problem also affects the ability to match papers to their metadata.  When the “Match to Repository” dialog is used, its ability to search is so crippled [as shown in the video below] that I have not managed to get and article matched to its metadata yet (since I can’t pull up the correct article to match it with.  This reduced search capability is also giving some people pause on the support forums.  “Jonathan” on that forum page stated something I agree with:

    It appears as though the developers tried to simplify and automate the matching process, but in doing so, oversimplified and compromised a critical function. Although I have been looking forward to the new version, I have had no choice but to revert to Papers1 until this is addressed (hopefully a.s.a.p.).

    “Matias” from Mekentosj B.V. does respond that

    We’re looking into this — degrading the matching user experience certainly isn’t the plan and we will either re-introduce the matching view from Papers1 or improve the automated matching behaviour in an upcoming update (most likely both). Please also keep Papers1 still around and only migrate once you’re happy with the experience that Papers2 gives you.

Because of the GUI interface glitches and the compromised matching ability compared to Papers (version 1.9.7), for now I will be sticking with Papers for my work.  Am I concerned about the future of Papers2?  Not at all! Mekentosj B.V. has had a very good record, at least as I have seen with Papers, of addressing bugs and adding features as time goes on.  I am sure, in a few month, Papers2 will be part of my arsenal for organizing my research reading and writing… but it is not there yet.

Snow Leopard for this Astronomer 2

Posted on September 16, 2009 by admin

I recently updated my laptop, an old Core Duo MacBook Pro, to Snow Leopard to test out the new OS. There have been a lot of little annoyances and a lot of little benefits to the move.

Some of the improvements I have noticed:

  • Snow Leopard is noticeably faster! I had thought it might just be fan-boy talk, but this operating system is in fact noticably faster at launching applications and the like. It is especially nice to no longer see the beachball every few minutes in the Finder. In fact, I don’t think I have seen that dreaded rainbow beachball int he Finder since upgrading!
  • Cisco VPN is built in! Like the iPod Touch, Cisco VPN networking is now built-in, so all I had to do was configure it as one of my network interfaces. Thank you Apple! If you previously had it installed, you can uninstall Cisco’s crappy little VPN client using the command:sudo /usr/local/bin/vpn_uninstall
  • QuickLook works in the Open/Save Dialog Boxes: Just as in the Finder, you can now hit the spacebar with a file selected in an Open/Save dialog box and you get a previous of the file’s contents. Sweet. QuickLook was probably the most useful feature I use everyday in Leopard, so I am glad to see it available in Open/Save dialog boxes as well.
  • I can see Hidden Files in the Open/Save Dialog Boxes: Credit this to MacOS X Hints, but in the Open-Save Dialog box, if I hit ‘Command-Shift-.’ (that’s a period), you can see the hidden files in a given directory. If you use your mac in a region where commas are normally used to as a decimal separate, you have to use the comma from the numerical keypad instead of the period. Very useful for people who edit .tcshrc or .bashrc files regularly.

Some of the annoyances I have been ironing out during the last week:

  • X11 now knows more about user environment: I use tsch as my shell environment. Apparently X11 on Snow Leopard loads the ~/.tcshrc file to set the system enviroment! I had a bug in the file that prevented X11 from launching. I was able to figure out it was local to my account by creating a test user account and launching X11 without a hitch. I was able to find the bad library path and fix it in the ~/.tcshrc and now my X11 works fine.
  • Battery Issues with Snow Leopard: I had issues with the battery under Snow Leopard. The battery life that was being reported was half what it had been before the upgrade. This seemed very odd to me, but the system profiler app insisted that after 183 charge cycles I had only 1949 mAh of power. So to ‘recalibrate’ I started up the computer after it went to sleep due to ‘low power’. It ran for another hour, reporting 0% battery the entire time. It then did a hard shutdown. I left it off and unplugged overnight, I then charged it full. It still reported only 1949 mAh total charge. I called Apple’s tech support which elevated the report to engineering. Then, after ‘safe booting’ the machine (see notes below), and booting back into my normal setup, I discovered the battery level was being reported as 4300 mAh, as it should be. Now, as of this morning, the problem is back again and System Profiler insists the battery has only 2870 mAh of maximum charge and it requires service. Not sure what the problem was, but a lot of people have been having similar problems with this particular battery and snow leopard.
    [Followup (added Oct. 23, 2009): Apple replaced the battery and the problem went away.  It is possible that the number of people reporting the problem is just indicative of a small percentage of users whose bad batteries were not obvious to them before Snow Leopard.]
  • Ethernet Issues with Snow Leopard: I had major issues with the ethernet connection dropping after a few minutes. Actually, it isn’t a full lost connection, I can still see computers on my subnet, and Skype seems to work, but a large percentage of websites fail to load and mail doesn’t work for off-campus mail servers. Quite a few other people were reporting similar problems on the Apple Discussion boards, but most of them resolved the problem by doing one of the following:
    1. Sometimes corrupt settings persist from a previous setup. Removing all the files in /Library/Preferences/SystemConfiguration/ and rebooting will purge all the system settings related to networking. You will also lose settings related to other things, such as Energy Saver settings, but it can help when you can’t isolate the issue. I tried this, it didn’t work in my case
    2. The other solution many people hit on was to create a new “Location” in the Network control panel. If you have a corrupt preference setting in your Location, creating a new one lets you start from scratch. Again, this didn’t work for me.

    After going through all this, I talked to an Apple product specialist and they hit on the idea to try bringing up the computer in ‘Safe Mode‘ by rebooting ahdn holding the shift key during the boot. Safe mode turns off the launching of all non-system deamons and agents as well as turning off the launching of all the programs you might launch at login via your Accounts preference pane “Login Items”. Lo and behold, after doing this, my ethernet connection appears to have been stable! What I did was

    1. I removed Adobe VersionCue CS3 from my launch items in the Accounts preference pane. Adobe noted it was incompatible with Snow Leopard anyway.
    2. I disabled the following launch items by moving them to my Desktop and then rebooting

    Having now brought the computer back up through a normal boot, the ethernet connection has remained stable. The fact that my battery issue seems to have been resolved almost simultaneously makes me think these apps were responsible. [Followup (added Oct. 23, 2009): I narrowed down the problem to an apparent incompatibility between Snow Leopard and the version of BIND my campus is using as a DNS server.  And it may be specific to my machine.  Not sure.  Switching to using OpenDNS as my DNS resolver made the issue go away for me.  My server, a Mac Pro, which I have upgraded to Snow Leopard, has exhibited no such weirdness.]

  • MacPorts Rebuild: I traditionally rebuild my MacPorts installation from scratch with a new OS installation. There were no major issues, but I took the opportunity to upgrade to the latest MacPorts and to try to rebuild with only the bare minimum of ports that I was using.
  • Many Mail Plugins Fail: Most mail plugins use ‘unapproved’ APIs and most of the Mail Plugins I used failed for Snow Leopard’s Mail.app. Furthermore, it looks like Apple has changed things so now every minor revision in the OS will require Mail plugin writers to explicitly approve the plugin for that version of Mail.app. This means in the future every minor revision in Snow Leopard will likely shut down Mail plugins until they get updated.
  • Force 32-bit compilation for IRAF in Snow Leopard: Doug Mink has discovered that compiling IRAF packages in Snow Leopard presented errors until he forced 32-bit compilation (I am assuming he was on a 64-bit machine). I am quoting his suggestions (sent to me via email) below:It turns out that Snow Leopard defaults to 64-bits and you need to add the -m32 flag to hlib$fc.csh and hlib$mkpkg.inc just like you have to for 64-bit Linux:

    In fc.csh (Juan’s Note: in Scisoft OSX, this is /Applications/scisoft/all/Packages/iraf/iraf/unix/hlib/fc.csh) after this:

    # Scan the argument list and concatenate all arguments.
    set args = ""
    while ("$1" != "")
    set args = "$args $1"

    add this:
    if ($MACH == "macintel") then
    print ("MACINTEL: -m32 flag set")
    set args = "$args -m32"

    and in mkpkg.inc (Juan’s Note: In Scisoft OSX, this is /Applications/scisoft/all/Packages/iraf/iraf/unix/hlib/mkpkg.inc for each IRAF package you want to recompile) :
    $else $ifeq (MACH, macintel) then
    $set    XFLAGS          = "-c -w -m32"  # default XC compile flags
    $set    XVFLAGS         = "-c -w"       # VOPS XC compile flags
    $set    LFLAGS          = "-Nz -m32"    # default XC link flags

That is my Snow Leopard report for now. More from the trenches and after I upgrade SciSoft OSX.

XQuartz on MacOS X for the Astronomer 0

Posted on May 28, 2009 by admin

When I first started this blog, I was using Apple’s built-in X11, but then with the transition to MacOS 10.5, there were some serious issues with Apple’s X11 implementation having to do with the transition from X11R6 to X.org. One of Apple’s programmers started putting out bleeding-edge updates to Apple’s X11 called XQuartz that fixed a lot of the programs and I have kept using it ever since.

Two years ago, I wrote a blog entry with hints for setting up X11 for the astronomer. The problem is that while the hints in that writeup are still valid, they don’t work if you are using Xquartz because the preferences are stored in a different location for XQuartz versus the built-in X11. As such, I am reproducing those X11 hints here, but with the edits necessary for use with XQuartz.

Once you have installed XQuartz, the X11.app should automatically launch when a program that needs X11 is executed (If you are an old hand at X11, you probably discovered since moving to Leopard that you should NOT set the DISPLAY variable to :0 to display an Xwindow on your primary display, just leave DISPLAY undefined.):

  1. There are many hidden preferences in XQuartz just like in many Mac Applications. You can see a list of the hidden (and not hidden) preferences using the command line tool defaults. To see the available XQuartz preferences, type:defaults read org.X.x11NOTE: If you are still using Apple’s built-in X11 implementation (or if you are using MacOS 10.4), just replace ‘org.x.X11’ with ‘com.apple.x11’ in all the following hints.
  2. In addition to “reading” the preferences, you can write to them. From the command line you can type:
    • defaults write org.X.x11 no_quit_alert true
      This allows X11 to quit without an alert box. Useful if you find it irritating like I do that X11 will prevent me from logging out or the computer from restarting due to that dialog box. However, this does mean you can accidentally quit X11.app pretty easily if you hit cmd-Q at the wrong time.
    • defaults write org.X.x11 wm_ffm true
      Allows which X11 window is selected to follow the mouse, which is the way X11 behaves under most *nix systems by default.
    • defaults write org.X.x11 wm_click_through -bool true
      This activates click_thorough events in the Quartz window manager, which allows clicks to pinned windows, another behavior common to *nix X11 installations.
  3. You can control which window manager is launched (if you prefer something other than the quartz-wm used by default). If you don’t have a ~/.xinitrc file, copy the default one:
    cp /private/etc/X11/xinit/xinitrc ~/.xinitc

    and then manipulate it with any text editor.
  4. BIG LAPTOP USER HINT: Because XQuartz on the Macintosh uses authentication to prevent connections from unauthorized sources to the X11 client, something interesting happens when you change IP address, you will discover you can’t use X11.app from the MacOS X Terminal until you quite and relaunch X11.app. This happens to me all the time on my laptop when I travel and the IP address changes. I recommend either using the Xterm as your terminal or just get used to restarting X11 if you have problems connecting to the terminal.
  5. You can run X11 remotely on your Mac, if you can ssh into your Mac, then just use
    ssh -Y youraccount@yourcomputer.com

    , the -Y flag should allow you to run X11 remotely as long as X11.app is running on your machine before the connection is made. If your ssh on the remote machine doesn’t support X11 connections and you have admin access, you can edit the file /etc/sshd_config on the remote machine and make sure X11 Forwarding is turned on by looking for the following lines and making sure they are uncommented and that all “no”’s are set to “yes”:
    X11Forwarding yes
    X11DisplayOffset 10
    X11UseLocalhost yes

And that is it for the hints for now.

X11 for Leopard now supporting Full Screen 0

Posted on March 30, 2009 by Juan

There are some older school astronomers on Macs who cut their teeth on Linux and as such really prefer the full-screen X-Windows display for running astronomical data reductions. This way of running X11 has been unavailable since MaxOS 10.5 (which switched from X11 code bases). Well, to quote Macros Huerta’s MacSingularity Blog:

Well, I’m way late to the game on this, but our long national nightmare is over – Xquartz for Leopard support full screen!

The Xquartz folks latest edition of Xquartz (version includes full-screen support. Now, personally, I like the way X11 integrates with Aqua, but for those who prefer to use only one windowing system at a time, you can now do it on MacOS X Leopard. You can download it here.

Now this is a cold snap 0

Posted on January 16, 2009 by admin

We have had a very cold winter this year. We had one cold snap in December where the nighttime lows dropped to -25 Fahrenheit (that’s -31 Celsius for the rest of the world). However, this new cold snap has been a bit more brutal with daytime highs of about -13 Fahrenheit (-25 Celsius) for the last 4 days. It was so cold yesterday morning (January 15, 2009) here in Moorhead that the temperature at the Moorhead airport dipped to -31 Fahrenheit (-35 Celsius) at 8:14am. At our house in town, the thermometer failed.
It listed the outdoor temperature as “OFL” which means “Off Low End” (I think)… so it was colder than -25 Fahrenheit (-32 Celsius). For fun, the kids and I went outside and decided to throw hot tap water into the air to create clouds. When you throw hot water into air that is this cold, it instantly vaporizes, forming a cloud. The video of it isn’t the clearest, but I think it is pretty cool.

Get the Flash Player to see the wordTube Media Player.

On YouTube I found “Sharon in Minnesota” used extremely hot water from a tea kettle and a spray gun, which makes the droplets much smaller and thus gives you a much clearer cloud.

Finally, a much clearer video of the phenomenon with a simple glass of hot water comes from this poor soul in Alaska where they are dealing with weather about 20 degrees colder than us.

I believe what is happening is an extreme form of what happens to your breath becoming visible on a cold day. The water when thrown suddenly gets a relatively large surface area (allowing cooling) and is scattered into small droplets. These droplets have enough energy to transition to a more solid state, which gives us a visible cloud of tiny particles of ice. A few of the larger drops make it to the ground. I’d appreciate some clarification.

MacPorts Misbehavior Update 0

Posted on December 05, 2008 by Juan

FreeType issues under Leopard Resolved: The MacPorts installation of FreeType will now compile a version under Leopard that does NOT throw a

The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().

error when fonts are used in PHP routines (fuller notes on this problem here although with my “hacked” fix, which is no longer needed). This problem as originally reported under Trouble Ticket #15909 on MacPorts.

Careful with that Apache2 upgrade, Eugene: I also discovered I have to be careful when updating apache2 under MacPorts in that it actually wiped out some of the configuration files stored in /opt/local/apache2/conf/, specifically it overwrote my modified versions of the /opt/local/apache2/conf/extra/httpd-dav.conf file and /opt/local/apache2/conf/extra/http-userdir.conf files. So now I am keeping copies of everything in /opt/local/apache2/conf backed up so I can roll back my changes after an upgrade of apache2 in MacPorts.

The One where I release Clear Sky Clock Widget version 1.3 0

Posted on October 24, 2008 by Juan

ClearSkyClock Half-Size Screen ShotEvery Semester in introductory astronomy we run a series of field trips out to the Paul J. Feder Observatory which lies about 14 miles from the MSUM campus. As such, I like to check the weather before going out there and usually do so with a quick look at Attilla Danko’s Clear Sky Chart website. It occurred to me it would be nice to see if a Dashboard widget to show the Clear Sky Chart existed. I found two. The one by Joshua Lynch worked well, but it had a major problem, it never listed the Paul J. Feder Observatory as a site I could examine. I ended up biting the bullet and looking at the code. Turns out Joshua Lynch released the code open source. Therefore, I felt free to start hacking on the Dashboard widget (learning how to program widgets in the process). The result is the Clear Sky Clock Widget (version 1.3). The key changes I made to the widget were:

  1. Fixed a parsing bug that prevented the loading of any Clear Sky Chart for sites containing parentheses or periods in their names. It was this bug that was interfering with the loading of our observatory’s Clear Sky Clock.
  2. Since the Clear Sky Chart is quite large and many people will use the widget on laptops with small screens, I added a “Half-size mode“. All you do is click on the “Toggle Size” link on the widget. This shrinks the charge and saves screen real estate.
  3. With Attilla Danko’s permission, I added a Built-in Legend (copied from his site) for interpreting the Clear Sky Chart to the widget. Just click on the charge and the legend appears. Click again and it goes away.
  4. I also added a link to the Clear Sky Charge site page, so if I wanted more detailed information, I can get it there.

I hope a few Mac-owning astronomers in the U.S. and Canada find this widget useful.

SAOImage DS9 5.3 released (fixes Leopard Firewall issues) 0

Posted on October 15, 2008 by Juan

The folks at the SAO have finally released a version of SAOImage DS9 (version 5.3) that plays well with the current version of the MacOS Firewall (as of MacOS 10.5.5) . Here are the links to the downloadable Mac-related SAOImage files

To quote the release notes on the SAOImage DS9 website, the changes in the newly released version 5.3 are

Regions: Regions now support a centroid function. The centroid function can be manually invoked or regions can automatically snap to a centroid when moved or edited. Regions now have a DASH line property.

Colorbar: Now supports a vertical colorbar layout option, via the View Menu. Users can configure the font type and size of the colorbar, via the View Menu.

GUI: Now supports a vertical button bar, when in vertical layout mode.

Aqua MacOSX 10.5 firewall: The MacOSX Aqua 10.5 Leopard port of DS9 can be used with the MacOSX 10.5 firewall enabled.

X11 MacOSX 10.5: There are now two versions available for X11 MacOSX 10.5 Leopard. The non-firewall version is recommended for all unless you wish to enable the 10.5 firewall. [Juan’s Note: While not stating this, they mean specifically the application-specific version of the MacOS firewall. See my notes on this problem here.] In that case, please use the firewall enabled version. Please note: this version consist of 2 files, ds9 and ds9.zip. It is very important that ds9.zip be placed in the same directory as the ds9 binary at all times.

Contours: Contours now have a DASH line option.

I have previously posted notes for integrating upgrades of DS9 into the Scisoft OS X installation and they still work just fine except that newer releases of Scisoft OS X place the binaries in /Applications/scisoft/i386/bin/ instead of /scisoft/i386/bin/ and if you are installing the X11 binary that is compatible with the firewall, you have to install both the ds9 and ds9.zip file in the bin/ directory of Scisoft OSX.

Fork()ing Problems with FreeType solved 0

Posted on September 05, 2008 by Juan

[The hack reported here for getting FreeType compiled under MacPorts in a fully Leopard-compatible way is no longer necessary as current versions of MacPorts properly handle this now.]

As I reported on my blog here, here, and here, I have been having problems with my PHP programs on my web server that use fonts crashing with errors of the form:

The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().

The problem turns out to not lie in PHP, but in Apple’s pre-installed FreeType which is compiled with “old font” support. This old font support is apparently old Carbon code instead of Cocoa (if I understand correctly, which I may not) and thus requires a forking of the process… which triggers this fault.

If you use MacPorts version of Apache and PHP (as I am now doing), you can fix this problem by editing the Portfile for freetype to disable old font support, recompiling it, and restarting your apache server. So following the hints in the MacPorts Bug Report #15909 I did the following:

Edit the Portfile located at /opt/local/var/macports/sources/rsync.macports.org/release/ports/print/freetype/Portfile changing line 50 to

#    --with-old-mac-fonts 
--with-fsspec=no --with-fsref=no --with-quickdraw-toolbox=no --with-quickdraw-carbon=no 

Now recompile freetype in MacPorts. To do this you have to force the uninstallation of freetype (which will cause much gnashing of teeth by MacPorts since freetype is required for several other ports.

sudo port -f uninstall freetype

Then recompile and reinstall freetype:

sudo port install freetype

And finally, give the apache server used by MacPorts a fresh restart to get it going with the new freetype libraries loaded.

sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper restart

Doing this fixed all my freetype issues and I was able to use my FinderChart program again. The only disadvantage is that if freetype is updated from version 2.3.7 in MacPorts (and no no-old-font variant appears), I will have to re-apply this hack.

Scisoft OSX 2008.8.1 released 1

Posted on August 27, 2008 by Juan

Scisoft OSX Intel 2008.8.1 was released about a week ago. I have been working with Nor Pirzkal for the last few months beta-testing this version and trying to make sure my concerns about the previous version were addressed. Nor’s blog post about the update states

There are a few changes in this version and all packages have been updated to the latest available versions. Starting with this version, Scisoft is installed in /Applications/scisoft (it previously was installed in /scisoft). Make sure that you remove any old /scisoft installation and properly update your startup files to source the Setup.csh or Setup.bash from their new locations.

In the README file you are told

Once the collection is successfully installed csh and tcsh users should invoke the command:

source /Applications/scisoft/all/bin/Setup.csh

to gain access to all the software and configure their environment correctly.

Users of the “bash” shell should instead use:

. /Applications/scisoft/all/bin/Setup.bash

Personally, to avoid problems in tcsh with a script breaking or with modifying my PATH multiple times by repeated execution of the Setup.csh script, I use the following line in my .tcshrc to first check for the existence of the Setup.csh script and SCISOFT environmental variables before executing it.

if (! $?SCISOFT) then
test -r /Applications/scisoft/all/bin/Setup.csh && source /Applications/scisoft/all/bin/Setup.csh

Permission Problems Persist
This version addresses all the issues I noticed with Scisoft OSX 2008.5.1 except for one annoying one, the reassignment of ownership of the enclosing directory on installation. If you installed the old version of Scisoft OSX, it would reassign ownership of the root (/) directory to the second user on the system (in my case, since their is none, it showed the user as “502”). I beta-tested various versions of Scisoft OSX but Nor was not able to stamp out this particular problem. I believe Nor has come to the conclusion after extensive testing that this is a problem with Apple’s software for constructing installer packages. By moving the Scisoft OSX installation to /Applications/scisoft, it is the /Applications directory that gets its ownership changed instead of the root directory, which is less damaging. However, I would strongly suggest checking the ownership of the /Applications directory afterward and if isn’t owned by an administrative user, set it as such using:

sudo chown username:admin /Applications

(where “username” is the primary administrative users username, in most cases, your username) to perform the repair.

A Quick-Fix for any Legacy Scisoft-related scripts
If you had a few scripts that relied on Scisoft OSX being located in /scisoft and you don’t want to edit them all is you can make /scisoft point to /Applications/scisoft. This can be accomplished by first moving the old version of Scisoft OSX before installing 2008.8.1 via the command line:

sudo mv /scisoft /scisoft_old

and then once you have installed the new Scisoft OSX in 2008.8.1, create a symbolic link from the old location to the new by typing (again from the command line)

sudo ln -s /Applications/scisoft /scisoft

This will allow any scripts that refer to items in /scisoft to continue to work for the most part.

What’s New?
An investigation of the /Application/scisoft/i386/Packages directory as well as the NEWS file reveals the following changes to this version of SciSoft OSX over the 2008.5.1 version.

  • DS9 updated from 5.1 to 5.3beta
  • FV updated from 5.1 to 5.2.1
  • ATLAS updated to version 3.8.2
  • MIDAS updated to 08FEBpl1.1
  • cdsclient was updated to version 2.87
  • OpenMotif updated to 2.1.32_compat
  • cfitsio library updaed from 3.090 to 3.090 (the current version is 3.100)
  • pango library updated from version 1.20.2 to 1.21.3
  • pixman library updated from 0.10.0 to 0.11.2
  • expat library updated from 2.0.0 to 2.0.1
  • fontconfig library updated from 2.3.2 to 2.6.0
  • freetype library updated from 2.2.1 to 2.3.6
  • gettext library updated from 0.14.5 to 0.17
  • gtk+ updated from 2.12.9 to 2.12.10
  • libpng library updated from 1.2.10 to 1.2.29
  • netCDF library version 3.6.2 added
  • pkg-config updated from 0.20 to 0.23
  • TclTk package updated from 8.4.13 to 8.4.19
  • wcstools library updated from 3.6.4 to 3.7.3 (current version is 3.7.5)
  • IRAF package rvsao updated t version 2.5.7 to 2.6.4
  • Python was updated to 2.5.2 and the following Python libraries were updated:

Minor Glitches
The only other minor glitch I noticed was that /Applications/scisoft/i386/bin doesn’t appear to have a ds9 binary installed. You can fix this by installing the X11 version of ds9 there or by linking to the Aqua version of ds9 that was installed using the command line

ln -s "/Applications/scisoft/i386/Applications/SAOImage DS9.app/Contents/MacOS/ds9" /Applications/scisoft/i386/bin/ds9

These Fork()ing PHP Woes continue 2

Posted on August 18, 2008 by Juan
What do you know, one reboot later and MacPorts Apache2 server with MacPorts PHP is throwing the same errors as the built-in PHP server. When I try to create a graphic using typography, I get
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
It wasn’t complaining before the reboot. Maybe Apple’s security kicked in after the reboot although for the life of me I can’t understand why. I’ve continued investigating and in Apple’s Discussion boards I found there was a string of comments about this problem. One user, Bill Eccles, seemed to isolate the problem and his description matches the symptoms I am seeing:
Finally, there’s a big problem with FreeType. As I discovered, anytime FreeType fonts are used by GD, they apparently make a Carbon API call of some sort. Problem is, Apache2 uses fork() without a corresponding exec() and, upon calling PHP/GD/FreeType, the Carbon call in FreeType causes Apache2 to crash. It shows up in the error_log as
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Mon Nov 26 12:38:11 2007 notice child pid 304 exit signal Trace/BPT trap (5)
and in the system.log as
Nov 26 13:12:00 shr-g5 ReportCrash664: Formulating crash report for process httpd659
Nov 26 13:12:02 shr-g5 ReportCrash664: Saved crashreport to /Library/Logs/CrashReporter/httpd_2007-11-26-131145_shr-g5.crash using uid: 0 gid: 0, euid: 0 egid: 0
I didn’t discover the cause–I can’t take credit for this one.
At this point he provides a link to a blog that was just reposting mailing list digests and as such got pulled down. I think I have found the original thread about the problem on the FreeType mailing lists here. Bill then suggests the following solution (this is not complete):
[I]nstall FreeType 2 without the Mac-specific extensions. These extensions make it possible for FT2 to access fonts stored in a font suitcase, something which is unnecessary if you use plain “.ttf” fonts from other sources. Here’s how I did that: Get FT2 and expand the tarball: (in Sources–my version of /SourceCache):
curl -O http://download.savannah.gnu.org/releases/freetype/freetype-2.3.5.tar.gz
cd ..
tar xvfp Sources/freetype-2.3.5.tar.gz
Configure FT2 and make it:
MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load" ./configure --with-fsspec=no --with-fsref=no --with-quickdraw-toolbox=no --with-quickdraw-carbon=no
sudo make install
Libraries end up in /usr/local/lib.
The funny thing is I have FreeType 2.3.7 courtesy of MacPorts, so I don’t know why the MacPorts installation of PHP is throwing the error unless it is not accessing the MacPorts version of GD. Actually, it makes complete sense. FreeType 2.3.7 in MacPorts is compiled with old font support (which is what triggers the problem). I submitted a trouble ticket requesting a variant of freetype be made available to disable old font support (which won’t work in Leopard anyway).
  • Translate

  • Astro Pic o' the Day

  • Archives

  • Admin

↑ Top