--- rxvt-unicode/src/rxvtd.C 2008/02/19 13:37:17 1.44 +++ rxvt-unicode/src/rxvtd.C 2008/06/15 13:54:15 1.46 @@ -174,16 +174,6 @@ break; else if (!strcmp (tok, "ENV") && recv (tok)) envv->push_back (strdup (tok)); - else if (!strcmp (tok, "CWD") && recv (tok)) - { - if (chdir (tok)) - { - delete envv; - delete argv; - return err ("unable to change to working directory to '%s', aborting: %s.\n", - (char *)tok, strerror (errno)); - } - } else if (!strcmp (tok, "ARG") && recv (tok)) argv->push_back (strdup (tok)); else @@ -211,7 +201,7 @@ term->log_hook = 0; - chdir ("/"); + chdir ("/"); // init might change to different working directory if (!success) term->destroy (); @@ -248,8 +238,10 @@ } } + // optionally open display and never release it. if (opt_opendisplay) - displays.get (getenv ("DISPLAY")); // open display and never release it + if (const char *dpy = getenv ("DISPLAY")) + displays.get (dpy ? dpy : ":0"); // move string logic into rxvt_display maybe? char *sockname = rxvt_connection::unix_sockname (); unix_listener l (sockname);