0

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
  • If you're trying to run some CGI script that needs DISPLAY environment variable, you are probably looking for xvfb-run instead of trying to set the environment variable matching the actual display connected to the server. Commented Jul 11, 2023 at 12:43

1 Answer 1

2

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. 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.