Urania

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

Archive for the ‘MacOS X Annoyances’


Google Calendar adds CalDAV! Still twitchy however. 0

Posted on July 28, 2008 by Juan

Finally there is a free way to synchronize your Google Calendar and you iCal! Google has added support for CalDAV! So if you are running Leopard, you can now (in theory) synchronize iCal and GCal without paying a third party or pulling out our hair for some of the private solutions The detailed instructions for getting iCal talking to GCal are here.

Unfortunately, it looks to to be as twitchy as running your own Darwin Calendar Server. I’ve been using CalDAV on my own personal server for a few months and I have to admit it has been a bit twitchy, but getting better as time rolls on. I tried to synchronize this afternoon to Google Calendar and got the following error:

The server responded with
"HTTP/1.1 500 Internal Server Error"
to operation CalDAVWriteEntityQueueableOperation.
I got this error when trying to create a new calendar in Google from iCal. This is actually a documented error, but it didn’t go away for me like Google suggested it would. I am also getting that error when I try to import items into my GCal calendar via an “import” of the ics file I “exported” from my old calendar. I saw this same error on my server some time back. I needed to update my Darwin Calendar Server source code before I could fix it. In any case, I hope this is only a temporary issues since I could be very happy with the idea that I can now drop the maintenance of Darwin Calendar Server on my own computer and hand that task over to Google.

Followup (July 30): I noticed all of the errors occurring during the import were for old classes last semester. So I forced my way through them by clicking “Revert to Server” for every one of the errors. There were probably 20 of them. Once done, I compared my calendar on my computer and Google’s Calendar, they were identical. So for now, it looks like GCal’s CalDAV server may serve my needs after all. I could have avoided all this by directly importing my ics file into Google through their web interface.

Followup (August 27): So I got an iPod Touch and discovered that CalDAV calendars are loaded on the iPod Touch as “Read-only”. If Apple really wants to back CalDAV as a standard, you would think they would support it more fully on their own products. For now, I found that BusySync works quite nicely for syncing my iCal calendars with gCal in such a way that the calendars are hosted on my Mac and the iPod Touch then can treat the calendars are read-write. This, along with the lack of native ToDo list synchronization on the iPods are about the stupidest bits of inconsistency I have seen in using the iPod Touch. Luckily the ToDo list being missing from the iPod Touch doesn’t affect me as much as I am using OmniFocus, which works very well on the Mac and iPod Touch and allows synching between both.

SAOImage DS9 5.3beta and the Leopard Firewall, Redux 0

Posted on July 23, 2008 by Juan

I can attest the Aqua version of SAOImage DS9 version 5.3beta does indeed play nice with Apple’s dopey firewall behavior (see here for notes on version 5.2’s incompatibility with the Leopard firewall). However, the command line version that uses X-windows DOES NOT play nice with the Leopard Firewall. If you run the X-windows version of “ds9″ on a Mac running Leopard’s built in Firewall in “Set access for specific services and applications”, you will end up with a completely hosed ds9 executable which will not launch ever again.

As such, for now, since I prefer the X-windows version of SAOImage DS9, I am leaving the the Firewall off for now, I’m not too concerned.

Xquartz 2.2.3 released 0

Posted on June 26, 2008 by Juan

