Results 1 to 2 of 2
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, ...
- 09-08-2008 #1Just Joined!
- Join Date
- Sep 2008
- Posts
- 1
Launch Xterm from a Browser
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:
with no success of launching the application, as there is still a display problem.Code:export display=localhost:0.0 xterm &
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?
- 09-12-2008 #2
Hmmm, there is no route to display 'localhost:0.0' over the X if the final display is a browser. You'd need to do some kind of vnc service, which has a broser compatible javascript engine I believe.
What you're trying to do does strike me as being a security nightmare. All the big browsers have security models that are intended to prevent what you're trying to do - access the local filesystem directly.
Maybe you should look to setting up a logged-on user's own private 'browser-based-desktop' area in their own space on the server, create the 'desktop' files in that, and find a way to interpret that data store to provide a browser compatible/visible display?Linux user #126863 - see http://linuxcounter.net/


Reply With Quote