Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817

    Can Linux server start appl. on Win box?


    My office has ~24 Windows machines connected to a Windows file server. I want to provide a Linux web interface for a few features, including access to files in the Windows file server. Problem is that if a Windows user clicks a link to a file, that file will get downloaded from the file server to the Windows machine: I need for the Windows machine to open the file same as if Windows Explorer was used. Put another way, I need for the client to open the file in the file server, not download and open a copy of the file.

    I've tried ssh, but I don't know how to make the leap (process-wise) from the Linux system to the Windows system. Is it possible to have a web-page script execute a command (with arguments) on the client machine?

    This is strictly for in-house use, so security needs are only moderate. If a deamon is needed on the client machines, that's okay as long as it works seamlessly. The only objective is to make the files on the server more easily accessed by the users. I don't know much programming, but I'm learning whatever I need to do this: I've gotten into HTML, php, Bash, mySQL and Perl, but I think C may be too much. If Java can do this, that may be okay. I'm not the sys admin, but we really don't have one at all.

    Putting a link in an HTML document on the user's machine works as it should: if the link is to a file, Windows will ask if you want to open the file in the default application ( e.g. file:///c:/letter.doc -> winword.exe). But it won't work if the HTML is on a web server: the web server cannot see above its own root which is at /var/www/html/ or something similar, so the web server says it can't find the file. I tried mounting the Windows shares under the web server root and that's where the file gets copied to the client, instead of allowing the client to open the original file. Even if the file could be opened through the web server, there is the issue of locking the file....

    The issue is not accessing files, but rather opening them as in editing them, using the correct application. I see 2 different ways that it might be done:

    clientUser clicks web page link for a file
    webServer runs a CGI program, using the selected file as a variable which tells the Windows client machine to open the file at which time the Windows machine opens the file on the Windows fileserver.

    ...or...
    clientUser clicks web page link for a file
    webServer drops a cookie on the Windows client
    a daemon running on the Windows machine causes the Windows client machine to open the file at which time the Windows machine opens the file on the Windows fileserver.

    I have done this:
    Installed freesshd on the Windows machine.
    Run ssh from the Linux machine to connect to the Windows machine (this gets a DOS command prompt).
    At the DOS command line, do 'start progname.exe filename' and then the file opens as it should on the Windows machine.

    I want to do pretty much the same thing, except I don't know how to deal with the leap from the *nix shell to the DOS shell. And if you think the answer is CygWin, please explain what command at the CygWin prompt would do the same as the 'start prog...' command does at the DOS prompt.

    Thanks for your help.
    /IMHO
    //got nothin'
    ///this use to look better

  2. #2
    Just Joined! Alex Stan's Avatar
    Join Date
    Aug 2006
    Location
    Hamilton, Ontario
    Posts
    90
    -->
    You can use an apache server with php, and php has a function that executes programs.

    So what you do is: install apache on every client and when the server wants to open something on a client just visits a php script from the client.

Posting Permissions

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