Jump to content

Launch Xterm from a PHP Browser GUI??


web.dork

Recommended Posts

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

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_ :/

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.