Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > ac356884f4883da727404eba8d7c5a16 > files > 5

lxdm-0.2.0-4.fc13.src.rpm

From 08bc773ed867bd65c8b36f16795193afebe4a77e Mon Sep 17 00:00:00 2001
From: dgod <dgod.osa@gmail.com>
Date: Tue, 11 May 2010 21:27:21 +0800
Subject: [PATCH 07/12] fix some env set bug

---
 src/lxdm.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/lxdm.c b/src/lxdm.c
index 6065e95..e34b20b 100644
--- a/src/lxdm.c
+++ b/src/lxdm.c
@@ -342,7 +342,7 @@ void create_server_auth(void)
         mkdir("/var/run/lxdm",0700);
         authfile = g_strdup("/var/run/lxdm/lxdm.auth");
     }
-    setenv("XAUTHORITY",authfile,0);
+    setenv("XAUTHORITY",authfile,1);
     remove(authfile);
 #if HAVE_LIBXAU
     FILE *fp=fopen(authfile,"wb");
@@ -721,7 +721,7 @@ void startx(void)
     char **args;
 
     if(!getenv("DISPLAY"))
-        putenv("DISPLAY=:0");
+        setenv("DISPLAY",":0",1);
 
 #ifndef DISABLE_XAUTH
     create_server_auth();
@@ -1070,9 +1070,6 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang)
     if(alloc_lang)
         g_free(lang);
     child_watch=g_child_watch_add(pid, on_session_stop, 0);
-
-    printf("xserver %d\n",server_watch);
-    printf("session %d\n",child_watch);
 }
 
 void lxdm_do_reboot(void)
-- 
1.7.0.1