Monday, March 28, 2005

Israel DST fix

Israel has no fixed "algorithm" for the starting and ending dates of Daylight Saving Time --- the Knesset sets new dates every few years.

Solution: download and install the Israel DST 2005 fix [entry on versiontracker.com] by Mitz Pettel. You will be logged out and back into your account upon finishing the installation, as Finder modification times (as well as the clock) will be affected by the fix.

Sunday, February 27, 2005

Firefox 1.0.1; Thunderbird 1.0.1

Firefox 1.0.1 (cross-platform open-source web browser) and Thunderbird 1.0.1 (ditto mail client) are now out. Informal G4 optimized builds (also good for G5) have been released: Firefox by "powerbook"; Thunderbird 1.0.1 by "ozjason".

Monday, February 14, 2005

DjVu plugin (2nd try)

DjVu is a highly efficient graphic compression algorithm that is in use by a number of libraries (notably our own Jewish National and University Library) for serving digitized content. A Mac OS X compatible browser plugin exists: it works fine with Safari. A bundled "DjVu plugin host" application allows opening DjVu documents outside browser environments: The developer version of Firefox I am using apparently cannot handle it, so I configured the "plugin host" to be Firefox's helper for DjVu documents.

Some examples on the web are here. A good one to play with is this illuminated 14th century Hebrew manuscript. And don't forget to have a look at the DjVu digital library.

People wishing to experiment with creating DjVu content should have a look at any2DjVu. Academics and other scholars wishing to see their own collections digitized in DjVu may be interested in bib2web.djvuzone.org.

DjVu plugin

DjVu is a highly efficient graphic compression algorithm that is in use by a number of libraries (notably our own Jewish National and University Library) for serving digitized content. A Mac OS X compatible browser plugin exists: it works fine with Safari. A bundled "DjVu plugin host" application allows opening DjVu documents outside browser environments: The developer version of Firefox I am using apparently cannot handle it, so I configured the "plugin host" to be Firefox's helper for DjVu documents.

Some examples on the web are here. A good one to play with is this illuminated 14th century Hebrew manuscript. And don't forget to have a look at the DjVu digital library.

People wishing to experiment with creating DjVu content should have a look at any2DjVu. Academics and other scholars wishing to see their own collections digitized in DjVu may be interested in bib2web.djvuzone.org.

Friday, February 11, 2005

Using iCal as musical alarm clock

There are various shareware utilities that allow running musical alarm clocks (so you can wake up to your favorite classical piece, pop tune, or rock track). I tried a couple such utilities, and had trouble with all of them for one reason or another. Also, since I already use iCal for calendaring, why yet another program just for week-daily alarms?

this macosxhints.com article finally answered my prayers. Executive summary:


  • generate an AAC (Advanced Audio Coding) music file from your favorite CD using
    iTunes
    change its extension from .aac or .m4a to .aiff (yes, that's actually wrong since AIFF normally is raw CD audio --- but apparently iCal plays them just fine!)
  • drop the file in the folder Library/Sounds in your home directory
  • now go to iCal, create a new event at your required alarm time, with a twist:

    • as the sound, pick the file you just selected
    • under repeat, pick "custom"
    • in the menu, pick "weekly", and cross the days on which you want it to ring
      (e.g. Sun, Mon, Tue, Wed, Thu, Fri, but not Sat)
    • press OK

  • And presto!

If you do not want your alarms to show up in your day planner, create a separate calendar "Alarms" for this purpose, and check it off in the "Calendars" pane of the main "View" Panel. The alarms will still ring, but won't clutter your view.

Thursday, January 06, 2005

Nvu: open-source web publishing

From the same open-source team that brought us Firefox and Thunderbird, there is now an open-source alternative to GoLive, DreamWeaver, and the like: Nvu (pronounce: "in view"). It's at version 0.7 right now and therefore not exactly bug-free, but even so it's an impressive piece of work. And you cannot argue with the price :-)

Saturday, January 01, 2005

Utility of the week: ClipboardSharing

