We use slender-body theory to simulate a rigid fibre within simple shear flow and parabolic flow at zero Reynolds number and high Péclet numbers (weak Brownian motion). Hydrodynamic interactions of bulk fibres with the bounding walls are included using previously developed methods (Harlen, Sundararajakumar & Koch, J. Fluid Mech., vol. 388, 1999, pp. 355–388; Butler & Shaqfeh, J. Fluid Mech., vol. 468, 2002, pp. 205–237). We also extend a previous analytic theory (Park, Bricker & Butler, Phys. Rev. E, vol. 76, 2007, 04081) predicting the centre-of-mass distribution of rigid fibre suspensions undergoing rectilinear flow near a wall to compare the steady and transient distributions. The distributions obtained by the simulation and theory are in good agreement at sufficiently high shear rates, validating approximations made in the theory which predicts a net migration of the rigid fibres away from the walls due to a hydrodynamic lift force. The effect of the inhomogeneous distribution on the effective stress is also investigated.