LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Accessing a remote application via web interface (http://www.linuxquestions.org/questions/linux-software-2/accessing-a-remote-application-via-web-interface-897911/)

kaplan71 08-17-2011 02:53 PM

Accessing a remote application via web interface
 
Hi there --

We have a system that has a firewall exception which enables it to run a remote X application. To access the application, a script which is local to the system is run by a user to connect to the remote server. Once the connection is made, a script on the remote server is then run to display the application on the workstation.

I would like to set up a web server, Apache, on the workstation to enable multiple users to have access to the application rather than having to set up additional firewall exceptions. The idea is to enable users to use a web browser to access the application on the workstation that already has the exception.

The key here is to have the local and remote scripts work so that the application will appear on whatever workstation is being used to access that which has the exception. If this can be done, what steps are necessary to accomplish this task?

Thanks.

TimothyEBaldwin 08-17-2011 03:30 PM

May I suggest you use SSH instead, it will allow to start the X application using just connection from the workstation.

kaplan71 08-17-2011 03:42 PM

Hi there --

Thanks for your reply. I tried connecting via SSH in a previous attempt, but was unsuccessful at that time. The reason for that failure
was due to the script on the workstation. The text of which is shown below:

Code:

#!/bin/bash

# This script will provide access to the tcs application which
# is located on the mcrs1 server.

# First disable access control so that only the tps server can connect
# to this client.
xhost + <address of network firewall/gateway>

# Establish a telnet session with mcrs3. NOTE: The address in question is
# the address that mcrs1 has on the Partners network, and not the internal
# tcs network address. The syntax shown below is designed to prompt the
# operator for the appropriate username and password.
ssh -x -l tps <address of network firewall/gateway>

When I connected to the workstation that has the script from my pc, I ran the following command
to enable the X application to be displayed on my pc.

Code:

export DISPLAY=<pc address>:0
When I ran the above script, the error message that I received was the following:

Quote:

xhost: must be on local machine to add or remove hosts.
If I can get past this, then the SSH option might work.

TimothyEBaldwin 08-19-2011 07:17 AM

What is wrong with just:
Code:

ssh -X -l tps <address of network firewall/gateway>
No need mess around xhost, DISPLAY or dynamic firewall exceptions.

In your original post you only mention two computers, and now you introduce a third so I confused as to what you trying to do.

jefro 08-19-2011 04:48 PM

I think I'd be looking at freenx or other 2x or nomachine deal.


All times are GMT -5. The time now is 05:19 AM.