[Hat tip: MacWorld weblog.] ClipboardSharing is a neat tool that allows sharing the clipboard between two users on the same computer, or between computers in the same RendezVous area. Neat for quickly passing back and forth snippets of text, URLs,.... between coworkers.

In addition, it allows you to use more than one clipboard on your own account. If you have two computers on your desk or you often thrash out text/programs together with a coworker, you may wonder how you ever lived without this program!

Graphing Calculator

A Mac OS X beta of Graphing Calculator is available here. (The story behind this product, which was coded by unemployed programmers who sneaked into Apple Computer's Cupertino offices after hours, is a must-read.)

Windows self-extracting (.exe) archives

MacOSXhints explains how to open a Windows self-extracting Zip archive on a Macintosh:

Sometimes you encounter a file on the Net which is compressed as a self-extracting zip-file for Windows only. Its file extension is ".exe". But you HAVE to have its contents, and you just can't open that .exe file! For instance, a PDF manual from Canon's site -- they tell you to open it with Acrobat, but they made it an exe, saving just 0.2 MB.

Well, there is a "dirty" way to open it. Just rename the file extension to ".zip" (and confirm the dialog), and open it with Stuffit Expander. It doesn't work with Panther's built-in zip-extractor (BOMArchiveHelper) -- so don't double-click the file, but choose "Open with > Stuffit Expander" from the contextual menu (control-click on the file). I tested this with Stuffit Expander 7.0.3, but my guess is that you can use almost any version...

You can also use the command-line utility unzip in Terminal -- in that case, you don't even have to rename the file. A simple unzip thisfile.exe is enough to get things going.

Macs and disks-on-key

A couple of people told me about problems transferring files between two Macs using a disk-on-key. It being a longtime article of faith of mine that only Microsoft would be capable of making a computer incompatible with itself, I checked this out myself. It turns out to be a pre-OS X relic.

In Apple's file systems (HFS and HFS+), files can have both a "data fork" and a "resource fork". The data fork speaks for itself: the resource fork could hold virtually any number of "resources", each with its own type (ie., icon, PICT, CODE, menu,...). Non-Mac-centric file systems such as FAT32 and ufs don't know the first thing about resource forks, so only the data fork gets preserved upon copying a file to them.

This is no problem for multiplatform file formats such as Micros**t Word, Excel, Powerpoint, GIF, JPEG, PDF,... --- these formats do not have resource forks so they can be copied over as is. However, the Mac-centric file formats of some older Mac-only applications (e.g., Nisus or Kaleidagraph) almost invariably exploited the capabilities of the resource fork.

The answer for such files is: make an archive of them (using DropStuff or the "Make Archive" command in the Finder), copy the resulting .sit or .zip archive via the disk-on-key, and then unpack the archive.

Thursday, December 16, 2004

Utility of the week: AppleJack

Through references in passing in a forum discussion about OS X software updates, I found out about a tiny but very useful open source utility called AppleJack. Running the utility installs a new command "applejack", which is hidden from normal system usage but available when booted in single user mode (i.e., with Command-S pressed down). [Most of the time, if your system is so messed up that you cannot boot graphically in OS X anymore, you will still be able to do single-user boot. You get a BSD-only text prompt, which makes Unix sysadmins go "aha!" and regular Mac users panic. "applejack" allows you to "jack up" your Mac and fix a "pantsher" [flat tire] without calling a garage mechanic :-)]

What it does is provide a simple text-based menu for a number of troubleshooting utilities which are part of OS X. Holding COMMAND-S down while booting, you will now see a line suggesting that you run "applejack". When you type "applejack" at the command prompt you will get the following options:
[1] Repair disks                                                                
[2] Repair permissions
[3] cleanup cache files
[4] validate preference files
[5] remove swap files
[6] reboot
[a] autopilot: steps 1-5 in sequence
[q] no thanks!
Steps [1] and [2] are basically the corresponding steps in "Disk Tools". [3]--[5] can be quite useful in getting a wedged or unstable system unstuck. [6] speaks for itself.

Note for sysadmins and other fellow geeks: the CMD-S have to be pressed on a keyboard DIRECTLY connected to the Mac. It won't work through a USB KVM switch (as I found out today ;-))

