The group Gamma of automorphisms of the polynomial kappa(x,y,z) = x^2 + y^2 + z^2 - xyz -2 is isomorphic to PGL(2,Z) semi-direct product with (Z/2+Z/2). We study the dynamics of the Gamma-action on ktR = kappa^{-1}(t) intersect R, for t in R. The action of Gamma preserves a Poisson structure defining a Gamma-invariant area form on each ktR. For t < 2, the action of Gamma is properly discontinuous on the four contractible components of ktR and ergodic on the compact component (which is empty if t < -2). The contractible components correspond to Teichmueller spaces of (possibly singular) hyperbolic structures on a torus. For t = 2, the level set ktR consists of characters of reducible representations and comprises two ergodic components corresponding to actions of GL(2,Z) on (R/Z)^2 and R^2 respectively. For 2 < t <= 18, the action of Gamma on ktR is ergodic. Corresponding to the Fricke space of a three-holed sphere is a Gamma--invariant open subset Omega subset R^3 whose components are permuted freely by Gamma. The level set ktR intersects Omega if and only if t > 18, in which case the Gamma-action on the complement ktR - Omega is ergodic.