Archive for May, 2006

May 13, 2006

Adding a Mac Printer

Chris @ 11:32 am

One of the usability issues that’s popped up with the Mac server testing is the process used add a printer. The Configure CUPS script handles the process of hooking in PaperCut to the CUPS print process. To view the printer in the interface however, you first need to perform a print job to “register the printer with the system”. This is a little counterintuitive.

We’ll make some changes in this area. As an interim solution, we’ll change the Configure CUPS script to it displays a reminder message. In the long term, we’ll make this script perform the configuration registration process automatically.

May 12, 2006

PaperCut NG on AFP548

Chris @ 11:05 am

PaperCut NG has made the front page of the popular Mac server related site, AFP548.com. This should be a good way to help drum up some feedback from experienced Mac server admins. You can view the post here.

On the topic of server discovery in the client as discussed in a previous post. Some have suggested that we look at exposing the PaperCut NG server using Bonjour (aka Rendezvous). This is an interesting technology and we’re looked at this before. It would be relatively simple to register PaperCut NG server as a service. One issue we need to investigate further is discovery across subnets/domains. The current method of dynamically creating the client .app package upon install with an embedded IP/server name works well in this regard. We’ll look at Bonjour a little more after we address some of the more pressing bugs/issues.

May 10, 2006

PaperCut NG Mac Update #3

Chris @ 3:49 pm

Thanks for the Mac users who recommended that we list our updates and version changes on the popular Mac site, www.versiontracker.com. PaperCut NG for Mac is now up on the site here.

We’d like to know if (or how many) Mac users use versiontracker to automate updates. Should we look at pushing PaperCut NG Mac updates this way? Please email us with your thoughts.

May 9, 2006

PaperCut NG Mac Update #2

Chris @ 12:04 pm

Rob at Sheridan College Institute of Technology & Advanced Learning has been kind enough to contribute a PaperCut Dashboard Widget. It’s a simple Widget that allows Apple users to conveniently check their print quota without the need to run the full client. Rob has hooked into PaperCut via the XML-RPC Web Services interface using some clever AppleScript calls.

The preferences on the back of the widget provide access to user-definable username and server name fields. The username defaults to the output of whoami. The server name defaults to papercut. As long as the server is aliased in your DNS as papercut, it should work out of the box with no configuration.

We’ll looking integrating the widget into the standard PaperCut NG release over the coming weeks. We’ll address the server discovery issue (default name) using the same method used in the standard client – that is, write the server’s name into an embedded configuration file during the initial install.

Thanks again to Rob for his contribution. Rob has access to the PaperCut source code and is using it as a basis for some other enhanced Mac client-side tools.

Download the Widget

Please feel free to email through feedback and I’ll pass it onto Rob.

May 8, 2006

First Mac Server Update No# 1

Chris @ 3:52 pm

As many of you may have seen from our home page, we have just release our first Apple Mac Server version of PaperCut NG. About 30 majority Mac sites (mostly in education) expressed an interest in the testing program prior to release, and we’ve had a lot more download and contribute since the public beta release.

A mistyped GCC compiler option caused problems with the 6.2.3472 build on PowerPC based systems. We quickly re-released on Saturday night with this issue addressed.

The feedback so far has been great. Also thanks for all the compliments. Some examples:

“I must say the product is exceptional. I have had no problems whatsoever. “

“The app is great, stable and all the functionality is there. The notifications are working well and the importing of users for OD was very fast. “

One tester suggested that we should update the install process so the “papercut” host user is created automatically upon install. We’ve reworking the postflight install script in the installer so it creates the user in the local NetInfo domain using the dscl tool.

One of the frustrating aspects of using dscl to create the user is that you need to explicitly define the user’s uid (unique ID). How do you determine a free UID on the Mac? I took a look at a few other scripts and program installers. The only examples I could find used hardcoded numbers! I suppose in the hope that they’re not already in use. I decided that the best way was to exec Perl and do a quick scan using getpwuid looking for a free slot. Here is the relevant section in the preflight script:

#
# Add the host user account if required
#
if ! `id ${UNIX_USERNAME} >/dev/null 2>/dev/null`; then
    echo "Creating account for ${UNIX_USERNAME}" >> $install_log
    #
    # Find first available UID between 101 and 499.
    #   We should probably try below 100 but I'd like to stay out of the Apple range
    #
    uid=`perl -e '
            my $t = 101;
            while ($t > $install_log
        echo "${msg}" 1>&2
        exit 1
    fi
    dscl . create /groups/${UNIX_USERNAME}
    dscl . create /groups/${UNIX_USERNAME} name ${UNIX_USERNAME}
    dscl . create /groups/${UNIX_USERNAME} passwd "*"
    dscl . create /groups/${UNIX_USERNAME} gid ${uid}

    dscl . create /users/${UNIX_USERNAME}
    dscl . create /users/${UNIX_USERNAME} RealName "${APP_NAME} Host User"
    dscl . create /users/${UNIX_USERNAME} UniqueID ${uid}
    dscl . create /users/${UNIX_USERNAME} shell /bin/bash
    dscl . create /users/${UNIX_USERNAME} NFSHomeDirectory "${dest}"
    dscl . create /users/${UNIX_USERNAME} PrimaryGroupID ${uid}

fi

The recommended practice, and the behaviour seen when creating users via System Preferences->Accounts, is for standard users to be created at UID 500 and above. 100 and below are reserved for Mac OS X system and process accounts. I’ve started our search for a UID between 101 and 499 and this should be a pretty safe bet.

We’d like to get some good testing done on this… for example, does it work OK with all systems linking into external user sources such as Open Directory? If you do experience any problems, please let us know. Also note that the code first checks to see if the user exists. This means that advanced administrators who would prefer to create their own papercut host user, can do so prior to the install.

The latest Mac build is 3481. Please keep the feedback coming!