LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-16-2006, 06:23 PM   #1
drakebasher
Member
 
Registered: Aug 2004
Location: Proprio Qui
Distribution: Debian
Posts: 85

Rep: Reputation: 16
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. I'm sure you have questions....

Thanks-
 
Old 10-16-2006, 07:41 PM   #2
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
will Samba work for you?

edit> sorry i misread the question.. samba is not what you are looking for..

Last edited by xhi; 10-16-2006 at 07:42 PM.
 
Old 10-17-2006, 01:13 AM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
I'm not sure if it can be done as you described.

You can start an application in IE
Solution 1)
*
there must be a shortcut on the users desktop (i.e. to msword)
*
type the name of the shortcut in the address bar and it will launch the application

Solution 2)
*
the following html example shows how to create a link that will start an app (in this case pfe32)
Code:
<HTML>
<HEAD>
<HEAD>
<BODY>
<A href="file:///C:\Program Files\pfe\pfe32.exe">pfe32</a>
</BODY>
</HTML>
In both cases, you must check if it's possible to pass arguments; I did not manage in a short time to get it right.

Further, in both cases, there will be a reference to a drive somewhere (the shortcut will refer to a program on a drive, the html file will refer to a drive). This requires samba on the linux machine to be configured so you can map network drives.
And when you use samba, it might be just as easy to map the network drive so the users can start the application from windows explorer.

And last, but not least, this might only work in IE. Or will involve changes in security settings of the browser.
 
Old 10-17-2006, 09:07 AM   #4
drakebasher
Member
 
Registered: Aug 2004
Location: Proprio Qui
Distribution: Debian
Posts: 85

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Wim Sturkenboom
the following html example shows how to create a link that will start an app (in this case pfe32)...
That works fine in an HTML document on the user's machine. And 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....

Thanks for your thoughts, though.
 
Old 10-17-2006, 05:58 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
AFAIK don't think it is doable with just a webserver/web browser. Why not use samba?
 
Old 10-17-2006, 06:17 PM   #6
drakebasher
Member
 
Registered: Aug 2004
Location: Proprio Qui
Distribution: Debian
Posts: 85

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by michaelk
AFAIK don't think it is doable with just a webserver/web browser. Why not use samba?
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 trying to help.
 
Old 10-17-2006, 07:00 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
You can configure windows to open the file in the application instead of the web browser or downloading when you click on a file. The problem lies in saving changes back to the server.

Samba allows file/print sharing between linux and windows. You can access the linux file server via network neighborhood, connect to it as a drive letter, have the capability to click on a file in explorer and have file locking capabilities.

www.samba.org

I do not understand the advantage of your web broswer vs the windows file server.

Last edited by michaelk; 10-17-2006 at 07:02 PM.
 
Old 10-17-2006, 07:51 PM   #8
drakebasher
Member
 
Registered: Aug 2004
Location: Proprio Qui
Distribution: Debian
Posts: 85

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by michaelk
I do not understand the advantage of your web broswer vs the windows file server.
Good point. Opening files is only part of what I want to do and it's the only part that I see a problem with. We have a bunch of active projects, each with 2 folders on the file server (on 2 DIFFERENT drives...) and other project-specific files outside of those folders. At this time, for users to access any given file, they need to know the job number (find a hard-copy list...) and then click this-click-that etc to get to where they want to be. Right now, other than the common job number, there is no connection between the project "docs" folder and the project "cad" folder. My plan is to have a web interface where the user can enter a job number or run a search on key words or whatever for the job description, client, whatever in order to access a dynamically generated "home page" for the project. The home page would have content which is not readily shared in our present scheme and it would naturally provide links to the project files. Granted, the file server system is poorly organized and fixing that could make things a bit better, but, as I said, I'm not the sysadmin (and I don't want to be: but I wouldn't mind being the one to hire the one to replace our current one...).

Thanks for asking~
 
Old 10-17-2006, 11:48 PM   #9
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by drakebasher
That works fine in an HTML document on the user's machine. And 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....

Thanks for your thoughts, though.
You wanted to start an application, not open a file with an application. But OK ..., probably my misunderstanding.

Unless I understand you incorrectly: a webserver can see above the root. That's the way that I hide i.e. files with passwords for database access.
Code:
DocumentRoot "/server/www/htdocs/btd/web"
apache can still access files in /server/www/htdocs/btd/ or /server/www/htdocs/btd/other_directory

With regards to the locking: Somewhere I hear something whisper CVS ... CVS ... CVS ... CVS. People can check out drawings, modify them and commit them. If someone else checks out the same drawing, modifies it and commits it, he/she will at least be warned that the file was modified by another user.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can connect my win 98 laptop to my linux box newusermike Linux - Networking 1 09-06-2005 06:16 PM
win XP can't connect to linux box using samba nebs Linux - Networking 3 02-20-2005 11:42 AM
Anti-MS guy seeks mail server appl. dtournas Linux - General 4 09-22-2003 02:22 AM
setting up a network between a linux and win box Jo_Nak Linux - Networking 0 08-26-2003 04:26 PM
How do I access files on Win box from Linux box zanew Linux - Networking 5 06-12-2002 11:58 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration