Is there any configuration file to modify in order to enable the DISPLAY environment variable before apache2 makes the call to my cgi-script?
1 Answer
Why does Apache2 disable DISPLAY environment variable?
Apache does not disable it since Apache does not know a DISPLAY variable. DISPLAY is related to the X Window system.
If you want to set DISPLAY I would use /etc/rc.local. But you must make sure that the command for setting the DISPLAY variable is called before starting the application server.
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing.
DISPLAYenvironment variable, you are probably looking forxvfb-runinstead of trying to set the environment variable matching the actual display connected to the server.