Existence of closed, surjective map defined in the Stone-Cech compactification

We know that $X \mapsto cX$ extends to a continuous map $\beta X \mapsto cX$. And $X \mapsto cX$ has a dense image. It follows that $g: \beta X \mapsto Y$ is surjective.