Tuesday, December 14, 2004

Resurrecting copy/paste

If you (like me) occasionally suffer from losing your ability to copy/paste after you've been logged in for a LOOOONG time, "aramis" at Mac OS X hints has the answer:
I may be an unusual case, but I have a repetitive problem with Apple's Paste Board Server (pbs) dying on a semi-regular basis. The main symptom is the inability to copy and paste between applications. Logging out or rebooting will fix the problem every time, but a less disruptive solution is to spawn a new copy of /System -> Library -> CoreServices -> pbs. Some apps will connect to the new server automatically, though many (notably Firefox and TextEdit) need to be quit and restarted before they start working normally again.

How can you tell if pbs is dead? Open a Terminal window and run:

ps x | grep pbs

If pbs is dead, you'll see something like:

350 ?? Z 0:00.00 (pbs)
22200 std R+ 0:00.01 grep pbs

If pbs is alive, you'd see:

350 p4 S 0:00.29 /System/Library/CoreServices/pbs
22200 std R+ 0:00.01 grep pbs

If you see (pbs) in parentheses, it's dead! Zombied to be technical. If you see the full path to pbs listed out, then pbs is running fine. If you see both, then chances are you've already restarted pbs manually at some point since you last logged out or rebooted.

If your pbs is dead, you can starte a new one. Just open a Terminal window and type:

nohup /System/Library/CoreServices/pbs &

The nohup keeps pbs running even after you close the current Terminal window. I got sick of restarting pbs myself, so I came up with the following script -- I named it newpbs, and keep it in /usr/local/bin:

#!/bin/bash

NEEDNEWPBS=`ps x | grep /System/Library/CoreServices/pbs | grep -v grep ; echo $?`

if [ "$NEEDNEWPBS" == "1" ] ; then
echo "PBS is dead. Starting a new one..."
nohup /System/Library/CoreServices/pbs > /dev/null &
osascript -e "tell application "Finder" to display dialog "Paste Board Server died and was restarted at `date`" buttons {"OK"}" > /dev/null &
fi

newpbs checks to see if there's a non-zombied copy of pbs running. If there isn't, it starts a new one and displays a dialog to let you know what happened. You can always comment out or remove the osascript line if you're rather not get the pop-up. In order to check for pbs' death every five minutes, I added this script to my crontab by running crontab -e, and adding the following line:

*/5 * * * * /usr/local/bin/newpbs

While I'm still trying to track down the process that's killing my pbs, at least this gives me some added convenience.

Saturday, December 11, 2004

TeX/LaTeX under Mac OS X

For scholarly papers, a fair number of us (yours truly included) still swear by the cross-platform LaTeX typesetting system rather than by Microzift Word or any of its competitors. (Often the feature we LaTeX-users love most about it is the one non-LaTeX users hate most: strict separation between content and formatting. LaTeX is basically a markup language like HTML, but with a kajillion more possibilities, especially in terms of mathematical typesetting and cross-referencing. A not-so-short-introduction can be found here.)

A comprehensive directory of LaTeX-on-the-Macintosh resources can be found here. The most popular Classic Mac OS implementation of LaTeX, TeXtures, is no longer being developed for Mac OS X: however, Mac OS X being basically a version of Unix, the most popular Unix implementation teTeX (which comes preinstalled on most Linux distributions) has been ported to Mac OS X virtually as soon as the latter came out. teTeX is open source.

The most convenient way to install it on a Mac OS X machine is probably Gerben Wierda's i-Installer for gwTeX. This is an interactive installer that will download all necessary pieces and install them. (The installations involve "compiling" the most common TeX formats.) If you choose this option, you should at minimum select the "TeX" and "GhostScript 8" packages. If you are planning to use figures in other formats than PostScript or Encapsulated PostScript, also grab "Freetype2", "libvmv and iconv conversion support", and "ImageMagick". You may also want to grab the "CM Super Fonts" package, which are fully scalable PostScript Type 1 fonts for the Computer Modern family (TeX and LaTeX's signature font).

