hello I am using ubuntu on android(with chroot) I am trying to execute xev (to change the volume button to CTRL) but every time I trying to open up xev, it says unable to open the display '' or unable to open the display '127.0.0.1:0.0' (when I change DISPLAY variable with export)
could somebody tell me how to solve this problem? I can't find official error page on google your little advice would be very helpful for me Regards. Taeyun.
DISPLAY=127.0.0.1:0.0
says to use TCP/IP to connect to the display0.0
. Distributions haven't configured X servers to listen on TCP for five years or more because it is a needless security risk; you need to remove-nolisten
from however you execute yourX
, if you really wish to use TCP rather than Unix domain sockets.But do you really need it to listen on TCP for connections? Seems unlikely -- Unix domain sockets (e.g.,
/tmp/.X11-unix/X0
) are much more common, just useDISPLAY=:0.0
to ask for the Unix domain socket instead. You may need to link the socket into your chroot environment, depends on where client and server start from.Once you can contact the X server from your X client, you also need to authenticate it, using
xauth(1)
. This is annoying :) and is the single most popular reason why everyone just uses SSH X11 forwarding (ssh -X
) rather than deal with TCP listening andxauth
manually. (Incidentally, can you just run an sshd "inside" the chroot on a different port, so you can easily get all this magic for free? :)