You are not logged in.

#1 2021-02-09 22:55:47

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 303
Website

X11 forwarding from a container into Gnome

I'm trying to run xeyes (as an example X11 app) in a systemd-nspawn container, to be shown on the main display, and I'm not making much progress.

host:

  • gdm using "GNOME on Xorg"

  • xhost +

  • IP address towards LAN: 192.168.138.65

container:

  • DISPLAY=192.168.138.65:0 xeyes

  • Can ssh to host at 192.168.138.65

  • Cannot open display

I'm noticing that port 6000 (I believe the X11 port) is not actually open on the host according to lsof -i. Which leads me to notice the "-nolisten tcp" argument to the Xorg invocation according to ps axlf:

/usr/lib/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -nolisten tcp -background none -noreset -keeptty -novtswitch -verbose

So I'm looking where that is set, and only find /etc/X11/xinit/xserverrc, which says:

/usr/bin/X -nolisten tcp "$@"

which I have changed to

/usr/bin/X "$@"

but there is no change after reboot. The -nolisten argument is still in the command-line according to ps. Where is that set, and how do I override it?

I may have gone off into the weeds here, and there may be a much simpler way of doing this?

Offline

#2 2021-02-09 23:18:43

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 303
Website

Re: X11 forwarding from a container into Gnome

Also found /usr/lib/sddm/sddm.conf.d/default.conf, which has a setting:

ServerArguments=-nolisten tcp

Changing that makes no difference to the Xorg command-line either.

Offline

#3 2021-02-09 23:46:09

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 303
Website

Re: X11 forwarding from a container into Gnome

Apparently the -nolisten option is caused by the setting

security/DisallowTCP

in /usr/share/gdm/gdm.schemas -- clearly a place where anybody would immediately look first :-P

Apparently I also need a -listen tcp for the X server, but so far no luck in finding where that is supposed to go. Not /usr/lib/sddm/sddm.conf.d/default.conf, it makes no difference.

Offline

Board footer

Powered by FluxBB