Thermoelectric transport in nanoscale conductors is analyzed in terms of the response of the system to a thermo-mechanical field, first introduced by Luttinger, which couples to the electronic energy density. While in this approach the temperature remains spatially uniform, we show that a spatially varying thermo-mechanical field effectively simulates a temperature gradient across the system and allows us to calculate the electric and thermal currents that flow due to the thermo-mechanical field. In particular, we show that, in the long-time limit, the currents thus calculated reduce to those that one obtains from the Landauer-Buttiker formula, suitably generalized to allow for different temperatures in the reservoirs, if the thermo-mechanical field is applied to prepare the system, and subsequently turned off at ${t=0}$. Alternatively, we can drive the system out of equilibrium by switching the thermo-mechanical field after the initial preparation. We compare these two scenarios, employing a model noninteracting Hamiltonian, in the linear regime, in which they coincide, and in the nonlinear regime in which they show marked differences. We also show how an operationally defined local effective temperature can be computed within this formalism.