See fragment of gtkmain.c - version 2.20.1.
After logout, gtk-greeter write to stderr that warning and exit.
I added setuid(0) before g_spawn_"something" in lxdm's ui.c, but I'm not sure if it is safe.
/* this isn't at all relevant on MS Windows and doesn't compile ... --hb */
uid_t ruid, euid, suid; /* Real, effective and saved user ID's */
gid_t rgid, egid, sgid; /* Real, effective and saved group ID's */
/* These aren't in the header files, so we prototype them here.
int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
if (getresuid (&ruid, &euid, &suid) != 0 ||
getresgid (&rgid, &egid, &sgid) != 0)
#endif /* HAVE_GETRESUID */
suid = ruid = getuid ();
sgid = rgid = getgid ();
euid = geteuid ();
egid = getegid ();
if (ruid != euid || ruid != suid ||
rgid != egid || rgid != sgid)
g_warning ("This process is currently running setuid or setgid.\n"
"This is not a supported use of GTK+. You must create a helper\n"
"program instead. For further details, see:\n\n"
"Refusing to initialize GTK+.");