  We present a study of the baryonic fraction in galaxy clusters aimed at
constraining the cosmological parameters Omega_m, Omega_Lambda and the ratio
between the pressure and density of the ``dark'' energy, w. We use results on
the gravitating mass profiles of a sample of nearby galaxy clusters observed
with the BeppoSAX X-ray satellite (Ettori, De Grandi, Molendi 2002) to set
constraints on the dynamical estimate of Omega_m. We then analyze Chandra
observations of a sample of eight distant clusters with redshift in the range
0.72 and 1.27 and evaluate the geometrical limits on the cosmological
parameters Omega_m, Omega_Lambda and w by requiring that the gas fraction
remains constant with respect to the look-back time. By combining these two
independent probability distributions and using a priori distributions on both
Omega_b and H0 peaked around primordial nucleosynthesis and HST-Key Project
results respectively, we obtain that, at 95.4 per cent level of confidence, (i)
w < -0.49, (ii) Omega_m = 0.34^+0.11_-0.05, Omega_Lambda = 1.30^+0.44_-1.09 for
w=-1 (corresponding to the case for a cosmological constant), and (iii) Omega_m
= 1-Omega_Lambda = 0.33^+0.07_-0.05 for a flat Universe. These results are in
excellent agreement with the cosmic concordance scenario which combines
constraints from the power spectrum of the Cosmic Microwave Background, the
galaxy and cluster distribution, the evolution of the X-ray properties of
galaxy clusters and the magnitude-redshift relation for distant type Ia
supernovae. By combining our results with the latter method we further
constrain Omega_Lambda =0.94^+0.28_-0.32 and w < -0.89 at the 2 sigma level.
