Let $X$ and $Y$ be locally convex spaces, and $\varphi: X\to Y$ a linear continuous mapping. Suppose first that $S$ is a compact set in $X$. Then $\varphi$, being considered as a mapping from $S$ to $\varphi(S)$, $$ \varphi\Big|_S:S\to \varphi(S) $$ is open in the sense that for any open set $U$ in $S$ (with respect to the topology induced from $X$) its image $\varphi(U)$ is an open set in $\varphi(S)$ (with respect to the topology induced from $Y$).
This is strange, I was sure that the same must be true if $S$ is not necessarily compact, but just totally bounded (since we can consider the extension of $\varphi$ to the completions of the spaces $X$ and $Y$), but recently I understood unexpectedly that I can't write an accurate proof. Does this mean that there is a counterexample?
So my question:
Is $\varphi\Big|_S:S\to \varphi(S)$ an open mapping for each totally bounded set $S$ in $X$?