Can't export a window to an X server on a named host

Hi,

I am having a problem exporting a window to an X server running on another machine. I have distilled down the issue on a Tumblweed install I have as follows. The machine is named progressTM, has an IP address of 192.168.25.154 and no firewall. Here is a transcript of what I did: xeyes launched when I exported DISPLAY to :0.0 (terminated with a ctrl-C) but failed when ever I tried to use a hostname or IP address even though these correspond to the local machine. Note I have set “xhost +” to dissable access control.

ProgressTM:~ # export DISPLAY=:0.0
ProgressTM:~ # xhost +
access control disabled, clients can connect from any host
ProgressTM:~ # xeyes
^C
ProgressTM:~ # export DISPLAY=progresstm:0.0
ProgressTM:~ # xeyes
Error: Can't open display: progresstm:0.0
ProgressTM:~ # export DISPLAY=192.168.25.154:0.0
ProgressTM:~ # xeyes
Error: Can't open display: 192.168.25.154:0.0
ProgressTM:~ # export DISPLAY=localhost:0.0
ProgressTM:~ # xeyes
Error: Can't open display: localhost:0.0
ProgressTM:~ # export DISPLAY=127.0.0.1:0.0
ProgressTM:~ # xeyes
Error: Can't open display: 127.0.0.1:0.0
ProgressTM:

the hostname ProgressTM is resolveable as:

ProgressTM:~ # ping progresstm
PING ProgressTM (192.168.25.154) 56(84) bytes of data.
64 bytes from ProgressTM (192.168.25.154): icmp_seq=1 ttl=64 time=0.022 ms
^C
--- ProgressTM ping statistics ---
1 packets transmitted, 3 received, 0% packet loss, time 2034ms
rtt min/avg/max/mdev = 0.022/0.040/0.055/0.013 ms

but I suspect that there is a bigger issue or I have just missed something simple.

My eventual goal is to have a virtual display started via Xvnc and monitored remotely by a vnc client and have machines export windows to that virtual dispaly.

Have you tried manually copying the .Xauthority file from the user and machine running the X server to the local user and machine?
This, together with the correct value of the DISPLAY environment variable, should do it. Not elegant, but maybe good for excluding other problems.

I guess that the X server (the one on the host you want the window to open) is not configured to listen on ports. Thus even if you have no firewall, that does not mean that somebody is listening.
I also guess that listening for remote requests is off by default in the X server for security reasons.

This is different from the xhosts allowances which then decide if a particular host/user may open windows when a request arrives (which never happens when not listening at all).

Sory, but I do not know hoe and where to configure the X server. All to long ago that I did that. Also may depend on the X server used (X11, Wayland …)

Thanks. Tried it and it made no difference but I will keep it in mind when I start going between physical machines.

I guess that the X server (the one on the host you want the window to open) is not configured to listen on ports. Thus even if you have no firewall, that does not mean that somebody is listening.
I also guess that listening for remote requests is off by default in the X server for security reasons.

Claerly “DISPLAY=:0.0” and “DISPLAY=localhost:0.0” are diferent and that would explain it completely.

OK. Just done an “lsof -i -P -n” and there is nothing listening … now I know where to search :wink:

Thanks for the help to you both.

Just in case somone lands here in the future.

In theory listening can be enabled via sysconfig, just search for the DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN setting.

However I use sddm and that does not look at that setting. So you put:

[X11]
ServerArguments=-listen tcp

in /etc/sddm.conf

Thanks for that. I knew it would depend on the display manager/x server used.

Now we af at least a solution for two of them.

The frustarating thing is that Xvnc framebuffers only seem to be able to take X stuff forwarded from the local machine and not via a socket, so no access from a remote machine :(.

can you try exporting DISPLAY to 10.0 instead of 0.0 at the host machine?

Possibly not true.
I don’t know what your setup is, but could be significant.

Skim some important info I accumulated that is not covered in the openSUSE VNC documentation and see if anything is relevant to what you’re doing.
Some issues with framebuffer, how to configure even without a DM and using only a WM, more.

https://en.opensuse.org/User:Tsu2/remote_administration_VNC

TSU

Could not find anyway of getting Xvnc to listen on an external port. Xvnc is really two servers in one - an X server and a VNC server. As its the internal X server of Xvnc that does not appear to be able to listen on an external port I used Xvfb and x0vncserver on a virtual display as follows:

Xvfb :20 -listen tcp &
x0vncserver -display :20 &

This gives me a frame buffer dispaly as display :20 that other machines can export windows to. The same diaplay can be monitored by a VNC client on port 5900.

Huh?

bor@tw:~> Xvnc -listen tcp :10

Xvnc TigerVNC 1.10.0 - built ??? ?? ???? ??:??:??
Copyright (C) 1999-2019 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12010000, The X.Org Foundation




Sat Dec 19 11:39:57 2020
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5910
 vncext:      created VNC server for screen 0




LISTEN    0         4096               0.0.0.0:6010             0.0.0.0:*        users:(("Xvnc",pid=7289,fd=5))                                                 

I still miss how all of this is related to Install/Boot/Login which is the topic of this subforum.

I tried that but could could only connect from the local machine (inluding if I specifed hostname in the DISPLAY variable) and not from another machine on my network.

I just tested t it certainly works from remote system.

OK, just done the test again (even scrolled back to the commands in the BASH histories) and it works!

Thanks everyone.