Category "Mac"


The XQuartz project released the 2.1.4 X11 update (requires Mac OS X 10.5.2).

Note: installation requires a reboot. Here are the release notes:

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 updates).

10.5.2’s version of X11 is somewhere between the 2.1.1 and 2.1.2 packages released through this site. The launchd mechanism to start X11 in 10.5.2 is unique to Apple’s 10.5.2 and never appeared in a release from this site in its current form (though it was essentially integrated into xinit for 2.1.2).

Installing versions prior to X11 2.1.2 onto OS-X 10.5.2 may work but is not supported.

The diff UNIX utility has been a great tool for me. It performs a task I need to do regularly, find the differences between two files. Unfortunately, despite using it regularly, I am still routinely puzzled by its output. To the rescue: a tool I already had installed, but didn’t know about.

opendiff

FileMerge.app is an application bundled with Xcode that can be invoked at the command line to display differences between files (or directories!):

$ opendiff path1 path2

This opens a very intuitive GUI to display the differences. (Wow! And I thought piping diff’s output to TextMate to use its diff mode was an improvement…)

You can even hook it into Subversion. By the way, the IDL Workbench has a similar tool built into it.

The X.org Wiki has a page for updates for XDarwin. I was still having some issues (with CURSOR) that these updates fixed. The two lines that will do the updates are:

curl -LO \
http://people.freedesktop.org/~jeremyhu/x11-apple/x11_update.sh
sudo sh x11_update.sh

UPDATE: it appears you should get your updates here now. I still have X problems, but things are definitely improving.

This is just one more piece of the X11.app puzzle in Leopard. Because /etc/X11 is gone in Leopard, the old way of configuring X11.app is obsolete. The new way is org.x.X11_launcher.plist. So the following,

defaults write org.x.X11_launcher app_to_run /usr/X11/bin/xlsclients

is the way to configure X11.app to not start an xterm every time it starts.

UPDATE: changed from xhost to xlsclients on the recommendation of this useful page (see the second page).

Quick Look is a handy feature of Mac OS X 10.5 ā€œLeopardā€. It allows you to view the contents of a file without actually opening it. I’ve found it extremely useful for browsing files.

Quick Look on a .pro file

Of course, out of the box, Leopard doesn’t understand IDL .pro files because ITT VIS doesn’t provide a real application for IDL (the .app files in the IDL distribution are just executable files, not directories in the form expected). Normally, an application provides a listing of associated file types and information about them in a .plist file inside its .app directory. Here is my attempt to provide a ā€œfakeā€ application that doesn’t do anything except associate .pro files with the plain text file type. To install, simply open the disk image and place the ā€œFakeIDL.appā€ in /Applications somewhere.

Also, in a related item, it’s possible to use Quick Look from the command line (although I generally use it from the Finder). The command is fairly simple, but generates a lot of messages. Here’s a simple script that cuts the clutter it. Put it in your path and call it like:

ql *.pdf

UPDATE: IDL 7.0 seems to have broken my FakeIDL.app. I’ll see if I can fix it.

This is an interesting article about using some of the new scripting features in Leopard’s Terminal to visually indicate which server you are logged into.

Terminal

I tried using Terminal again in Leopard, but soon went back to iTerm.

iTerm

I use iTerm with a prompt of

export PS1="\[\e]1;\h\a\e]2;\h:\w\a\e[34;1m\]\W\$\[\e[0m\] "

which uses the server name as the tab name and puts the server and path of the current tab in the window title bar. I set the color of the prompt to blue (as above) on local machines and to red on servers.

I upgraded to Leopard on Friday when it came out. (I admit it: I even stood in line and got a free T-shirt).

Mac OX 10.5 Leopard

I really like Leopard, but I couldn’t get widget programs in IDL 6.4 to work under it. The good news is that beta versions of IDL 7.0 seem to be just fine. Also, under Leopard, I end up with multiple X11 applications running when IDL (even 7.0) is running, so I’m not sure I have everything configured correctly (I can’t even find the system xinitrc anymore).

The best part of Leopard is that it seems to be so snappy. I have a fairly new Mac Book Pro so take it for what it’s worth, but everything seems to be much more responsive (I think Leopard makes better use of the graphics card and multiple code CPUs.).

UPDATE: It appears that using Tiger’s X11.app should fix it for now. Link.

UPDATE: ITT VIS has released a fix for this issue. See this tech tip. This works for me.

Ken Bowman, author of An Introduction to Programming with IDL, has been collecting tips for the Mac that would be of particular interest to IDL programmers at Mac tips and tricks.

Also of interest to Mac using scientists:

  1. MacResearch: Online Community and Resource for Mac OS X in Science has general resources for scientific programming on a Mac (with a few things about IDL).
  2. Mac OS X for Astrophysicists is a roundup of scientific tools for astrophysicists.
  3. OS X for Astronomers is a list of quick things to get your Mac setup to do astronomy.
  4. Apple – Software for Research is a list generated by Apple of software for search in the physical sciences.

There are many standard UNIX directories that are invisible to Mac OS X’s Finder. Apple assumes that your normal OS X user does not want to see them. There are three ways a file will be invisible to the Finder:

  1. Files listed in /.hidden are hidden.
  2. Files that begin with a dot are hidden.
  3. Files that have their invisible attribute set are hidden.

We can make all hidden files visible to the Finder, as well as show selected hidden files.

You can show all hidden files in the Finder, by doing

defaults write com.apple.finder AppleShowAllFiles YES

in a Terminal window. I don’t do this because it’s just too much information (replace YES with NO above to undo). For files that just have their invisible attribute set, try:

sudo /Developer/Tools/SetFile -a v /usr

You have to relaunch the Finder for this to take effect (Option-CMD-ESC, select Finder, and hit the ā€œRelaunchā€ button). This way I can turn on just the files/directories that I want to see regularly. Note: you can use Go > Go to Folder from Finder’s menu to go to any directory, even hidden ones. This is handy for directories I don’t visit regularly, but do want to browse occasionally.

Here’s a reference to some of the hidden files.

I updated the 1RM Dashboard widget for Mac OS X and gave it a permanent home. The only change to the widget itself is a bit cleaner interface (check out the 1RM page for a screenshot).

1RM Dashboard widget for Mac OS X 10.4

See previous post announcing the original version.

« newer postsolder posts »