  The theory of open quantum systems is used to study the local temperature and
heat currents in metallic nanowires connected to leads at different
temperatures. We show that for ballistic wires the local temperature is almost
uniform along the wire and Fourier's law is invalid. By gradually increasing
disorder, a uniform temperature gradient ensues inside the wire and the thermal
current linearly relates to this local temperature gradient, in agreement with
Fourier's law. Finally, we demonstrate that while disorder is responsible for
the onset of Fourier's law, the non-equilibrium energy distribution function is
determined solely by the heat baths.
