We present a novel method that provides a measurement of DNA pressure in viral capsids using small angle X-ray scattering (SAXS). This method, unlike our previous assay, does not require triggering genome release with a viral receptor. Thus, it can be used to determine the existence of a pressurized genome state in a wide range of virus systems, even if the receptor is not known, leading to a better understanding of the processes of viral genome uncoating and encapsidation in the course of infection. Furthermore, by measuring DNA pressure for a collection of bacteriophages with varying DNA packing densities, we derived an empirical equation of state (EOS) that accurately predicts the relation between the capsid pressure and the packaged DNA density and includes the contribution of both DNA-DNA interaction energy and DNA bending stress to the total DNA pressure. We believe that our SAXS-osmometer method and the EOS, combined, provide the necessary tools to investigate physico-chemical properties of confined DNA condensates and mechanisms of infection, and may also provide essential data for the design of viral vectors in gene therapy applications and development of antivirals that target the pressurized genome state.