<div dir="ltr">I'm not endorsing this patch anymore. It could be perfectly replaced with other approaches:<div><br></div><div> * Rely on DM settings to set DISPLAY/XAUTHORITY variables</div><div><br></div><div> * Set custom command "env DISPLAY=(...) XAUTHORITY=(...) Xephyr (...)" in DM settings</div><div><br></div><div>Since patch 08/10 has already been merged, patches 02-07/10 and 09,10/10 still need to be reviewed.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-03 15:00 GMT-03:00 Laércio de Sousa <span dir="ltr"><<a href="mailto:laerciosousa@sme-mogidascruzes.sp.gov.br" target="_blank">laerciosousa@sme-mogidascruzes.sp.gov.br</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This patch introduces two command-line options for Xephyr:<br>
<br>
* -host-display: set Xephyr DISPLAY environment variable<br>
to host X server display number<br>
* -host-auth: set Xephyr XAUTHORITY environment variable<br>
to host X server authorization file path<br>
<br>
These options are particularly useful when Xephyr is launched<br>
directly from display manager, because DISPLAY and/or XAUTHORITY<br>
environment variables may not be set when it's launched.<br>
<br>
Signed-off-by: Laércio de Sousa <<a href="mailto:laerciosousa@sme-mogidascruzes.sp.gov.br">laerciosousa@sme-mogidascruzes.sp.gov.br</a>><br>
---<br>
hw/kdrive/ephyr/ephyrinit.c | 20 ++++++++++++++++++++<br>
1 file changed, 20 insertions(+)<br>
<br>
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c<br>
index 8fbaf1d..0a42c96 100644<br>
--- a/hw/kdrive/ephyr/ephyrinit.c<br>
+++ b/hw/kdrive/ephyr/ephyrinit.c<br>
@@ -141,6 +141,8 @@ ddxUseMsg(void)<br>
KdUseMsg();<br>
<br>
ErrorF("\nXephyr Option Usage:\n");<br>
+ ErrorF("-host-display host X server display number\n");<br>
+ ErrorF("-host-auth host X server authorization file path\n");<br>
ErrorF("-parent <XID> Use existing window as Xephyr root win\n");<br>
ErrorF("-sw-cursor Render cursors in software in Xephyr\n");<br>
ErrorF("-fullscreen Attempt to run Xephyr fullscreen\n");<br>
@@ -369,6 +371,24 @@ ddxProcessArgument(int argc, char **argv, int i)<br>
EphyrWantNoHostGrab = 1;<br>
return 2;<br>
}<br>
+ else if (!strcmp(argv[i], "-host-display")) {<br>
+ if (i + 1 < argc) {<br>
+ setenv("DISPLAY", argv[i + 1], 1);<br>
+ return 2;<br>
+ }<br>
+<br>
+ UseMsg();<br>
+ exit(1);<br>
+ }<br>
+ else if (!strcmp(argv[i], "-host-auth")) {<br>
+ if (i + 1 < argc) {<br>
+ setenv("XAUTHORITY", argv[i + 1], 1);<br>
+ return 2;<br>
+ }<br>
+<br>
+ UseMsg();<br>
+ exit(1);<br>
+ }<br>
<br>
return KdProcessArgument(argc, argv, i);<br>
}<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.5.0<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><b>Laércio de Sousa</b><br></div><div style="text-align:center"><div style="text-align:left"><i>Orientador de Informática</i></div><div style="text-align:left"><u>Escola Municipal "Professor Eulálio Gruppi"</u></div><div style="text-align:left"><i>Rua Ismael da Silva Mello, 559, Mogi Moderno</i></div><i><div style="text-align:left"><i>Mogi das Cruzes - SP</i></div><div style="text-align:left"><i>CEP 08717-390</i></div></i></div><div><span style="font-family:arial;font-size:small">Telefone: (11) 4726-8313</span></div></div></div>
</div>