  Let $S$ be a minimal smooth projective surface of general type with
irregularity $q=2$. We show that, if $S$ has a nontrivial holomorphic
automorphism acting trivially on the cohomology with rational coefficients,
then it is a surface isogenous to a product. As a consequence of this geometric
characterization, one infers that no nontrivial automorphism of surfaces of
general type with $q=2$ (which are not necessarily minimal) can be homotopic to
the identity. In particular, such surfaces are rigidified in the sense of
Fabrizio Catanese.
