Actions
Feature #2107
openWait for X during startup
Status:
New
Priority:
Normal
Assignee:
-
Start date:
02/18/2015
Due date:
% Done:
0%
Estimated time:
Description
Falls X noch nicht gestartet ist könnte darauf gewartet werden, steht so auch im Kommentar :)
--- a/video.c 2014-08-12 09:12:10.319479634 +0200 +++ b/video.c 2014-08-12 09:19:45.309759631 +0200 @@ -11240,7 +11240,13 @@ // if no environment variable, use :0.0 as default display name display_name = ":0.0"; } - if (!(XlibDisplay = XOpenDisplay(display_name))) { + for (i=0; i < 30; i++) { + if (XlibDisplay = XOpenDisplay(display_name)) + break; + sleep(1); + } + + if (!XlibDisplay) { Error(_("video: Can't connect to X11 server on '%s'\n"), display_name); // FIXME: we need to retry connection return;
Actions