1

I' try to play with Xephyr under tty:

$ DISPLAY=:0 Xephyr -ac -screen 800x600 -host-cursor

Xephyr cannot open host display. Is DISPLAY set?

As u can see, DISPLAY has been set, but Xephyr still cannot see it.

  • DISPLAY cannot be just anything. For :0 there should be a /tmp/.X11-unix/X0 unix socket (or an @/tmp/.X11-unix/X0 abstract unix socket on Linux) and an X11 server listening on it. And DISPLAY is not always :0. On some distros, it's something like :8 or similar. When forwarded via ssh, it's localhost:10.0. – mosvy Mar 7 at 10:49
  • Also, why are you using -ac? It's pointless. Is that copied from somewhere else? Where from? – mosvy Mar 7 at 10:53
  • You have to export DISPLAY=:0; most programs get it from their environment. IIRC, some systems need 0.0. The generic format is 'hostname:workstation.screen' – Paul_Pedant Mar 7 at 11:44
  • 1
    @Paul_Pedant no, FOO=bar cmd will export FOO in the environment of cmd, just try with FOO=bar printenv FOO. And :0 is enough, no need of :0.0. – mosvy Mar 7 at 12:11
  • @mosvy. Actually, Xephyr documentation specifically shows (a) export DISPLAY=:1.0, and (b) Display is an arg:: Xephyr -ac -screen 1024x768 -br -reset -terminate 2> /dev/null :1 &. It's an X-on-X server and apparently abhors :0. If we do not change it, Xephyr won't get any data forwarded to it. – Paul_Pedant Mar 7 at 19:55
0

Xephir runs on X11. If you are running on a tty (i.e., virtual console on Linux, no graphics), there is no X server to connect to. Ditto if you are running Wayland on your display server, no X server around.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.