I was trying to upgrade wine within MacPorts when I realized I had forgotten to upgrade Xquartz after my upgrade to MacOS 10.5.3 on my Mac Pro. So I checked, Xquartz has been upgraded to version 2.2.3. Since version 2.2.1 (which I talked about in my blog here).

  • Upgraded the freetype library to version 2.3.6, which fixes “A bunch of potential security problems have been found [and fixed in this release”
  • Upgraded to pixman library to version 0.11.4.
  • Xquartz fixes from xorg-server-1.3.0-apple21, the key fix being support for monitor hotplugging, although several security fixes also occurred.

Again, if you upgrade MacOS (say to version 10.5.4, which is supposed to be released soon in order to support iPhone G3 and MobileMe), you will likely need to reinstall Xquartz (unless Apple has upgraded their X11 installation to match Xquartz).

Finally a way to view PDFs inline in Firefox on Intel Macs 0

Posted on June 18, 2008 by Juan

I have been an avid Firefox user for quite some time. But when I moved to Intel-based Macs, I discovered that that Schubert’s PDF Browser Plugin didn’t work on Intel Macs (except if I placed Firefox in Rosetta mode, running its PPC code in emulation). hat project appears to have died on the vine, with no updates in abut 2 years. Furthermore, Adobe has insisted on making its inline PDF plugin Safari-only. This always struck me as rather redundant, since Apple has used Mac OS X’s Quartz graphics engine to allow viewing of PDFs inline in Safari. This, combined with Firefox’s longer launch times, made me slowly shift to using Safari about 80% of the time.

Yesterday, Firefox 3 was released. I have been using the betas for the last month and have been happy with its improved speed and functionality. Its part of the reason I am back to about a 50/50 split in Safari vs. Firefox use. Today, the other show fell in the form of this posting on MacOS X Hints:

There is now a Firefox extension named firefox-mac-pdf, available for Firefox 3 under OS 10.5 that utilizes the built-in PDF support in OS X to display PDFs in-browser. In my testing, it appears to work very well. It doesn’t have the nifty fading bezel that the Safari PDF viewer does, but it supports all the same keyboard shortcuts and you get the standard Mac OS PDF contextual menu when you control-click on a displayed PDF.

Its interface is not quite as easy to use as Schubert’s plugin, but it works. I now have inline PDF viewing in Firefox and things are better in the world again.

Saving PDFs: The one issue I noticed is there was no seemingly obvious way to save the PDF once you were viewing it. Nothing in the contextual menu allowing “Save as…” for example. Turns out it was easier to save the PDF than I imagined. In the “Issues” page for firefox-max-pdf I found this exchange which included the solution:

Currently there are two ways of saving the PDF:

  1. File->Save Page As menu
  2. The apple-s (command-s) keyboard shortcut

SAOImage DS9 versus Leopard Firewall 2

Posted on April 22, 2008 by Juan

Immediately after installing SAOImage DS9 5.2, I had a major failure of the application and initially I just thought it was some sort of build bug. This is what I posted at that time:

[HOLD OFF ON THIS UPDATE! I have discovered that at least on one of my systems, this version of ds9 is refusing to run properly. It launched once, but when I attempted to check the “About SAOImage DS9”, it triggered the following error:

 “An internal error has been detected local header mismatch couldn't open “zvfsmntpt/doc/sun.gif”: no such file.

(this occurred in both Aqua and X11 versions). Furthermore, all future attempts to launch ds9 (again, either Aqua or X11) fail with the following error:

Error in startup script: couldn't read file “./zvfsmntpt/src/ds9.tcl”: no such file or directory  

Even removing the preferences file at ~/.ds9.prf didn’t help.]

Apparently, my problems with SAOImage DS9 in Leopard are a known issue. If you configure the built-in Firewall to “Set access for specific services and applications” so that you can approve “holes” in your firewall on an Application by Application basis, your first launch of SAOImage DS9 will irreparably damage the application!  Unfortunately, Apple implements the application firewall in part by modifying the Application package of the Application you are running by digitally signing it if it was not digitally signed by the developer (adding a file called CodeResources to the Application package). According the Apple’s documentation on this:

If you run an unsigned application not in the Application Firewall list, you will be presented with a dialog with options to Allow or Deny connections for the application. If you choose Allow, Mac OS X 10.5 will sign the application and automatically add it to the Application Firewall list. If you choose Deny, Mac OS X 10.5 will sign the application, automatically add it to the Application Firewall list and deny the connection.

So basically,Apple doesn’t warn you in the dialog box that comes up that it has whatever decision you make, it will modify the application by digitally signing it and it doesn’t give you a way to avoid this. This is, in my opinion, is an incredibly boneheaded move on Apple’s programmer’s part. They readily admit that

  Some applications check their own integrity when they are run without using code signing.

They suggest the application firewall will try to automatically detect these and avoid modifying them, but they should give you, the user, the option instead of making the decision via some internal algorithm.  MacOS X shouldn’t assume its OK to change an application. In the case of SAOImage DS9, they are irreparably damaging the application without leaving you a way to avoid the damage once you trigger the application firewall. Shame on you Apple. The only way to fix it is to reinstall the application!

So when I figured this out (a tip of the hat to this post on IRAF.net). I reinstalled the SAOImage DS9 executables (both Aqua and X11 versions) and before launching them, I set the Firewall (via the Security Pane of the System Preferences) to “Allow all incoming connections” (this is the default mode, so it is as secure as MacOS Tiger was). Everything now appears to work just fine.

Personally, I believe an application that fails its checksum should present a message indicating that is the problem instead of just crapping out, but in this case, the fault lies mostly with Apple. Apple is damaging applications by making this critical decision in the background, without user intervention!

LaTeXit Updated for Leopard Compatibility 0

Posted on April 16, 2008 by Juan
One of my favorite little programs is LaTeXit.  It allows you to typeset LaTeX equations outside of a text editor and then drag the results into programs like Keynote or Pages.  It was not fully compatible with Leopard and my fix was a kludge that could break other programs.  Pierre Chatelier has released updated LaTeXit to version 1.15.0, which restores Leopard compatibility.  Notably, you can now use the default0 /etc/profile file without fear.

XQuartz updated to version 2.2.0.1 1

Posted on April 14, 2008 by Juan

[This originally linked to version 2.2.0, but there was a security related bug in version 2.2.0, so this release has appeared to replace it.]

The Xquartz folks have updated Xquartz to version 2.2.0.1. Xquartz is an effort to provide a better X11 server for Leopard than Apple provides, being proactive in providing fixes Apple will likely include later. The release notes are long and cover a bunch of updates to various items, including:

  • Added informational output when falling through to failsafe startup in X11.app
  • Unsetenv(DISPLAY) when falling through to failsafe startup in X11.app
  • Exposé now works as expected
  • X11 works better with spaces

I suspect the discussion of ‘failsafe’ startups is to provide a more informational failure than what was happening before for people like myself who transitioned from previous MacOS X installations and had been manually forcing the DISPLAY variable to point to :0.0, which is somewhat standard in the Unix world.

I’d recommend grabbing this Xquartz update and applying it if you use Leopard and astronomical software. Its a double-click install. Apple does watch this project (one of the developers is Apple’s X11 developer), and as noted on the Xquartz site:

Apple included some of the work done in this project in their 10.5.2 update and will likely include further changes in possible future updates of 10.5.x. It is suggested that you install the latest XQuartz release after updating to 10.5.2 (and any future 10.5.x or security updates).

In other words, while some of these fixes will likely end up in the official MacOS released by Apple, if you want them now, use Xquartz. Furthermore, since Xquartz does over-write Apple’s default X11 install, this means that if Apple upgrades X11 in a future patch, you could end up with a broken install if you used Xquartz. Personally, I haven’t had a problem, but I suggest you keep the Xquartz package around, and re-install it after any future MacOS X updates.

osxutils now fixed on MacPorts under Leopard 1

Posted on April 10, 2008 by Juan

I got an email today noting that osxutils now installs correctly in MacPorts under MacOS 10.5 Leopard.  I have tested it and this appears to be correct, the commands:

sudo port -d selfupdate
sudo port -d sync
sudo port install osxutils 

did indeed install osxutils as promised.   I also noticed they upgraded from version 1.6 to 1.7, maybe that was all that was necessary.  All the MacPorts packages I used in Tiger now work in Leopard. Now if I could only get a proper recompile of PHP working under Leopard.

Leopard’s path_helper seems a bit buggy 0

Posted on March 25, 2008 by Juan

I am having an interesting problem. In my last post, I noted that on some Macs with Leopard installed, deactivating the lines calling /usr/libexec/path_helper in the /etc/profile file fixed LaTeXit hanging at launch. A bit more investigation by Antonio Molins (posted in the comments to that post) revealed it was possible to add an ASCII file in the /etc/paths.d directory. We could create a file called /etc/paths.d/macports containing the only the line

/opt/local/bin
and it should automatically add everything in macports to most user’s PATH variables. However, when I tried this, all my calls to /usr/libexec/path_helper -s always locked up the command.

Some further investigation revealed new user accounts on my Macs didn’t have this problem. I surmised that since I was setting up the PATH and MANPATH variables in my environment at login, that this could apparently lock up path_helper. Since I use tcsh by default (instead of Apple’s default bash shell), I issued the following two commands from the command line

unsetenv PATH
unsetenv MANPATH 

and sure enough path_helper worked without an issue. So something is buggy in path_helper, or at least hypersensitive to pre-existing PATH environmental variables. I’ll have to investigate this more later. One thing I did discover is that

/usr/libexec/path_helper -c 

will produce the commands to set up tcsh’s environment.

/usr/libexec/path_helper -s 

returns those for the default bash shell.

A fix for LaTeXit under Leopard 4

Posted on March 08, 2008 by Juan

[A better fix to this problem is to upgrade to LaTeXit 1.15, which was released on April 16, 2008.  It fixes the problems with Leopard and allows you to keep the default /etc/profile file for Leopard.]

Apparently, LaTeXIt, which I use to generate equations with Latex which can then be copied into Apple’s Keynote and Pages documents, locks up on launch a vanilla install of Leopard. This post on MacOSXHints.com provides a hack, but it wasn’t that nice, since it involves re-installing a particular version of latex. It turns out the solution was really much simpler and shows up in the comments on that page. In the comments, user Paolo Bosetti notes that

There is actually a much easier workaround: simply change your /etc/profile commenting the following lines (add the “#” at the begining):

# if [ -x /usr/libexec/path_helper ]; then
# eval `/usr/libexec/path_helper -s`
# fi

and adding the following two:
PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/local/bin:/usr/X11/bin"
export PATH

Why so? Apple changed the Leopard way to set the PATH variable, and now it uses the /usr/libexec/path_helper command, which seems having troubles with LaTeXiT spawned bash scripts. If you make this modification to your /etc/profile, you are simply dropping the new path_helper in favour of the plain old way to set the PATH variable.

This also explains why I wasn’t seeing this on my laptop, since it kept the old /etc/profile file during the upgrade.

Another user comments that the fix could also be done without hacking the /etc/profile but instead just changing ~/.profile such that /opt/local/bin appears in the path last, since /usr/libexec/path_helper is supposed to read ~/.profile. However, I was unable to get this approach to work.

A fix for Leopard’s messed up “Self-Tuning” Networking 1

Posted on March 06, 2008 by Juan

Since switching to Leopard on my server earlier this week, I have noticed that file transfers over the Ethernet LAN at work are insanely slow. I frequently synchronize files (over AFS File Sharing) over an Ethernet LAN between my server and my MacBook Pro. My MacBook Pro has been running Leopard for several months while my server was running MacOS 10.4.11 until this week. Having been happy with Leopard on my MBP, I decided to upgrade my server. Since then, file transfers between the two computers have been a royal disaster. When I initially connected I was getting speeds of up to 1.5 MB/s, but it quickly drops to 30KB/s or less. This was much less than the 10MB/s speeds I was typically seeing before upgrading my server to Leopard. I couldn’t quite figure out the pattern. It did seem the speed uploading files to my server was not as affected as downloading from my server.

Given the fact I didn’t see any file transfer issues between the two computers before upgrading the server to Leopard (MacOS 10.5.2), I suspected the issue was solely with the server (or possibly due to the communication between two computers running Leopard). On a hunch that the “self-tuning” networking heralded (quietly) on Apple’s Leopard Features page might be the problem, I tried to turn it off by tinkering with the “Advanced” settings in the Network Preference Pane. Specifically I changed the settings to look like this:

Network.png

Notably, I forced the configuration to be manual (instead of “Automatic”), I set the “Speed” to “100BaseT” which is my LAN’s speed (instead of “autoselect”), and I set the “Duplex” to “full-duplex” without “flow control”. I left the “MTU” at “Standard (1500)”.

Making these changes seems to have done the trick. For the last hour my network has maintained speeds of about 10 MB/s on download, something it hasn’t been able to do for the last few days. I suspect Apple has some work to do on their “self-tuning” Network code.

[Followup Post: Yes,this pretty much fixes my network slowdowns. I just did some Bandwidth tests online, I'm back up to my pre-Leopard speeds.]

Making Leopard PHP a better PHP by adding GD support 5

Posted on March 04, 2008 by Juan
The nice thing about MacOS X 10.5 Leopard is that it comes with PHP 5.2.4 pre-installed. Unfortunately one of the features Apple choose not to compile in was support for the GD graphics library, which I use extensively. Furthermore compiling in new features has proven to be somewhat troublesome. When I tried to configure PHP 5.2.5 on my Leopard box which the following commands (a variant of the configure command I would issue under Tiger with no complaints):

The result was a failed configure due to an error in mysql configuration. I pinned this down to a request for a library at /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib which is actually located one directory up. This can be fixed via the command line using:
cd /usr/local/mysql/lib
mkdir mysql
cp libmysqlclient.15.dylib mysql/libmysqlclient.15.dylib
Then the ./configure worked just fine. Unfortunately, when I did a
make
make test
to compile the PHP and test it, there was no happiness. There were over 50 errors, some of them major. Crud. This is just the setup. See, all I needed was GD graphics library support in PHP for my website. Well, after googling for some time for some master hacker’s notes on getting PHP 5.2.5 to compile on Leopard, I discovered a fellow named Hill Pei had hacked GD support into the Leopard PHP without too much effort. His method simply requires some comfort with the command line and editing text files. In five minutes, I had GD support with Leopard’s built-in PHP. Excellent! [Despite a report in the comments to the contrary. This still appears to be necessary if you apply Security Update 2008-002, which installs PHP version 5.2.5. In which case, you should grab the php 5.2.5 code and work from there. I can confirm Hill Pei's instructions do work after Security Update 20008-002 if you grab the PHP-5.2.5 code instead of 5.2.4 as he suggests.]


↑ Top