add: DisplayName = XDisplayName(DisplayName); len = strlen(DisplayName)+64; str = wmalloc(len); snprintf(str, len, "DISPLAY=%s", DisplayName); putenv(str);
context: main(int argc, char **argv){    int i;    int i_am_the_monitor= 1;        for (i= 1; i < argc; i++)    {        if (strncmp(argv[i], "--for-real", strlen("--for-real"))==0)        {            i_am_the_monitor= 0;            break;        }    }        if (i_am_the_monitor)      return MonitorLoop(argc, argv);    else      return real_main(argc, argv);}