Skip to contentSkip to conversation

calibrate: do not override DISPLAY env var on xset

PATCH New Sergey Alirzaev 1 participant 1 message Aug 16, 2018

lore
Share & tools
lore

Sergey Alirzaev

author
#0 lore raw

PATCH 1/1 calibrate: do not override DISPLAY env var on xset

since X may live on another display, and the variable exists for this very case

---
 src/calibrate/calibrate.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
src/calibrate/calibrate.cpp +4 -4
index 745d544..4efb5a6 100644
@@ -353,20 +353,20 @@ static void backlight_calibration(void)
 		sleep(1);
 	}
 	printf(_("Calibrating idle\n"));
-	if(!system("DISPLAY=:0 /usr/bin/xset dpms force off"))
+	if(!system("/usr/bin/xset dpms force off"))
 		printf("System is not available\n");
 	one_measurement(15, 15, NULL);
-	if(!system("DISPLAY=:0 /usr/bin/xset dpms force on"))
+	if(!system("/usr/bin/xset dpms force on"))
 		printf("System is not available\n");
 }
 
 static void idle_calibration(void)
 {
 	printf(_("Calibrating idle\n"));
-	if(!system("DISPLAY=:0 /usr/bin/xset dpms force off"))
+	if(!system("/usr/bin/xset dpms force off"))
 		printf("System is not available\n");
 	one_measurement(15, 15, NULL);
-	if(!system("DISPLAY=:0 /usr/bin/xset dpms force on"))
+	if(!system("/usr/bin/xset dpms force on"))
 		printf("System is not available\n");
 }
 
Signature · 1 line
2.18.0