Archive for February, 2007

Cool software roundup

Here is a partial list of some of my favorite open source tools at present that I suspect are relative well-kept secrets:

  • Synergy: share a single mouse and keyboard between multiple computers
  • Cacti: generates pretty RRDtool graphs of your snmp data (network traffic, CPU utilization, etc.), and keeps historical records of this data
  • RT (Request Tracker): flexible ticket tracking system that you can use via a web interface and/or via an email gateway. RT includes a robust model for assigning granular permissions, allowing you to provide access to a “self-serve interface” for customers where they do not have permission to do more than simply view the status of tickets they opened, limit users to specific queues, etc.
  • Darwin Calendar Server: CalDAV server for storing calendars published through compatible clients (e.g. Mozilla Sunbird, iCal in OS X 10.5, Chandler, Mulberry, etc.) and allowing multiple users to write to the same calendar. See this post for more information.
  • ClusterSSH: invaluable tool to control multiple computers simultaneously over an SSH session.
  • WordPress: the number one blogging tool, also makes a very slick CMS which many NetMusician customers have used with success.  (Okay, this one is not really a well-kept secret, but its usage as a CMS may be…)
  • TinyMCE: cool Javascript based WYSIWYG toolbar for textareas in forms allowing users to generate HTML.
  • Mediawiki: the Wiki that drives the Wikipedia, makes for a great sketchpad and vehicle for providing documentation to users.
  • Gallery: awesome generator of web-based photo galleries you can use with several Desktop clients, and embed into WordPress driven pages via the WPG2 plug

look for my future post listing tools I’ve found invaluable to running OS X

Published in: open source software | on February 19th, 2007 | No Comments »

Sharing personal calendars, allowing subscribers writable access

Using a CalDAV complaint calendar server such as Apple’s Calendar Server or Cosmo with a CalDAV savvy client such as Mozilla Sunbird, Apple’s iCal (as of 10.5), Chandler, or Mulberry, users can share calendars by publishing them to a CalDAV server such as the ones listed here, and CalDAV complaint clients such as the ones listed here can subscribe to these calendars, and even make changes to password protected calendars.

Prior to the emergence of CalDAV, applications like the current version of iCal allowed users to publish their calendars to a WebDAV complaint server, but subscribers to these calendars were only able to read, and not write to these calendars. The CalDAV protocol provides the foundation necessary to overcome this and other obstacles in bringing these solutions closer to the funcionality offered within Microsoft Exchange.

Each of these respective servers and clients are generally of experimental (i.e. unstable) build quality, but certainly Apple seems committed to releasing their server in at least a semi-finished state, and the next version of iCal is expected to play nicely to this server. However, development in products like Chandler seems fairly constant (a preview release promised in Spring 2007), and Mozilla Sunbird seems like a decent, albeit expectedly buggy product for a 0.3 release at the time of writing.

I’ve been testing running Mozilla Sunbird with Apple’s Calendar Server (which I managed to get running under Gentoo Linux, I’m having problems building it under FreeBSD), and so far, while Sunbird clearly lacks a sense of refinement, the basic mechanism seems to work just fine. Apple’s Calendar Server seems pretty simple in its setup and installation (although it does not yet include an init.d script to run under Linux/Unix), but also seems to work just fine. Its data store requires a xattr partition, I had to include a “user_xattr” flag in my /etc/fstab file in my /usr partition (where I opted to maintain this data store), but in some cases some users may have to make adjustments to their kernels.

Calendar Server will support authentication against a flat XML file, or against a variety of directory services. I have not tested auth against a directory service yet, but in providing this feature it seems that Apple has some enterpriseish markets in mind… very interesting. It does not appear that Calendar Server will allow authentication against a Kerberos server, at least not yet.

Once a user has authenticated successfully to the Calendar Server, all of the necessary files in the user’s data store are created on the fly. I have not tested advanced features such as free/busy and sharing among other Calendar Server users.

I will be sure to post follow up reports regarding Calendar Server as I gain more experience with this software.

Published in: open source software | on February 7th, 2007 | No Comments »

FUSE and sshfs in OS X

I’ve needed to mount multiple home directories from a single server, and have run up into one of the limitations in using Appletalk/AFP to do this, as via either OS X’s built in AFP or using Netatalk, one can only mount one home directory at a time. Additionally, Appletalk seems to be particularly chatty and thus slow, so I looked at using the Mac implementation of FUSE.

