Call xsetenv() in main process instead of child