  We investigate the stability of bounded self-gravitating systems in the
canonical ensemble by using a thermodynamical approach. Our study extends the
earlier work of Padmanabhan [Astrophys. J. Supp. 71, 651 (1989)] in the
microcanonical ensemble. By studying the second variations of the free energy,
we find that instability sets in precisely at the point of minimum temperature
in agreement with the theorem of Katz [ Mon. Not. R. astr. Soc. 183, 765
(1978)]. The perturbation that induces instability at this point is calculated
explicitly; it has not a ``core-halo'' structure contrary to what happens in
the microcanonical ensemble. We also study Jeans type gravitational instability
of isothermal gaseous spheres described by Navier-Stokes equations. We show
analytically the equivalence between dynamical stability and thermodynamical
stability and the fact that the stability of isothermal gas spheres does not
depend on the viscosity. This confirms the findings of Semelin et al.
[astro-ph/9908073] who used numerical methods. We also give a simpler
derivation of the geometric hierarchy of scales inducing instability discovered
by these authors. The density profiles that trigger these instabilities are
calculated analytically; they present more and more oscillations that also
follow a geometric progression. This suggests that the system will fragmentate
in a series of `clumps' and that these `clumps' will themselves fragmentate in
substructures. The fact that both the domain sizes leading to instability and
the `clumps' sizes within a box follow a geometric progression with the same
ratio suggests a fractal-like behaviour. This gives further support to the
interpretation of de Vega et al. [Nature, 383, 56 (1996)].
