If I try to run the command export DISPLAY inside my PHP script it fails to work but if I run it via command line it does work. Is this a known issue or is there a better way?
The script is being called via a webpage.
My PHP command:
$process = 'export DISPLAY=:0 && ' . $command;
exec("$process $htmlname $exportname");
The error I see when running from the webpage is:
Gtk-WARNING **: cannot open display:
You can set up environment before system call with e.g. http://php.net/manual/en/function.putenv.php . This could cause a window open on the webserver desktop. You might also need to disable X11 xauth authentication with xhost +