Solitons of the parametrically driven, damped nonlinear Schrödinger equation become unstable and seed spatiotemporal chaos for sufficiently large driving amplitudes. We show that the chaos can be suppressed by introducing localized inhomogeneities in the parameters of the equation. The pinning of the soliton on an "attractive" inhomogeneity expands its stability region whereas "repulsive" impurities produce an effective partitioning of the interval. We also show that attractive impurities may spontaneously nucleate solitons which subsequently remain pinned on these defects. A brief account of these results has appeared in patt-sol/9906001, where the interested reader can also find multicolor versions of the figures.Motivation. The ability to synchronize populations of coupled nonlinear oscillators would afford enormous technological benefits. A textbook example is provided by chains of Josephson junctions. A single junction can serve as an unparalleled source of ultrahighfrequency voltage oscillations; however, its industrial utilization was hindered by anomalously low power outputs. A natural way out would be to assemble a large array of coupled identical junctions, in anticipation that the coupling would force them to pulsate in unison. However -even if individual oscillators are nonchaotic -the synchronized regime may be unstable and evolve into a highly incoherent state, usually referred to as the spatio-temporal chaos.In an exciting twist of events, recent numerical simulations revealed that the introduction of slight uncorrelated differences between the oscillators may result in a significant improvement of the synchronization of the array [1,2,3]. The disorder was seen to suppress the chaos! In an attempt to gain a deeper insight into the nature of this counter-intuitive phenomenon, a numerical study of the effect of a single impurity on an otherwise homogeneous array was carried out [4]. Surprisingly, a single impurity was found to be sufficient to "tame" the chaotic behaviour and produce simple spatiotemporal patterns in very long chains.