Is the two-point compactification the second-smallest compactification? We know that the Alexandroff one-point compactification of $\mathbb{R}$ is in a precise sense its smallest Hausdorff compactification.
Is the two-point compactification of $\mathbb{R}$, in a precise sense, the second-smallest?
In other words, given the two-point compactification $(\frac{2}{\pi}\text{arctan}(x),[-1,1])$ and some other compactification $(k, \gamma \mathbb{R})$ of $\mathbb{R}$ that is not equivalent to the one-point or two-point compactification, is there a continuous map $\gamma \mathbb{R}\rightarrow [-1,1]$ making the obvious diagram commute?
 A: The answer is "no" as was shown by David Hartley. His counterexample is the Warsaw circle; see  https://de.wikipedia.org/wiki/Datei:Warsaw_Circle.png, How to show Warsaw circle is non-contractible?.
Let us nevertheless say a little bit more about compactifications of $\mathbb{R}$.
Your question is related to https://mathoverflow.net/q/95748. In Dave L Renfro's comment you find a reference to
Kenneth D. Magill, Countable compactifications, Canadian Journal of Mathematics 18 (1966), 616-620
https://cms.math.ca/openaccess/cjm/v18/cjm1966v18.0616-0620.pdf
Theorem (2.1) of this paper states that for a locally compact $X$, the remainder $\beta X \setminus X$ of the Stone-Cech-compactification $\beta X$ of $X$ has infinitely many connected components if and only if $X$ has an $n$-point compactification for each positive integer $n$.
But Theorem (2.6) of
K. D. Magill, Jr., N-point compactifications. Amer. Math. Monthly 72 (1965), 1075-1081
says that if every compact subset of $X$ is contained in a compact subset whose complement has at most $N$ components, then $X$ has no $n$-point compactification for $n > N$.
For $X = \mathbb{R}$ this implies that there are no $n$-point compactification for $n > 2$. Therefore $\beta \mathbb{R} \setminus \mathbb{R}$ has only finitely many, say $M$, components. We shall show that $M = 2$.
The proof of Theorem (2.1) of the first paper ((2.1.1) $\Rightarrow$ (2.1.2)) shows the following: If $X$ is locally compact and $\beta X \setminus X = \bigcup_{a \in \Lambda} H_a$, where the $H_a$ are the components of $\beta X \setminus X$, then there exists a compactification $\alpha X$ of $X$ such that $\alpha X \setminus X = \Lambda$. For $X = \mathbb{R}$ we know that $\Lambda$ has $M$ elements. Hence $\mathbb{R}$ has an $M$-point compactification, thus $M \le 2$. But  $M = 1$ is clearly impossible.
$\beta \mathbb{R}$ is the "maximal" compactification of $\mathbb{R}$, i.e. for any $\alpha \mathbb{R}$ there exist a continuous $f : \beta \mathbb{R} \to \alpha \mathbb{R}$ such that $f(x) = x$ for $x \in \mathbb{R}$. This means that the remainder $\alpha \mathbb{R} \setminus \mathbb{R}$ has one or two components. If it has two components, then there exists $\alpha \mathbb{R} \to [0,1]$. If it has only one component, then such a map cannot exist.
There are plenty of non-equivalent one component compactifications. For example, each compact Hausdorff space $R$ which is the continuous image of $[0,1]$ (which is the remainder of David Hartley's example) occurs as the remainder of such a compactification.
A: $\mathbb R$ has compactifications with (non-trivial) connected remainders. These cannot be mapped onto the two-point compactification in the desired way.
(E.g. make each end into a topologist's sine curve and bend them round to converge on the same line segment.)
A: The Alexandroff one-point compactification can be defined in very general manner for any topological space $X$, however the universality property of interest would be susceptible to a coherent categorical treatment only in the case of locally compact Hausdorff spaces (whose one-point compactifications are compact Hausdorff, as expected).
The two-point compactification applied to $\mathbb{R}$ is a special case of Dedekind-MacNeille completions of ordered sets, so it seeks to achieve the very desirable property of completeness in the sense of order theory, rather than compactness in the topological sense. These two notions do intersect though in a remarkable way: an order topology induced by a total order is compact if and only if the given order is complete!