Note that the "TeX" installation will take a nontrivial amount of time (5 to 15 minutes, depending on the speed of your CPU and hard disk). If you are concerned that the installation is stuck (in truth, it's doing plenty), turn on "Geek mode" and click on the "Subprocess output" tab. You'll see plenty of activity (probably gobbledygook if you're a (La)TeX novice).

Another alternative is to grab the "fat installer", a 60 MB download which already has the TeX and Ghostscript 8 packages bundled. A HTTP mirror is available here at Yale.

If you are an experienced TeX/LaTeX user and have accumulated a number of personalized style files/custom fonts/..., make a subdirectory ~/Library/texmf/ if it does not exist yet and install them in appropriate subdirectories there.

Now what you still need (unless you're even more of a Unix geek than I am :-)) is a graphical front-end. There are a number of alternatives: I personally use the open-source TeXShop (although some may prefer its spinoff iTeXMac).

Note that the default typesetting mode of these applications is pdflatex (since Mac OS X has native PDF support built into its windowing system). This is great for documents that do not involve figures (just text and math), but if you routinely include figures in your papers then you may want to change the default typesetting mode to "TeX+Ghostscript" in "Preferences".

Periodic table programs

If you are a chemist, you would probably like to have a Periodic Table somewhere on your computer desktop. And presumably something more than just a pretty picture: something with actual useful data in it.

If you have 24-hour internet access, WebElements
offers a wealth of information, as does ChemGlobe at the Swiss Federal Polytechnic (ETH Zuerich).

As for offline PToE programs, I own both Periodic Table X and Atomic Mac. The former has a pleasing interface and is customizable, the latter has a wealth of info (radionuclide decay trees, X-ray absorption, you name it).

Neither program has yet been updated yet for element 111 (eka-gold), which was just officially named Roentgenium. Some of the data used are "Caveat Emptor": I pointed out several errors in electron affinity data to the author of Periodic Table X some time ago. They did get fixed (thanks!), but it would be much nicer if either program maintained these data in a human-readable (and human-editable) file, so additions and corrections were possible without having access to the source code.

If your needs are more basic than mine, you can't go very wrong with the freeware Smell-O-Mints.

Utilities of the week: SlimBatteryMonitor, RCDefaultApp, PDF Browser Plugin

SlimBatteryMonitor offers Powerbook and iBook users a replacement for the battery menu icon. It has three different customizable display states: (1) running on battery; (2) running on AC, charging; and (3) running on AC, fully charged. For example, you can have the icon disappear altogether in state (3), be shown estimated time to fully charged in state (2), and time remaining in state (1). You can be shown numbers, or a graphical display on a battery icon: unlike the OS X built-in indicator, the battery icons can be turned vertical, so they occupy as little space in the menu bar as possible.

Desktop Mac users with certain UPSes (uninterruptible power supplies) can supposedly use SlimBatteryMonitor to monitor the UPS. I have not tested this.

The freeware RCDefaultApp adds a "default application for..." panel to System Preferences. This should have been part of OS X in the first place, as the present arrangement for, say, making Firefox your default web browser involves opening Safari (don't ask!) and changing it in the preferences there. But you can also change the default application in which a file with a particular extension opens --- in a much more intuitive way than the standard system interface (which goes via "Get info" in the Finder).

Those of us who need to read scientific papers for a living can barely live without PDF Browser Plugin. It is free for academic and noncommercial use (the first time you browse to a PDF file you will be prompted for your status). This plugin (which uses Quartz's native PDF capability) is only getting better with time. Keyboard navigation, zooming in an out, printing, saving as..., or opening in a choice of external applications (Adobe Reader, Acrobat if it's installed,...). All without leaving your browser. OK, it's not compatible with Microzift Internet Extorter, but who in their right mind would still be using the obsolete and Hebrew-crippled Mac version of that when you can have Firefox or even Safari?

Thursday, November 25, 2004

Hebrew Macintosh forums

I found the following Hebrew-language resources for Macintosh users (additions welcome):

In addition, there are at least two English-language lisst aside from Isramac:

  • Mac-Support list at Bar-Ilan University (restricted access)
  • Mac-Users list at Bar-Ilan University (unrestricted access, presumably membership limited to Bar-Ilan community)

Wednesday, November 24, 2004

Screen spanning doctor

Screen spanning is the act of running more than one independent monitor, which can be very nice if you need to preview web sites while coding them, or just need a lot of screen real estate. Powerbooks and G3 and G5 towers all support screen spanning out of the box. iBooks and iMacs have the feature crippled: the video output of these machines mirrors the main screen. This may be great for hooking a machine up to a presentation projector without configuration hassles, but leaves something to be desired for some users.

Screen Spanning Doctor offers a nondestructive way to disable the restriction, on machines with graphics cards that can handle the extra real estate (list of supported machines). It is basically nothing more than a script that sets some options in Open Firmware and resets the machine. I tried it on a 15" flat-panel iMac with a 15" external monitor added: the machine did appear to be less stable after the patch but this may have been coincidental, as its motherboard turned out to be faulty.

Virtual screens/desktops

Many former Unix users have asked me why Mac OS X doesn't have a "multiple desktops" or "virtual screens" feature, i.e. where one can flip back and forth between multiple "virtual desktops" (say, one which has your mail stuff, another in which you program, a third for web browsing,...). Actually, there is one family of commercial programs, as well as two freeware utilities, that allow this.


Codetek Virtual Desktop 2, Virtual Desktop Lite 3, and Virtual Desktop Pro 3 are the commercial offerings: see here for a feature comparison. I was a beta tester for version 1.0 of Virtual Desktop and, having only a 15" screen at the time, thought it was the best thing since sliced bread. I still run CTVD Lite 3 on my laptop, but have less need for it at work with an additional 20" screen. Unregistered versions are limited to two desktop (enough to check out what the code does): registered copies can handle as many as 100. One can flip between virtual screens using a pager (with miniature outlines of windows on each screen), or configure hotkeys: the Pro version allows switching by moving the mouse pointer beyond the screen edges.


Virtue is an open source project that presently stands at version 0.5.1. Unlike the pager-oriented CTVD, mouse-driven switching is the default mode of operation here.


Desktop Manager (interview with developer here) is likewise open source: it can be used with a pager, but its unique approach involves putting icons for the virtual screens in the menu bar. Clearly, this is only usable on wide screens, since on a 12" iBook or Powerbook with some menu extras loaded, there just ain't no room anymore in the menu bar.

Friday, November 19, 2004

Cell phones, iSync, Bluetooth, GPRS

The road warriors among us may be interested in the following possible with present-day technology (as more and more cellular phones have BlueTooth, and simple USB to BlueTooth adapters are available for Macs that don't have it built-in):

  • Syncing the address book/phone number list and iCal appointment calendar between computer and cell phone
  • Internet access via cellular phone


Apple has its own synchronization technology called iSync. The following cellular phone models available in Israel appear on Apple's iSync supported devices list: Sony Ericsson T630, Z600, and Z1010; Nokia 6600. [At the time of writing, Orange offers the T630 and Nokia 6600, Cellcom the Z1010, and the Z600 can be purchased from at least one independent vendor.] Several isramac list members report success with the T630, and a kind colleague of mine at the Technion reported success with the pricier Nokia 6600 as well as demonstrated that his Powerbook could use it as a GPRS modem to access the net. (Drivers and provider settings for various GPRS phones; see also this article.)

One known bug with the T630 (and presumably the Z600) and calendar syncing is that the T630 ignores "all-day" events: as a workaround, assign them times that last all day.

Several other Bluetooth phones available in Israel are not supported (yet) by iCal, but can be synced using third-party software, e.g. Phone Director for the Nokia 6230, or the bare-bones GSM Remote.

Finally, Bluetooth-savvy cell phones can remote-control many functions of your Mac using Salling Clicker.

UPDATE 1: Somebody even posted a modem script for Iridium satellite phones.

UPDATE 2: GPRS Script Generator

Firefox 1.0

Firefox 1.0 is finally out (simultaneously for Windoze 98 and up, Linux, and Mac OS X), and if you're only going to be using one web browser, I guess this would be the one. (You can even download a version with menus and help files in Hebrew, should you be so inclined.)

You may however have noticed that the browser is a bit sluggish on G4 and G5 Macs. That is, not really slow, but not as snappy either as one'd expect from such powerful CPUs. Of course, the official build was compiled for G3 processors, and does not exploit any of the additional capabilities of G4, let alone G5 CPUs.

Here you can download builds optimized for G4 (which will also work on G5, but probably not on G3 machines). ("Aviary" is the codename for the release version.) And here you can find G5 builds. Note that the icons on these builds look different from "official" builds (as required by the Mozilla team). ["Nightly build" junkies can get their fixes at these sites as well: Burning Edge blog details bug fixes and feature additions.]

I have been using the G4 "Aviary" build for about a week now on both my office and home machines, and it is every bit as stable as the original build and noticeably snappier.

Quick searches: It turns out that Firefox has a built-in functionality not unlike Sogudi. One can add keyword searches to the URL bar with very little effort. Essentially any Sogudi shortcut (collection here) will work if you replace '@@@' by '%s'. To add any of the following to your browser, right-click (or ctrl-click) on them, pick "Add bookmark", then select "Quick Searches". This will pick up the name and the URL. You will have to add the keywords manually by means of "Manage Bookmarks" and the "Properties" button there. Suggested keyword appears in left column:


















oed Lookup in Oxford English Dictionary (subscription required)
gnews Search in Google News
usd2ils Convert from US Dollar to Shekel
ils2usd Convert from Shekel to US Dollar
phone Example lookup in organizational phone book
wis Example Google on own site
mw Merriam-Webster dictionary lookup
mwt Merriam-Webster thesaurus lookup
wikip Wikipedia lookup
merck Search in Merck Manual of Diagnosis and Therapy
webbook NIST WebBook lookup
scirus SCIRUS Science search engine
scholar Search in Google Scholar
acs Open paper in ACS journal by 9-character code
vt Search VersionTracker
heb Babylon English-Hebrew dictionary
calc Opens expression calculator (knows PI, sin, cos, exp,...)

Tuesday, November 09, 2004

Cloning junk mail filters

Thought this might be useful for some:

I have iMacs at work and at home, both running OS X 10.3.x. One of them
was trained pretty carefully to filter out junk mail and did so quite well,
the other wouldn't recognize ANY junk mail.

Pawing into ~/Library/Mail, there was one file that I couldn't clearly
identify: ~/Library/Mail/LSMMap2. I Googled the name, and sure enough,
the following story came up:

http://www.macosxhints.com/article.php?story=20031207160555107&mode=print

Briefly, ~/Library/Mail/LSMMap2 is the "brains" of the junk mail
filtering system. To start junk mail retraining from zero, quit
Mail.app, erase the file, and relaunch mail. To copy over rules
"learned" on another computer, copy over that file from said computer
and presto.

Saturday, November 06, 2004

Safari Sogudi

For a really neat addition to Safari, have a look at Sogudi. It allows typable shortcuts for various sites and especially searches.

Example: defining the following shortcut as "heb"

http://online.babylon.com/cgi-bin/trans.cgi?layout=site.txt&lang=heb&word=@@@

and typing "heb feckless" in the URL bar will look up a Hebrew translation for the word
"feckless".

You can make similar shortcuts, where @@@ will be substituted by the 2nd and further words you type in. A Wiki-collection of shortcuts can be found here.

Remote system upgrades via terminal

Mike Bombich (of Carbon Copy Cloner fame) explains how to remotely carry out software updates via an ssh shell login.

  • softwareupdate -l lists all available software updates
  • sudo softwareupdate -i -a downloads and installs all available software. (You may need to do sudo reboot afterwards.)
  • sudo softwareupdate -i NAME-OF-UPDATE1 NAME-OF-UPDATE2 ... installs just that/those particular update(s)

Welcome to the Isramac blog

Welcome to the companion blog of the Isramac Email list. Check back here in the next several days for some solutions to frequently asked questions.