开发者

ubuntu on android unable to open display chroot

开发者 https://www.devze.com 2023-02-13 22:04 出处:网络
hello I am using ubuntu on andr开发者_JS百科oid(with chroot) I am trying to execute xev (to change the volume button to CTRL)

hello I am using ubuntu on andr开发者_JS百科oid(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 display 0.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 your X, 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 use DISPLAY=: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 and xauth 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? :)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号