Enabling Xorg remote connections with gdm no longer works

I have an old instrument (HP logic analyzer) that has an embedded X11 client.
It connects to the Xorg server to permit remote control.

This used to worked with gdm by using the option (in /etc/gdm/custom.conf)

[security]
DisallowTCP=false

There must have been a recent change in default behavior of Xorg to disable TCP by default (and now the gdm option does not work to enable it (or maybe stop gdm from disabling it)).

I now have to edit (hack) /usr/bin/Xorg to add -listen TCP to explicitly the Xorg command line.

Is there a way to add Xorg server options in /etc/gdm/custom.conf file so I don’t have to hack the Xorg script?

No, as I said the instrument uses an old X client not a VNC client.

Hi Michael,

I think you may have just found a bug … according to all the docs I can find, adding

DisallowTCP=false

to /etc/gdm/custom.conf should have worked (pass -listen tcp to the X server)

Yes, I’ll file a bug report upstream.
I think Xorg changed the precedence of the switch to being off by default.

gdm still assumes that it is on and only applies the option to turn it off.

😼 grep -B 1 allowTCP /etc/gdm/custom.conf
[security]
DisallowTCP=false
😼 pgrep -afl Xorg
2288 /usr/libexec/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -novtswitch -verbose 3

Notice that the -listen tcp switch is not listed.
(change and reboot)

😼 grep -B 1 allowTCP /etc/gdm/custom.conf
[security]
DisallowTCP=true
😼 pgrep -afl Xorg
2257 /usr/libexec/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -nolisten tcp -background none -noreset -keeptty -novtswitch -verbose 3

Now the -nolisten tcp is applied (even though it is the default).

Hi Michael,

I have a work-around if you want to try it.

  1. as root — set-default multi-user
  2. copy /usr/bin/Xorg ~/.xserverrc
  3. modify ~/.xserverrc — add -listen tcp to end of command same as you tried for your unwanted hack :slight_smile:
  4. reboot
  5. login and startx

Per Xorg, this would be the proper way to set this up :slight_smile:
gdm is hosed in this regard so … “Gee Thanks Gnome”

This appears to be a build issue with the RPM (although it might not be).
Take a look at the last section of the bug I filed … 2337244 – GDM option 'DisallowTCP=false' has no effect

gdm uses the meson build system, of which I am unfamiliar.
It should detect that Xorg is newer than 1.17 and enable the code to set the correct option…

#ifdef HAVE_XSERVER_WITH_LISTEN
        if (allow_remote_connections) {
                g_ptr_array_add (arguments, "-listen");
                g_ptr_array_add (arguments, "tcp");
        }
#endif

Something is not working correctly and this code is not being included.

BTW: I don’t understand your first instruction … “set-default multi-user”

Ooopsss… sorry …

systemstl set-default multi-user

Looking at /usr/bin/Xorg, you might be able rig a workaround by creating a /usr/libexec/Xorg.wrap file containing:

#!/usr/bin/sh

/usr/libexec/Xorg -listen tcp "$@"

Don’t forget to mark it executable.

It looks like gdm does call /usr/bin/Xorg: daemon/gdm-local-display-factory.c · main · GNOME / gdm · GitLab