I want to try to open gnome-terminal from php script:
shell_exec('bash /data/manager/application/.shell/system.sh');
This script use a function to check terminal:
SCRIPTCURRENT=`readlink -m $0`
SCRIPTCURRENTPATH=$(dirname "$SCRIPTCURRENT")
runintoterminal () {
if ! [ -t 1 ]; then
gnome-terminal -e "bash $1"
exit 0
fi
}
runintoterminal $SCRIPTCURRENT
I've tried:
shell_exec('gnome-terminal');
But it's doesn't work... (I know it's possible...) But how to ?
I use nginx and php-fpm. With my own socket. nginx and socket use my user and not www-data. (I'm on ubuntu 14.04LTS)
I've try 0777 rights...
My bash script can run from netbeans IDE ans terminal... but not from php...