  For a topological space $X$ and an ideal $\mathscr{H}$ of subsets of $X$ we
introduce the notion of connectedness modulo $\mathscr{H}$. This notion of
connectedness naturally generalizes the notion of connectedness in its usual
sense. In the case when $X$ is completely regular, we introduce a subspace
$\gamma_{\mathscr H} X$ of the Stone--\v{C}ech compactification $\beta X$ of
$X$, such that connectedness modulo ${\mathscr H}$ is equivalent to
connectedness of $\beta X\setminus\gamma_{\mathscr H} X$. In particular, we
prove that when ${\mathscr H}$ is the ideal generated by the collection of all
open subspaces of $X$ with pseudocompact closure, then $X$ is connected modulo
${\mathscr H}$ if and only if $\mathrm{cl}_{\beta X}(\beta X\setminus\upsilon
X)$ is connected, and when $X$ is normal and ${\mathscr H}$ is the ideal
generated by the collection of all closed realcompact subspaces of $X$, then
$X$ is connected modulo ${\mathscr H}$ if and only if $\mathrm{cl}_{\beta
X}(\upsilon X\setminus X)$ is connected. Here $\upsilon X$ is the Hewitt
realcompactification of $X$.
