diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2021-10-07 18:22:11 -0700 |
---|---|---|
committer | Ray Strode <halfline@gmail.com> | 2021-12-22 21:22:27 +0000 |
commit | bc16c9898012e463bc6b79c3faa8f81ed54527f7 (patch) | |
tree | ede12e3631c3936ef714a3cfdab96349ee4b270e /daemon/gdm-x-session.c | |
parent | 800eb651350bf19eec416ceedfe5744317fed502 (diff) | |
download | gdm-bc16c9898012e463bc6b79c3faa8f81ed54527f7.tar.gz |
daemon: Support X servers built with -Dlisten_tcp=true
Xorg since version 1.17 doesn't listen to tcp sockets by default
unless it's explicitly built with -Dlisten_tcp=true.
GDM currently assumes X servers 1.17 and later are always built
without specifying -Dlisten_tcp=true and doesn't work properly
otherwise.
This commit enhances GDM to better handle these non-standard builds by
always passing '-nolisten tcp' on the command line when tcp should
be disabled, and likewise always passing '-listen tcp' on the command
line, assuming the X server is new enough to support it, when tcp
should be enabled.
Related #704
Diffstat (limited to 'daemon/gdm-x-session.c')
-rw-r--r-- | daemon/gdm-x-session.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/daemon/gdm-x-session.c b/daemon/gdm-x-session.c index 5962da57..0b07ab5b 100644 --- a/daemon/gdm-x-session.c +++ b/daemon/gdm-x-session.c @@ -260,16 +260,16 @@ spawn_x_server (State *state, * by default anymore. In older versions we need to pass * -nolisten tcp to disable listening on tcp sockets. */ -#ifdef HAVE_XSERVER_THAT_DEFAULTS_TO_LOCAL_ONLY - if (allow_remote_connections) { - g_ptr_array_add (arguments, "-listen"); - g_ptr_array_add (arguments, "tcp"); - } -#else if (!allow_remote_connections) { g_ptr_array_add (arguments, "-nolisten"); g_ptr_array_add (arguments, "tcp"); } + +#ifdef HAVE_XSERVER_WITH_LISTEN + if (allow_remote_connections) { + g_ptr_array_add (arguments, "-listen"); + g_ptr_array_add (arguments, "tcp"); + } #endif g_ptr_array_add (arguments, "-background"); |