The paper presents a general theoretical framework and related Monte Carlo simulation of novel type of the X-ray sources based on relativistic Thomson scattering of powerful laser radiation. Special attention is paid to the linac X-ray generators by way of two examples: conceptual design for production of 12.4 keV photons and presently operating X-ray source of 29.4 keV photons. Our analysis shows that state-of-the-art laser and accelerator technologies enable to build up a compact linac-based Thomson source for the same X-ray imaging and diffraction experiments as in using of a large-scale X-ray radiation facility like a synchrotron or Thomson generator based on electron storage ring.