Thanks, this is almost exactly what I am looking for and is tidier than the approach I was using.
Is there a way to have the nxserver launch a console or xterm instead of a full desktop?
From your response I was able to find AR04D00380 which describes exactly what I want (/usr/NX/bin/nxserver –startsession –type=unix-application –application=xterm –rootless=1) for NX3.5.0. However doesn’t work for NX5 (no errors – it just starts a full desktop every time) and I have not been able to find an article for the current version. The nxserver help suggests that –startsession will accept OPTIONS but I can see anything that details the options I’m looking for.