I'm not endorsing this patch anymore. It could be perfectly replaced with other approaches:
* Rely on DM settings to set DISPLAY/XAUTHORITY variables * Set custom command "env DISPLAY=(...) XAUTHORITY=(...) Xephyr (...)" in DM settings Since patch 08/10 has already been merged, patches 02-07/10 and 09,10/10 still need to be reviewed. 2015-09-03 15:00 GMT-03:00 Laércio de Sousa < [email protected]>: > This patch introduces two command-line options for Xephyr: > > * -host-display: set Xephyr DISPLAY environment variable > to host X server display number > * -host-auth: set Xephyr XAUTHORITY environment variable > to host X server authorization file path > > These options are particularly useful when Xephyr is launched > directly from display manager, because DISPLAY and/or XAUTHORITY > environment variables may not be set when it's launched. > > Signed-off-by: Laércio de Sousa <[email protected]> > --- > hw/kdrive/ephyr/ephyrinit.c | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c > index 8fbaf1d..0a42c96 100644 > --- a/hw/kdrive/ephyr/ephyrinit.c > +++ b/hw/kdrive/ephyr/ephyrinit.c > @@ -141,6 +141,8 @@ ddxUseMsg(void) > KdUseMsg(); > > ErrorF("\nXephyr Option Usage:\n"); > + ErrorF("-host-display host X server display number\n"); > + ErrorF("-host-auth host X server authorization file > path\n"); > ErrorF("-parent <XID> Use existing window as Xephyr root > win\n"); > ErrorF("-sw-cursor Render cursors in software in Xephyr\n"); > ErrorF("-fullscreen Attempt to run Xephyr fullscreen\n"); > @@ -369,6 +371,24 @@ ddxProcessArgument(int argc, char **argv, int i) > EphyrWantNoHostGrab = 1; > return 2; > } > + else if (!strcmp(argv[i], "-host-display")) { > + if (i + 1 < argc) { > + setenv("DISPLAY", argv[i + 1], 1); > + return 2; > + } > + > + UseMsg(); > + exit(1); > + } > + else if (!strcmp(argv[i], "-host-auth")) { > + if (i + 1 < argc) { > + setenv("XAUTHORITY", argv[i + 1], 1); > + return 2; > + } > + > + UseMsg(); > + exit(1); > + } > > return KdProcessArgument(argc, argv, i); > } > -- > 2.5.0 > > -- *Laércio de Sousa* *Orientador de Informática* *Escola Municipal "Professor Eulálio Gruppi"* *Rua Ismael da Silva Mello, 559, Mogi Moderno* *Mogi das Cruzes - SPCEP 08717-390* Telefone: (11) 4726-8313
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
