  The X-ray emission from clusters of galaxies is one of the best observational
probe to investigate the distribution of dark matter at intermediate and high
redshifts. Since the disposition of the intracluster plasma (ICP) responsible
of the emission is crucial to link X-ray properties to the global properties of
the dark matter halos, we propose a semi--analytical approach for the diffuse
baryons. This comprises the following blocks: Monte Carlo merging histories to
describe the dynamics of dark matter halos; the central hydrostatic disposition
for the ICP; conditions of shock, or of closely adiabatic compression at the
boundary with the external gas, preheated by stellar energy feedbacks. From our
model we predict the $L-T$ correlation, consistent with the data as for shape
and scatter.
