The same way as https://askubuntu.com/questions/364458/running-gui-app-with-php, I need to run a X11 application (VLC) from a php page on Apache server.
I need to open the VLC application on the server, not on the remote system.
I'm trying to get this through a php shell_exec call to a shell script containing the VLC commands.
The sh script correctly opens the VLC app if launched from command line, but not through the php call, because it does not find (I think) any X11 session initiated: it returns related error messages:
- inhibit interface error: Failed to connect to the D-Bus session daemon: //bin/dbus-launch terminated abnormally with the following error: No protocol specified - Autolaunch error: X11 initialization failed. - main interface error: no suitable interface module - xcb_xv vout display error: parent window not available - ...
If I grant the apache user, www-data, to connect to the X server
it works for the video but not for audio; the windows opens and plays the video but without sound and still other error messages related to audio server...
export DISPLAY=:0 does not seem to have any effect.
Any help would be appreciated.