From: VMware, Inc <> Date: Sat, 28 May 2011 20:11:47 +0000 (-0700) Subject: GHI/X11: Don't pass DESKTOP_AUTOSTART_ID env var to children. X-Git-Tag: 2011.05.27-420096~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2ecbab3965b6868d6a2bae6c331c6e811a967916;p=thirdparty%2Fopen-vm-tools.git GHI/X11: Don't pass DESKTOP_AUTOSTART_ID env var to children. DESKTOP_AUTOSTART_ID was proposed on the xdg@freedesktop.org mailing list, but doesn't seem like it made it to a final spec. http://lists.freedesktop.org/archives/xdg/2007-January/007436.html It refers to a XSMP session manager client ID which shouldn't be passed to children. Having this environment variable breaks launching nautilus w/o arguments. (Aside, GNOME fixed this upstream in response to https://bugzilla.gnome.org/show_bug.cgi?id=649063.) Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/services/plugins/unity/ghIntegration/platform.cc b/open-vm-tools/services/plugins/unity/ghIntegration/platform.cc index 5ab424e96..cfed1eebc 100644 --- a/open-vm-tools/services/plugins/unity/ghIntegration/platform.cc +++ b/open-vm-tools/services/plugins/unity/ghIntegration/platform.cc @@ -290,6 +290,21 @@ GHIPlatformInit(GMainLoop *mainLoop, // IN const char** tmp; for (tmp = envp; *tmp; tmp++) { + /* + * PR 685881: DESKTOP_AUTOSTART_ID was proposed on the xdg@freedesktop.org + * mailing list, but doesn't seem like it made it to a final spec. + * + * http://lists.freedesktop.org/archives/xdg/2007-January/007436.html + * + * It refers to a XSMP session manager client ID which shouldn't be + * passed to children. Having this environment variable breaks launching + * nautilus w/o arguments. (Aside, GNOME fixed this upstream in response + * to https://bugzilla.gnome.org/show_bug.cgi?id=649063.) + */ + if (g_str_has_prefix(*tmp, "DESKTOP_AUTOSTART_ID=")) { + continue; + } + ghip->nativeEnviron.push_back(*tmp); }