  The cosmological constant is treated as a thermodynamical parameter in the
framework of two-dimensional dilaton gravity. We find that the cosmological
constant behaves as a U(1) charge with a confining potential, and that such
potentials require a novel Born-Infeld boundary term in the action. The free
energy and other thermodynamical quantities of interest are derived, from first
principles, in a way that is essentially model-independent. We discover that
there is always a Schottky anomaly in the specific heat and explain its
physical origin. Finally, we apply these results to specific examples, like
Anti-de Sitter-Schwarzschild-Tangherlini black holes,
Banados-Teitelboim-Zanelli black holes and the Jackiw-Teitelboim model.
