suggestion (patch) for a new "Local+xdmcp" Xserver launch feature

suggestion (patch) for a new "Local+xdmcp" Xserver launch feature

Post by M.Herbe » Wed, 14 Nov 2001 07:14:57



I feel like the xdm code inside XFree86 is widly shared, right ?

[XFree86(TM) Bug Report] suggestion (patch) for a new "Local+xdmcp" Xserver launch feature

Description:

It is impossible to start a Local _and_ XDMCP server (-query,
-broadcast and -indirect) with xdm.

I found this disappointing, counter-intuitive (why something *simpler*
is not possible?) and extremely briefly documented (only some words in
the "LOCAL SERVER SPECIFICATION" of the xdm man page)

I spent some time in the xdm source code and think this feature could
be added thanks to something similar to the very short patch
below. Unfortunately, this patch is missing the "right test" to decide
if the Local server just launched is an XDMCP one or not. Maybe the
function server.c:StartServerOnce() could rise some d->xdmcp_flag when
parsing the X command line arguments. Maybe there is a simpler/better
way... please help!

Repeat By:

*** dm.c        2001/11/12 21:04:11     1.1
--- dm.c        2001/11/12 21:20:09
***************
*** 572,577 ****
--- 572,585 ----
      ForEachDisplay (CheckDisplayStatus);
  }

+ /* This StartDisplay procedure is confusing, since it is called from
+    two opposed location:
+
+    - from the X client side (where applications are running) (in xdmcp.c:manage)
+    - from the X server side, when xdm fires Local X servers.
+
+ */
+
  void
  StartDisplay (d)
  struct display        *d;
***************
*** 606,611 ****
--- 614,629 ----
            RemoveDisplay (d);
            return;
        }
+
+       if ( /*... the server just started above by "StartServer" has
+             * enabled XDMCP thanks to -query, -broadcast or -indirect"
+             * (I do not know what is the "right way" to test this,
+             * please help!), then we can just...
+             */
+            )
+         return;
+       /* ... return now, because we do NOT have to ManageSession or
+            RunChooser locally: it will be managed remotely by XDMCP */
      }
      else
      {