From: "Charles Coffing" Subject: [PATCH] fix xauth to make fully-virtualized console always come up Date: Thu, 30 Mar 2006 17:53:11 -0500 Message-ID: <442BFEF0.D169.003C.0@novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part26034347.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --=__Part26034347.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline In certain circumstances, the GUIs for fully-virtualized VMs do not come up, because the Xauthority file cannot be found. The attached patch fixes the problem. Details: Currently, xm & xend allow an XAUTHORITY to be specified in the config file. If that is not specified, then xm will pass the XAUTHORITY environment variable back to xend instead. This is not sufficient, since it is possible that XAUTHORITY is not set at all. This doesn't cause a problem for most X apps, because xlib will use the fall-back of $HOME/.Xauthority. But the viewer is started from xend, which almost certainly doesn't have a reasonable HOME variable. The attached patch fixes this by always passing some value for XAUTHORITY. In order of preference, that value is: 1. Use the value from the config file, if specified. 2. Use the value from the XAUTHORITY env variable, if set. 3. Use $HOME/.Xauthority, if HOME is set. 4. Look up the user's home directory via getpwuid, and append "/.Xauthority" Signed-off-by: Charles Coffing --=__Part26034347.0__= Content-Type: application/octet-stream; name="xen-xauth.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="xen-xauth.diff" SW5kZXg6IHhlbi11bnN0YWJsZS90b29scy9weXRob24veGVuL3htL2NyZWF0ZS5weQo9PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09Ci0tLSB4ZW4tdW5zdGFibGUub3JpZy90b29scy9weXRob24veGVuL3htL2NyZWF0ZS5weQor KysgeGVuLXVuc3RhYmxlL3Rvb2xzL3B5dGhvbi94ZW4veG0vY3JlYXRlLnB5CkBAIC04NjMsNyAr ODYzLDE0IEBAIGRlZiBwYXJzZUNvbW1hbmRMaW5lKGFyZ3YpOgogICAgICAgICBnb3B0cy52YWxz LmRpc3BsYXkgPSBvcy5nZXRlbnYoIkRJU1BMQVkiKQogCiAgICAgaWYgbm90IGdvcHRzLnZhbHMu eGF1dGhvcml0eToKLSAgICAgICAgZ29wdHMudmFscy54YXV0aG9yaXR5ID0gb3MuZ2V0ZW52KCJY QVVUSE9SSVRZIikKKyAgICAgICAgeGF1dGggPSBvcy5nZXRlbnYoIlhBVVRIT1JJVFkiKQorICAg ICAgICBpZiBub3QgeGF1dGg6CisgICAgICAgICAgICBob21lID0gb3MuZ2V0ZW52KCJIT01FIikK KyAgICAgICAgICAgIGlmIG5vdCBob21lOgorICAgICAgICAgICAgICAgIGltcG9ydCBwb3NpeCwg cHdkCisgICAgICAgICAgICAgICAgaG9tZSA9IHB3ZC5nZXRwd3VpZChwb3NpeC5nZXR1aWQoKSlb NV0KKyAgICAgICAgICAgIHhhdXRoID0gaG9tZSArICIvLlhhdXRob3JpdHkiCisgICAgICAgIGdv cHRzLnZhbHMueGF1dGhvcml0eSA9IHhhdXRoCiAKICAgICAjIFByb2Nlc3MgcmVtYWluaW5nIGFy Z3MgYXMgY29uZmlnIHZhcmlhYmxlcy4KICAgICBmb3IgYXJnIGluIGFyZ3M6Cg== --=__Part26034347.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__Part26034347.0__=--