It is shown that the simple Onsager second-virial approximation of density functional theory can successfully describe the orientational structure of a Gay-Berne film confined between aligning plates. The theory takes as input the density profile as determined by computer simulation and semi-quantitatively reproduces the variation in the nematic order parameter throughout the film, at different temperatures and for different surface potential strengths, without any adjustable parameters. In this context the validity of an earlier analytical approach is discussed where the density, order parameter and tilt angle profiles were assumed to be step functions. [ABSTRACT FROM AUTHOR]