Using FUSE with sshfs, I can mount external volumes in the Finder over SSH. This has worked quite well, here is what I did to get this to work:

  1. Download and install both the MacFUSE Core and sshfs
  2. create a symbolic link to the sshfs command line tool so that I could create custom connect scripts:

    sudo ln -s /Applications/sshfs.app/Contents/Resources/sshfs-static /usr/local/bin/sshfs

  3. add /usr/local/bin to your path, if necessary, but editing your ~/.profile file if you have one, or ~/.bashrc. My .profile includes the following:

    export PATH=/usr/local/bin:/opt/local/bin:/opt/local/sbin:$PATH. After reloading your shell/terminal doing a which sshfs should output:

    $ which sshfs
    /usr/local/bin/sshfs

  4. create permanent directories where your volumes will be mounted from. OS X by default uses /Volumes, but if you choose to use this location you’ll find that you will need to manually recreate these directories each time, which is a pain. I choose:

    ~/mnt/[local_username]

    as the location to mount these volumes (where “~” is the home directory of the currently logged in user, and [local_username] is the username of the user currently logged in to the local OS X machine.). You can create these directories in the Finder, or by simply typing in:

    mkdir -p ~/mnt/[local_username]

    (the -p flag will create parent directories as needed, in this case “~/mnt”)

  5. I created a directory for storing my connect scripts. Each script includes the following:

    sshfs [remote_username]@netmusician.org: mnt/[local_username] -o ping_diskarb -o volname=[remote_username] -o reconnect -o follow_symlinks

    If you need to include an alternative SSH port number or any other special options, type in sshfs -h to see a list of available options. In the above example:

    • -o ping_diskarb: ensures that the new volume is immediately seen within the Finder
    • -o volname=[remote_username]: allows you to specify the name of the volume that will be mounted. In AFP, this is usually the name of the folder/home directory that will be mounted
    • -o reconnect: automatically attempts a reconnect if the volume is disconnected (e.g. if the network is no longer available, you put your machine to sleep, etc.)
    • -o follow_symlinks: since I use a lot of symbolic links, this option allows me to see the contents of these directories, rather than just displaying these directories/files as aliases
  6. optional: Setup public/private SSH keys to handle authentication in a non-interactive way (there are numerous guides available to assist in doing this)
  7. optional: Download Platypus and use this tool to create scripts that run in the background (i.e. do not demand window focus) and will execute your connect commands and automatically quit when completed

These volumes can be unmounted in the Finder, or by entering the following command in the Terminal:

umount /path/to/volume

(using the examples above, this would be ~/mnt/[local_username])

Published in: OS X | on February 7th, 2007 | 4 Comments »

CSS rounded corners roundup

Finding the ideal CSS/HTML combo used for generating rounded borders around div blocks has proven to be a real challenge. There are several different implementations, some which use Javascript, some which only work with fixed width blocks, and others that are fluid. I wanted to find the most flexible implementation I could make a library out of and recycle within all of my sites. My requirements were as such:

  • needed to be liquid, with the option to make it fixed
  • needed to work with images, for those sites warranting a fancy look with elements such as drop shadows
  • needed to be simple, effortless to drop in anywhere, and highly compatible with all major browsers

As it turns out, this summary was very helpful. I ended up going with this implementation.

I invoke the rounded corners via the following:

<div class="roundbox">
<?php include 'path/to/roundbox_start.html'; ?>
content
<?php include 'path/to/roundbox_end.html'; ?>
</div>

Where roundbox_start.html and roundbox_end.html contain the HTML used to generate the borders. The CSS classes used by this implementation reside in a separate file I import with an @import rule. I’ve created roundbox, and roundbox_left/roundbox_right CSS classes, the latter floating left and right, respectfully.

By putting the actual roundbox class outside of the included files, I can create a .roundbox class in my site’s CSS containing text formatting unique to the site.

If you plan to create multiple sites utilizing this round border technique, I suggest preparing your image slices using an application such as Adobe Illustrator that will make it easy for you to modify the colors of this border, including the background color it is set against.

Published in: Webkit | on February 2nd, 2007 | No Comments »