+/* Find the right display, returns an allocated string */
+char *x11_display(const char *display) {
+ if(!display || !*display)
+ if(!(display = getenv("DISPLAY")))
+ display = ":0";
+ if(display[0] == ':') {
+ /* no transport specified, use whatever we think is best */
+ return dupcat(platform_x11_best_transport, display, (char *)0);
+ } else
+ return dupstr(display);
+}
+