A two-dimensional Galerkin formulation of the three-dimensional Oberbeck-Boussinesq equations is used to describe the onset of convection in an infinite rigid horizontal channel uniformly heated from below. The dependence of the critical Rayleigh number on the channel aspect ratio is determined and results are compared with those of an idealized model studied by Davies-Jones (1970). Asymptotic results are derived for both narrow and wide channels, corresponding to limits of small and large aspect ratios respectively. In the latter case the main core flow, consisting of two-dimensional rolls with axes perpendicular to the vertical walls of the channel, can be represented by the solution of an amplitude equation. Close to the walls, however, the motion remains fully three-dimensional and a reversal of the vertical flow is associated with a local subdivision of each main roll into a pair of co-rotating rolls.