Find the answer to your Linux question:
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, ...
  1. #1
    Just 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:

    Code:
    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?

  2. #2
    Trusted Penguin Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,392
    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/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...