web.dork Posted September 8, 2008 Share Posted September 8, 2008 As a testbed, I'm trying to develop a PHP GUI for a Linux computer - the GUI is a webpage that is run on the local machine. From this GUI, I want it to be able to launch shell scripts that I have written which are on the same machine. The problem that I am facing is that I can't figure out how to launch these scripts outside of the browser, as it is unable to open a display. I have tried to create a shell script for the PHP to call, such as: export display=localhost:0.0 xterm & with no success of launching the application, as there is still a display problem. So keeping in mind that this entire GUI is for the local machine, how does one launch an application such as this example from a browser? Link to comment https://forums.phpfreaks.com/topic/123279-launch-xterm-from-a-php-browser-gui/ Share on other sites More sharing options...
discomatt Posted September 8, 2008 Share Posted September 8, 2008 You probably want shell_exec() or you can simply backtick (`) your console calls. http://php.net/shell_exec http://php.net/language.operators.execution Link to comment https://forums.phpfreaks.com/topic/123279-launch-xterm-from-a-php-browser-gui/#findComment-636645 Share on other sites More sharing options...
web.dork Posted September 8, 2008 Author Share Posted September 8, 2008 You probably want shell_exec() or you can simply backtick (`) your console calls. http://php.net/shell_exec http://php.net/language.operators.execution Right.. I've figured out that much, but either way AFAIK, the export display statement controls the display issue, only it _isn't_ :/ Link to comment https://forums.phpfreaks.com/topic/123279-launch-xterm-from-a-php-browser-gui/#findComment-636654 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.