I'm running NGINX on a Raspberry Pi across my LAN. I want to use a local web page (PhP) running on the Pi to control VLC on the Pi.
I can only make VLC work in this way by using the "sudo" hack for VLC eg. (see https://askubuntu.com/questions/413542/how-to-use-vlc-with-sudo-privileges)
exec( "sudo vlc /var/www/html/albumplayerv5/temporary.mp3> /dev/null 2>/dev/null &");
Using the terminal or a python script I can run and control VLC using these types of command
dbus-launch vlc
vlc --dbus /var/www/html/albumplayerdbus/test.mp3
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
however I cannot do this via PHP exec
I am aware the this is probably due to permissions (from the machine, it runs as user - pi and the php as user www-data. But despite extensive googling I cant any way round this and I wonder if in fact it is possible?
I'd be most grateful for a simple answer if this is A - possible and B a simple step by step guide (eg. add this user to this group etc.)
I am more than happy to use MPV if it's a VLC issue.