diff options
author | Auke Kok <auke-jan.h.kok@intel.com> | 2012-04-02 11:02:34 -0700 |
---|---|---|
committer | Auke Kok <auke-jan.h.kok@intel.com> | 2012-04-02 11:02:34 -0700 |
commit | 1dd63b129169e9a03f62fe3674dd6b6f96036b60 (patch) | |
tree | dda188393abe44fe5f5675b786be98c6891cd957 | |
parent | c10fe16f77f2dfe151d09d4711010b418694d572 (diff) | |
download | xorg-launch-helper-1dd63b129169e9a03f62fe3674dd6b6f96036b60.tar.gz xorg-launch-helper-1dd63b129169e9a03f62fe3674dd6b6f96036b60.tar.bz2 xorg-launch-helper-1dd63b129169e9a03f62fe3674dd6b6f96036b60.zip |
Move Xauth to just after env(). Stop creating ~/.xsession-errors.
All log output just goes into the journal.
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/user.c | 14 | ||||
-rw-r--r-- | src/xserver.c | 11 |
3 files changed, 2 insertions, 25 deletions
@@ -108,8 +108,6 @@ int main(int argc, char **argv) set_tty(); - setup_xauth(); - setup_pam_session(); switch_to_user(); @@ -143,6 +143,8 @@ void switch_to_user(void) ret = chdir(pass->pw_dir); + setup_xauth(); + fp = fopen(user_xauth_path, "w"); if (fp) { if (XauWriteAuth(fp, &x_auth) != 1) @@ -150,18 +152,6 @@ void switch_to_user(void) fclose(fp); } - /* redirect further IO to .xsession-errors */ - snprintf(fn, PATH_MAX, "%s/.xsession-errors", pass->pw_dir); - fp = fopen(fn, "w"); - if (fp) { - fclose(fp); - /* xserver.c already truncates this file, so append */ - fp = freopen(fn, "a", stdout); - fp = freopen(fn, "a", stderr); - } else { - lprintf("Unable to open \"%s\n\" for writing", fn); - } - d_out(); } diff --git a/src/xserver.c b/src/xserver.c index 9ed7fc8..32b7fe5 100644 --- a/src/xserver.c +++ b/src/xserver.c @@ -304,17 +304,6 @@ void start_X_server(void) } lprintf("starting X server with: \"%s\"", all); - /* redirect further IO to .xsession-errors */ - snprintf(fn, PATH_MAX, "%s/.xsession-errors", pass->pw_dir); - fp = fopen(fn, "w"); - if (fp) { - fclose(fp); - fp = freopen(fn, "w", stdout); - fp = freopen(fn, "w", stderr); - } else { - lprintf("Unable to open \"%s\n\" for writing", fn); - } - execv(ptrs[0], ptrs); d_out(); |