PrefPane complete

I just put together that preference pane for controlling XgridDRMAA grid selection. It’s pretty straightforward: it lets you browse for a grid advertised via Zeroconf/Bonjour, or specify a hostname/IP address, or just choose to use the standard Xgrid environment variables, which requires you to set them up elsewhere (in your shell configuration for command-line programs; in ~/.MacOSX/environment.plist for Mac OS X-environment programs). It looks like this (click for a version you can actually read):



If you click the top radio button, a simple network browser shows up in a sheet attached to the System Preferences window. It supports not just the usual local. domain browsing, but also any other available domains for those with wide-area Bonjour configured. The picture:



If you click the second radio button, you get this simple form:



Either way, when you click Continue, it tries to connect to the server. If authentication succeeds, then we don’t need a password, and we go straight to grid selection. If it fails, then you have to set authentication information (this one might look familiar):



Finally, you select a grid. The default grid is in bold:



When you click Finish, your settings are magically saved in the user defaults database. Except the password, that is: if you’re using password authentication, the password gets saved to the user keychain, so it’s not sitting on the hard drive in cleartext.

The settings are now reflected in a little text below the radio button:



Now, whenever an application starts an XgridDRMAA session, it takes these settings, which are set in NSGlobalDomain. They can all be overridden on a per-application basis, of course, using the standard NSUserDefaults API. But most DRMAA apps won’t even need to know they’re connecting to Xgrid. Or running on a Mac. That’s the idea, anyway.

This entry was posted in XgridDRMAA. Bookmark the permalink.

One Response to PrefPane complete

  1. charles says:

    nice!!!!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>