The excess of far-ultraviolet (far-UV) radiation in elliptical galaxies has remained one of their most enduring puzzles. In contrast, the origin of old blue stars in the Milky Way, hot subdwarfs, is now reasonably well understood: they are hot stars that have lost their hydrogen envelopes by various binary interactions. Here, we review the main evolutionary channels that produce hot subdwarfs in the Galaxy and present the results of binary population synthesis simulations that reproduce the main properties of the Galactic hot-subdwarf population. Applying the same model to elliptical galaxies, we show how this model can explain the main observational properties of the far-UV excess, including the far-UV spectrum, without the need to invoke ad hoc physical processes. The model implies that the UV excess is not a sign of age, as has been postulated previously, and predicts that it should not be strongly dependent on the metallicity of the population.