Re: Using Files Without Mounting A Share From Another System
On Sat, May 14, 2011 at 1:26 AM, Brian Ryans brian.l.ry...@gmail.com wrote: Quoting Camaleón on 2011-04-23 05:44: Nowadays it should handle smb:// or other network protocol just the same Quoting Erwan David on 2011-04-23 08:48: (re: Camaleón) Prgrams that I know which do this (eg emacs with tramp editing) use a temporary copy on local file. And it is the applicaton which deals with this, not the OS. This is the same method vim uses with its netrw plugin. Each app handles it itself (as vim and emacs do) or (theoretically) uses some library to do it (as I believe KDE does; haven't used KDE since etch) Unfortunately, these methods vary, tremendously, with applications. For example, I would use Emacs to edit files show them to a colleague, make my changes, and then save it.. But he would review it by editing it with vi, *while I had it open*, and when he quit it would overwrite my work, even though he was using vi in read-only mode. Drove me *NUTS* when I realized: He was mad at me for making unauthorized changes in core system files, and I was *furious* at him for using an editor to simply *review* a file, and he absolutely refused to put the things under any normal source control. The point is, don't believe that because one application handles file locking responsibly, that other applications will cooperate with it. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/BANLkTi=os_uqau7osx0ko4pmptukjk5...@mail.gmail.com
Re: Using Files Without Mounting A Share From Another System
Quoting Camaleón on 2011-04-23 05:44: Nowadays it should handle smb:// or other network protocol just the same Quoting Erwan David on 2011-04-23 08:48: (re: Camaleón) Prgrams that I know which do this (eg emacs with tramp editing) use a temporary copy on local file. And it is the applicaton which deals with this, not the OS. This is the same method vim uses with its netrw plugin. Each app handles it itself (as vim and emacs do) or (theoretically) uses some library to do it (as I believe KDE does; haven't used KDE since etch) -- _ Brian Ryans 8B2A 54C4 E275 8CFD 8A7D 5D0B 0AD0 B014 C112 13D0 . ( ) ICQ 43190205 | Mail/Jabber/Yahoo/MSN: brianlry...@gmail.com ..: X ASCII Ribbon Campaign Against HTML mail and v-cards: asciiribbon.org / \ Modern man has an approximately 140-character attention span. -- blr signature.asc Description: Digital signature
Re: Using Files Without Mounting A Share From Another System
On 2011-04-25, Hal Vaughan h...@halblog.com wrote: --- SNIP --- A couple points here. I checked the source code for the Dynamic Tree Demo that is used as a JNLP demo. Now I will admit I haven't been using Java for a couple years and have some catching up to do (I think I was using Java 5, but know I've totally missed Java 6), but when I went over the source code for that demo, there was no main() method in the source. Or, more correctly, there was, but it was commented out. That, right there, is an indication that if you're writing an app in Java to be launched normally, there will be different preparations than if you're using JNLP. (I haven't used JNLP yet, but I did write some applets and even set up a couple Java apps to be both apps and applets.) I can only think that the main() method was commented out later on. A Java application deployed using JNLP has its entry point in the main method, just like any other Java application. See the third bullet point in the development tutorial[1]. I even looked at their more in depth tutorial on deploying a JNLP project, but didn't find any way to launch one, other than through a browser. (Which I don't want to do -- then I have to figure out the default browser from within a Java class on Windows, Linux, and OS X and launch it.) You don't need to do that. You simply need the relevant file association on the client. On a Debian system you have: $ grep jnlp /usr/share/applications/mimeinfo.cache application/x-java-jnlp-file=sun-java6-javaws.desktop When the .jnlp file is accessed over HTTP using a web browser, the browser passes the file to the local javaws executable. Here the browser is simply arranging the transport. Equally, the user could access the .jnlp file using Windows Explorer or Nautilus, etc. You can even go directly to the file from the command line: javaws http://download.oracle.com/docs/cd/E17746_01/tutorialJWS/deployment/webstart/ex6/webstart_ComponentArch_DynamicTreeDemo/dynamictree-webstart.jnlp (There is an understandable but unfortunate tendency to confuse Java Web Start with applet technology. An applet runs in isolation within a web browser (at least we hope it does). In the case of JWS, once the resources are delivered to the client then the browser or file manager is out of the picture.) You need some sort of xml file defining the app to launch and while java does not (want to) understand the smb:// protocol we are stuck. I can indeed play JNLP based java applications that are hosted online but I cannot run the java application I want to run while is on samba share. At least not directly ;-( Try using a UNC path in the JNLP descriptor, e.g., file:server/share/app.jar. Windows clients will understand that. This works on Windows, with SMB, but that brings us back to the original point: Accessing a file on a network share without mounting the share. On Windows, since SMB is built in, you can easily do that. On Linux, you can't. You can use smbclient and copy the file over to your system if it's on an SMB share, but nobody yet has provided a way to access a file on a network share from Linux without either mounting the share or copying the file over to the local computer first. Yes, that is a problem. I'm looking at Java RMI, but that involves certificates and so on and I'm still not sure if I will easily be able to put that much on a client system that is trying to run the program. And you would still have the problem of deploying Java software to each client machine. Are you in a position to put a web server on the machine which offers the network share? That would allow you to serve up a .jnlp file and its associated JAR file in a simple, standard and platform-neutral way. I'll stop evangelising now :-) [1] http://download.oracle.com/javase/tutorial/deployment/webstart/developing.html -- Liam O'Toole Cork, Ireland -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/slrniraidm.enl.liam.p.otoole@dipsy.tubbynet
Re: Using Files Without Mounting A Share From Another System
On Sun, 24 Apr 2011 20:33:45 +, Liam O'Toole wrote: On 2011-04-24, Camaleón wrote: (...) Once the user trusts the application, the local JVM will load and run the JAR file exactly as if it had originally resided on the local hard drive. Yes, but not all java applications are ready to be used with that method. If you can tell me a sample case, I will test :-) --- SNIP --- I cannot provide you with a sample case to prove a negative! Instead I invite you to download the sample .jnlp file in the link I provided earlier and modify it to suit your LAN. Okay, I just have tried to create a JNLP file to launch the JAR file that is stored on a samba share but I'm still facing the same problem that we are encountering from the beginning: smb:// protocol is not detected ;-( If I place the test.jnlp file locally it can be run (it fails because it looks for a signature file that seems to be missed from the original jar but anyway it recognizes the JAR and tries to launch it), but when I put the same test.jnlp file over a samba share and run the app from a linux client it does not work (java.io.FileNotFoundException: smb:/host/ share/test.jnlp (No such file or directory). Needless to say the same test.jnlp that is located on the network share runs fine when it's launched from a windows client ;-( Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.04.25.14.21...@gmail.com
Re: Using Files Without Mounting A Share From Another System
On 2011-04-25, Camaleón noela...@gmail.com wrote: On Sun, 24 Apr 2011 20:33:45 +, Liam O'Toole wrote: On 2011-04-24, Camaleón wrote: (...) Once the user trusts the application, the local JVM will load and run the JAR file exactly as if it had originally resided on the local hard drive. Yes, but not all java applications are ready to be used with that method. If you can tell me a sample case, I will test :-) --- SNIP --- I cannot provide you with a sample case to prove a negative! Instead I invite you to download the sample .jnlp file in the link I provided earlier and modify it to suit your LAN. Okay, I just have tried to create a JNLP file to launch the JAR file that is stored on a samba share but I'm still facing the same problem that we are encountering from the beginning: smb:// protocol is not detected ;-( If I place the test.jnlp file locally it can be run (it fails because it looks for a signature file that seems to be missed from the original jar but anyway it recognizes the JAR and tries to launch it), but when I put the same test.jnlp file over a samba share and run the app from a linux client it does not work (java.io.FileNotFoundException: smb:/host/ share/test.jnlp (No such file or directory). Needless to say the same test.jnlp that is located on the network share runs fine when it's launched from a windows client ;-( That's a pity. I suspect that smb:// it is not supported by Java because, like sftp://, it is not an official scheme[1]. So, you would have to serve the .jnlp file and its resources from an HTTP or FTP server to make the solution truly portable. [1] http://en.wikipedia.org/wiki/URI_scheme#Unofficial_but_common_URI_schemes -- Liam O'Toole Cork, Ireland -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/slrnirbae4.enl.liam.p.otoole@dipsy.tubbynet
Re: Using Files Without Mounting A Share From Another System
On Apr 25, 2011, at 6:15 AM, Liam O'Toole wrote: On 2011-04-25, Hal Vaughan h...@halblog.com wrote: --- SNIP --- A couple points here. I checked the source code for the Dynamic Tree Demo that is used as a JNLP demo. Now I will admit I haven't been using Java for a couple years and have some catching up to do (I think I was using Java 5, but know I've totally missed Java 6), but when I went over the source code for that demo, there was no main() method in the source. Or, more correctly, there was, but it was commented out. That, right there, is an indication that if you're writing an app in Java to be launched normally, there will be different preparations than if you're using JNLP. (I haven't used JNLP yet, but I did write some applets and even set up a couple Java apps to be both apps and applets.) I can only think that the main() method was commented out later on. A Java application deployed using JNLP has its entry point in the main method, just like any other Java application. See the third bullet point in the development tutorial[1]. OKay, I see that in link you provided. It was in another class - I had looked at it several times but didn't see it. (I always give a line break between methods in a class and anything else and they didn't, due to a learning disability with symbol recognition, so I missed it until I used grep.) I even looked at their more in depth tutorial on deploying a JNLP project, but didn't find any way to launch one, other than through a browser. (Which I don't want to do -- then I have to figure out the default browser from within a Java class on Windows, Linux, and OS X and launch it.) You don't need to do that. You simply need the relevant file association on the client. On a Debian system you have: $ grep jnlp /usr/share/applications/mimeinfo.cache application/x-java-jnlp-file=sun-java6-javaws.desktop Okay, that works for me. One thing I said earlier was that I figure, at this point, I can count on Java being installed on the client's desktop computer. (I'll fill you in on that at the end of the email, since there's a few items I've mentioned already.) I also just tested it on Windows (I only have up through XP and use it in a VM on my iMac) and javaws is in the path. I don't know where the file associations are stored in Windows (probably in the registry), but in my case I think it's a relatively safe gamble that if Java is installed, javaws will be the default to handle a jnlp file. When the .jnlp file is accessed over HTTP using a web browser, the browser passes the file to the local javaws executable. Here the browser is simply arranging the transport. Equally, the user could access the .jnlp file using Windows Explorer or Nautilus, etc. You can even go directly to the file from the command line: javaws http://download.oracle.com/docs/cd/E17746_01/tutorialJWS/deployment/webstart/ex6/webstart_ComponentArch_DynamicTreeDemo/dynamictree-webstart.jnlp I just tested that on Linux, OS X, and Windows. It works on all three of them. I had some trouble on Linux, since it's on a VM and doesn't have X and wasn't set to forward, but the fact that I got a Java error message tells me Java (or javaws) was attempting to run the program and did make it to the class file. (There is an understandable but unfortunate tendency to confuse Java Web Start with applet technology. An applet runs in isolation within a web browser (at least we hope it does). In the case of JWS, once the resources are delivered to the client then the browser or file manager is out of the picture.) And that is a problem I was having. I had never used JWS before and thought it was related to an applet. You need some sort of xml file defining the app to launch and while java does not (want to) understand the smb:// protocol we are stuck. I can indeed play JNLP based java applications that are hosted online but I cannot run the java application I want to run while is on samba share. At least not directly ;-( Try using a UNC path in the JNLP descriptor, e.g., file:server/share/app.jar. Windows clients will understand that. This works on Windows, with SMB, but that brings us back to the original point: Accessing a file on a network share without mounting the share. On Windows, since SMB is built in, you can easily do that. On Linux, you can't. You can use smbclient and copy the file over to your system if it's on an SMB share, but nobody yet has provided a way to access a file on a network share from Linux without either mounting the share or copying the file over to the local computer first. Yes, that is a problem. There's more to the issue than that -- again, see below, so those that saw the first email don't have to read it all. I'm looking at Java RMI, but that involves certificates and so on and I'm still not sure if I will easily be able to put that much
Re: Using Files Without Mounting A Share From Another System
On Apr 25, 2011, at 10:21 AM, Camaleón wrote: On Sun, 24 Apr 2011 20:33:45 +, Liam O'Toole wrote: On 2011-04-24, Camaleón wrote: (...) Once the user trusts the application, the local JVM will load and run the JAR file exactly as if it had originally resided on the local hard drive. Yes, but not all java applications are ready to be used with that method. If you can tell me a sample case, I will test :-) --- SNIP --- I cannot provide you with a sample case to prove a negative! Instead I invite you to download the sample .jnlp file in the link I provided earlier and modify it to suit your LAN. Okay, I just have tried to create a JNLP file to launch the JAR file that is stored on a samba share but I'm still facing the same problem that we are encountering from the beginning: smb:// protocol is not detected ;-( If I place the test.jnlp file locally it can be run (it fails because it looks for a signature file that seems to be missed from the original jar but anyway it recognizes the JAR and tries to launch it), but when I put the same test.jnlp file over a samba share and run the app from a linux client it does not work (java.io.FileNotFoundException: smb:/host/ share/test.jnlp (No such file or directory). Needless to say the same test.jnlp that is located on the network share runs fine when it's launched from a windows client ;-( I think this setup will solve both our problems. But don't try to launch it from a network share, set up Apache (or another web server) and launch it through there. I tried Liam's example from the command line and it works perfectly -- it just means we have to put the program in a directory where Apache can serve it, instead of sharing it through SMB or NFS. Hal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/5c22b99f-f222-4756-9b3e-43cd62381...@halblog.com
Re: Using Files Without Mounting A Share From Another System
On Apr 25, 2011, at 1:05 PM, Liam O'Toole wrote: On 2011-04-25, Camaleón noela...@gmail.com wrote: On Sun, 24 Apr 2011 20:33:45 +, Liam O'Toole wrote: On 2011-04-24, Camaleón wrote: (...) Once the user trusts the application, the local JVM will load and run the JAR file exactly as if it had originally resided on the local hard drive. Yes, but not all java applications are ready to be used with that method. If you can tell me a sample case, I will test :-) --- SNIP --- I cannot provide you with a sample case to prove a negative! Instead I invite you to download the sample .jnlp file in the link I provided earlier and modify it to suit your LAN. Okay, I just have tried to create a JNLP file to launch the JAR file that is stored on a samba share but I'm still facing the same problem that we are encountering from the beginning: smb:// protocol is not detected ;-( If I place the test.jnlp file locally it can be run (it fails because it looks for a signature file that seems to be missed from the original jar but anyway it recognizes the JAR and tries to launch it), but when I put the same test.jnlp file over a samba share and run the app from a linux client it does not work (java.io.FileNotFoundException: smb:/host/ share/test.jnlp (No such file or directory). Needless to say the same test.jnlp that is located on the network share runs fine when it's launched from a windows client ;-( That's a pity. I suspect that smb:// it is not supported by Java because, like sftp://, it is not an official scheme[1]. I'm almost positive SMB is not supported by Java and it's Windows/DOS that supports it when you're testing. I found I can list a directory on an unmounted SMB share from DOS with dir \\server\\dirctory. Also, if you go to Samba's website, somewhere on there is a CIFS jar that provides SMB/CIFS for Java. If it were already supported, I doubt they'd be doing that. Hal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/ad3196cf-0511-4c39-b0dc-25fea001c...@halblog.com
Re: Using Files Without Mounting A Share From Another System
On Mon, 25 Apr 2011 17:05:08 +, Liam O'Toole wrote: On 2011-04-25, Camaleón wrote: (...) If I place the test.jnlp file locally it can be run (it fails because it looks for a signature file that seems to be missed from the original jar but anyway it recognizes the JAR and tries to launch it), but when I put the same test.jnlp file over a samba share and run the app from a linux client it does not work (java.io.FileNotFoundException: smb:/host/ share/test.jnlp (No such file or directory). Needless to say the same test.jnlp that is located on the network share runs fine when it's launched from a windows client ;-( That's a pity. I suspect that smb:// it is not supported by Java because, like sftp://, it is not an official scheme[1]. Maybe... but then nfs:// should be OK :-) So, you would have to serve the .jnlp file and its resources from an HTTP or FTP server to make the solution truly portable. That's a bit (a lot) overwhelming, at least for me. I prefer to place a copy of the JAR file locally on every linux client and keep the windowses ones accessing to the share. [1]http://en.wikipedia.org/wiki/URI_scheme#Unofficial_but_common_URI_schemes Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.04.25.17.30...@gmail.com
Re: Using Files Without Mounting A Share From Another System
On 2011-04-25, Hal Vaughan h...@halblog.com wrote: --- SNIP --- On Apr 25, 2011, at 6:15 AM, Liam O'Toole wrote: --- SNIP --- Are you in a position to put a web server on the machine which offers the network share? That would allow you to serve up a .jnlp file and its associated JAR file in a simple, standard and platform-neutral way. Yes, I can put apache on the server without a problem. Considering it's an embedded system and only has 500 MB and 500 Mhz, I was hoping I wouldn't need it, but I can use it. Consider using a lightweight alternative such as thttpd. I'll stop evangelising now :-) No, don't stop. You've actually solved my problem! I know I can find this through experimentation and more research, but just in case you know off the top of your head, will the Java program being run through JNLP have a sandbox like an applet does? (I know they're different, but will JNLP programs have a sandbox?) And do you know if I can access $PATH (or the Windows equivalent) in the JNLP program so I could call another executable on that computer if I needed to? Once the application is signed, and is accepted by the user, it will be granted unrestricted access. For accessing environment variables and calling executables, see the java.lang.System and java.lang.Runtime classes, respectively. That approach is frowned upon, however, because it implies writing platform-dependent code and is not considered pure Java. But if it gets the job done ... -- Liam O'Toole Cork, Ireland -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/slrnirbgq5.enl.liam.p.otoole@dipsy.tubbynet
Re: Using Files Without Mounting A Share From Another System
On Apr 25, 2011, at 2:53 PM, Liam O'Toole wrote: On 2011-04-25, Hal Vaughan h...@halblog.com wrote: --- SNIP --- On Apr 25, 2011, at 6:15 AM, Liam O'Toole wrote: --- SNIP --- Are you in a position to put a web server on the machine which offers the network share? That would allow you to serve up a .jnlp file and its associated JAR file in a simple, standard and platform-neutral way. Yes, I can put apache on the server without a problem. Considering it's an embedded system and only has 500 MB and 500 Mhz, I was hoping I wouldn't need it, but I can use it. Consider using a lightweight alternative such as thttpd. Thanks -- sometimes you get so used to one package as a standard you forget about the others! I'll stop evangelising now :-) No, don't stop. You've actually solved my problem! I know I can find this through experimentation and more research, but just in case you know off the top of your head, will the Java program being run through JNLP have a sandbox like an applet does? (I know they're different, but will JNLP programs have a sandbox?) And do you know if I can access $PATH (or the Windows equivalent) in the JNLP program so I could call another executable on that computer if I needed to? Once the application is signed, and is accepted by the user, it will be granted unrestricted access. I have to look into this. I remember reading up on it once before. Since my app is on a server on their LAN, I'm trying to make sure they're not going to an outside website for anything and dealing with certification would require that. For accessing environment variables and calling executables, see the java.lang.System and java.lang.Runtime classes, respectively. That approach is frowned upon, however, because it implies writing platform-dependent code and is not considered pure Java. But if it gets the job done ... The other way the client will need to access the server is to run Abiword on the server, with X forwarding set up. On Windows, that means running Xming at \\myserver\\directory\\xming.exe and using Portable PuTTY, which will be at \\myserver\\directory\\putty.exe, but both OS X and Linux will use ssh with X forwarding enabled, so I'm already having to do platform specific stuff, just not much of it. The client has to be able to run Abiword on the server with X-forwarding working and unless I get Java ssh classes AND an x server (that doesn't have any lag), I think I'm going to have to handle it with platform specific code. Other than that, it should all be universal code. Thanks! Hal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/83f5b785-7700-4258-afe6-0e0bf522f...@halblog.com
Re: Using Files Without Mounting A Share From Another System
On Sun, 24 Apr 2011 00:13:17 -0400, Hal Vaughan wrote: On Apr 23, 2011, at 12:00 PM, Camaleón wrote: I still don't know if it's a security measure or just a technical barrier that needs the use of another applications to be bypassed. In fact, I can run a .jar file over smb:// using Nautilus but this is what I get: Do you mean you could run the jar or that you tried to? It can be run, but the result is not what I expected (I don't want to treat the file as an archiver that can be unzipped it but as runeable program that laucnh the main java class file). 1/ Jar file is executed but it opens with file roller (archiver utility) 2/ When I try to change file permisson to make it executable I get an error (cannot change permissions to file.jar) Did you try to change permissions from the server itself or from the client? It sounds like you tried to change permissions from the client. Yes, from the client. Server holding the share is a Windows XP and the perms for the volume are the standard (they are inherited, but group users -to which belong the debian user- are able to [x] modify, [x] read and execute, [x] read and lastly [x] write. Over Nautilus I can see the jar file is set to 744 (rwxr--r-) and owned by my debian user/group but when I double click on it java is not launched, just the unarchiver utility. All this done over a NTFS volume managed by a Windows host. Maybe a samba share over a linux filesystem (ext3/4/reiser/xfs...) gives different results... dunno :-? I think Linux might give better control over things like permissions. In my case, the server will be running Debian 6.x. Now you mention... I've got a samba share on a Debian server (this is in another network), and windows clients accessing to it. I can make some tests here, will report back as soon as I can give any news on this :-) Thanks for trying that -- I'm still searching and testing, but I haven't gotten anything to work and I need to create a test jar file I can work with. I'm also interested on this. I have a jar file (the application is a fax client for HylaFAX) that needs to be accessed/launched over the network because by doing so I only have to update one file and then all the clients are automatically updated. In windows machines there was no problem in doing so but as you, I didn't want to mount a samba share on the linux clients and looked for a solution -this was a setup I've done years ago- and finally had to copy the jar file in every linux client... but now you raised the issue again I thought this could have been solved but it seems it isn't :-) Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.04.24.10.16...@gmail.com
Re: Using Files Without Mounting A Share From Another System
On 2011-04-24, Camaleón noela...@gmail.com wrote: I have a jar file (the application is a fax client for HylaFAX) that needs to be accessed/launched over the network because by doing so I only have to update one file and then all the clients are automatically updated. Java technology offers a standard way of doing that: Java Web Start. It is possible to deploy a third-party application using a JNLP file[1]. [1] http://download.oracle.com/javase/tutorial/deployment/webstart/deploying.html (I have come very late to this thread, so forgive me if the above has already been mentioned.) -- Liam O'Toole Cork, Ireland -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/slrnir8err.enl.liam.p.otoole@dipsy.tubbynet
Re: Using Files Without Mounting A Share From Another System
On Sun, 24 Apr 2011 15:02:19 +, Liam O'Toole wrote: On 2011-04-24, Camaleón wrote: I have a jar file (the application is a fax client for HylaFAX) that needs to be accessed/launched over the network because by doing so I only have to update one file and then all the clients are automatically updated. Java technology offers a standard way of doing that: Java Web Start. It is possible to deploy a third-party application using a JNLP file[1]. Yes but no, that's a completely different approach (AFAIK, the application has to be prepared/packaged to use it and most of the java apps out there are not intended for that purpose, meaning they are not going to be launched/run online). [1] http://download.oracle.com/javase/tutorial/deployment/webstart/ deploying.html (I have come very late to this thread, so forgive me if the above has already been mentioned.) I already knew that tool but I'm afraid it does not work the way I want (or the way Windows clients do) ;-( Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.04.24.15.28...@gmail.com
Re: Using Files Without Mounting A Share From Another System
On Sun, Apr 24, 2011 at 12:28:01AM -0400, Hal Vaughan wrote: On Apr 23, 2011, at 3:51 PM, Rob Owens wrote: On Fri, Apr 22, 2011 at 01:03:00PM -0400, Hal Vaughan wrote: I now know I can use smbclient to read files on an SMB share without having to mount it, but I need to do more than that. I want to be able to access either Java classes or an executable on a shared volume on a server without having to mount the volume on the local system. (There are a couple reasons for not wanting to mount.) I know on Windows I can list the files on an SMB share on another system and access them using SMB/CIFS by just specifying the volume properly on the command line. I want to do something like that on Linux, but do more than just listing the files or copying them to the local computer. I need a way, on Linux, to access files on a network share, which could be SMB or NFS (or something else) without mounting the volume. For example, if I'm on System A and I have an executable on System B, and it's on a network share on System B, is there any way to run that executable without mounting that share as a volume on System A? Here's a possible workaround. It involves mounting, but as a regular user. I'd use sshfs. The remote server needs to have an ssh server running. Then you can run this: sshfs remoteserver:/some/path localdir Then you can ls localdir, or operate on any of the files there. If you use public key authentication and ssh-add, you can do this without needing to enter a password. I've never used this to access a non-linux machine, but in theory it should work on anything that is running an ssh server. That is mounting, but, as I mentioned in another email, clients that use Linux on a desktop are a lot easier to deal with on these things than Windows users. I still have to test on Windows to be sure that I can actually run a jar from an unmounted SMB share. I can operate on files like that, so I would think I can run a jar that way. sshfs sounds like a good idea and I'll look into it. That would work on both the Mac and Linux. Thanks! I'm not sure if cygwin has sshfs available, but if it does then you could use sshfs from a Windows box. -Rob -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110424155012.ga14...@aurora.owens.net
Re: Using Files Without Mounting A Share From Another System
On Sun, 24 Apr 2011 10:16:15 +, Camaleón wrote: I think Linux might give better control over things like permissions. In my case, the server will be running Debian 6.x. Now you mention... I've got a samba share on a Debian server (this is in another network), and windows clients accessing to it. I can make some tests here, will report back as soon as I can give any news on this :-) Tested and I cannot get it to work ;-( What I've found out by searching the web is a possible workaround that makes use of GVFS and Fuse (this is under GNOME). By using these two daemons one can run gvfs-mount //server/share and it will recreate the full structure of the network share under ~/.gvfs/ share at server so java -jar pointing to this path does not complain and runs the file fine. This is something like doing mount -t cifs ... with the advantadge that this can be done by the user itself (no root password needed) so the virtual mount point can be mounted only when required -on the fly-, no need no edit /etc/fstab and define the static samba share on every boot. Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.04.24.16.43...@gmail.com
Re: Using Files Without Mounting A Share From Another System
On 2011-04-24, Camaleón noela...@gmail.com wrote: On Sun, 24 Apr 2011 15:02:19 +, Liam O'Toole wrote: On 2011-04-24, Camaleón wrote: I have a jar file (the application is a fax client for HylaFAX) that needs to be accessed/launched over the network because by doing so I only have to update one file and then all the clients are automatically updated. Java technology offers a standard way of doing that: Java Web Start. It is possible to deploy a third-party application using a JNLP file[1]. Yes but no, that's a completely different approach (AFAIK, the application has to be prepared/packaged to use it and most of the java apps out there are not intended for that purpose, meaning they are not going to be launched/run online). It is simply a means of lauching an application over the network. Whether the application was intended to be launched in that way is irrelevant. Once the user trusts the application, the local JVM will load and run the JAR file exactly as if it had originally resided on the local hard drive. [1] http://download.oracle.com/javase/tutorial/deployment/webstart/ deploying.html (I have come very late to this thread, so forgive me if the above has already been mentioned.) I already knew that tool but I'm afraid it does not work the way I want (or the way Windows clients do) ;-( The application launch should have the same behaviour on all supported platforms. In what way is it unsatisfactory? -- Liam O'Toole Cork, Ireland -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/slrnir8ppf.enl.liam.p.otoole@dipsy.tubbynet
Re: Using Files Without Mounting A Share From Another System
On Sun, 24 Apr 2011 18:08:47 +, Liam O'Toole wrote: On 2011-04-24, Camaleón wrote: Java technology offers a standard way of doing that: Java Web Start. It is possible to deploy a third-party application using a JNLP file[1]. Yes but no, that's a completely different approach (AFAIK, the application has to be prepared/packaged to use it and most of the java apps out there are not intended for that purpose, meaning they are not going to be launched/run online). It is simply a means of lauching an application over the network. Most specifically over http protocol, I'd say. Whether the application was intended to be launched in that way is irrelevant. Nope, it isn't :-) You need some sort of xml file defining the app to launch and while java does not (want to) understand the smb:// protocol we are stuck. I can indeed play JNLP based java applications that are hosted online but I cannot run the java application I want to run while is on samba share. At least not directly ;-( Once the user trusts the application, the local JVM will load and run the JAR file exactly as if it had originally resided on the local hard drive. Yes, but not all java applications are ready to be used with that method. If you can tell me a sample case, I will test :-) (I have come very late to this thread, so forgive me if the above has already been mentioned.) I already knew that tool but I'm afraid it does not work the way I want (or the way Windows clients do) ;-( The application launch should have the same behaviour on all supported platforms. In what way is it unsatisfactory? JNLP based java apps yes, but again, at least that does not fit with my app :-( Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.04.24.18.38...@gmail.com
Re: Using Files Without Mounting A Share From Another System
On 2011-04-24, Camaleón noela...@gmail.com wrote: On Sun, 24 Apr 2011 18:08:47 +, Liam O'Toole wrote: On 2011-04-24, Camaleón wrote: Java technology offers a standard way of doing that: Java Web Start. It is possible to deploy a third-party application using a JNLP file[1]. Yes but no, that's a completely different approach (AFAIK, the application has to be prepared/packaged to use it and most of the java apps out there are not intended for that purpose, meaning they are not going to be launched/run online). It is simply a means of lauching an application over the network. Most specifically over http protocol, I'd say. It is most commonly used over HTTP, but other protocols are available (see below). Whether the application was intended to be launched in that way is irrelevant. Nope, it isn't :-) Oh yes it is. Try it. You need some sort of xml file defining the app to launch and while java does not (want to) understand the smb:// protocol we are stuck. I can indeed play JNLP based java applications that are hosted online but I cannot run the java application I want to run while is on samba share. At least not directly ;-( Try using a UNC path in the JNLP descriptor, e.g., file:server/share/app.jar. Windows clients will understand that. Once the user trusts the application, the local JVM will load and run the JAR file exactly as if it had originally resided on the local hard drive. Yes, but not all java applications are ready to be used with that method. If you can tell me a sample case, I will test :-) --- SNIP --- I cannot provide you with a sample case to prove a negative! Instead I invite you to download the sample .jnlp file in the link I provided earlier and modify it to suit your LAN. Good luck. -- Liam O'Toole Cork, Ireland -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/slrnir9299.enl.liam.p.otoole@dipsy.tubbynet
Re: Using Files Without Mounting A Share From Another System
Liam, I've read your posts on this thread, but I'm replying in kind of a reverse order -- or skipping the earlier ones if my comments on those make it in here. On Apr 24, 2011, at 4:33 PM, Liam O'Toole wrote: On 2011-04-24, Camaleón noela...@gmail.com wrote: On Sun, 24 Apr 2011 18:08:47 +, Liam O'Toole wrote: On 2011-04-24, Camaleón wrote: Java technology offers a standard way of doing that: Java Web Start. It is possible to deploy a third-party application using a JNLP file[1]. Yes but no, that's a completely different approach (AFAIK, the application has to be prepared/packaged to use it and most of the java apps out there are not intended for that purpose, meaning they are not going to be launched/run online). It is simply a means of lauching an application over the network. Most specifically over http protocol, I'd say. It is most commonly used over HTTP, but other protocols are available (see below). Whether the application was intended to be launched in that way is irrelevant. Nope, it isn't :-) Oh yes it is. Try it. A couple points here. I checked the source code for the Dynamic Tree Demo that is used as a JNLP demo. Now I will admit I haven't been using Java for a couple years and have some catching up to do (I think I was using Java 5, but know I've totally missed Java 6), but when I went over the source code for that demo, there was no main() method in the source. Or, more correctly, there was, but it was commented out. That, right there, is an indication that if you're writing an app in Java to be launched normally, there will be different preparations than if you're using JNLP. (I haven't used JNLP yet, but I did write some applets and even set up a couple Java apps to be both apps and applets.) I even looked at their more in depth tutorial on deploying a JNLP project, but didn't find any way to launch one, other than through a browser. (Which I don't want to do -- then I have to figure out the default browser from within a Java class on Windows, Linux, and OS X and launch it.) You need some sort of xml file defining the app to launch and while java does not (want to) understand the smb:// protocol we are stuck. I can indeed play JNLP based java applications that are hosted online but I cannot run the java application I want to run while is on samba share. At least not directly ;-( Try using a UNC path in the JNLP descriptor, e.g., file:server/share/app.jar. Windows clients will understand that. This works on Windows, with SMB, but that brings us back to the original point: Accessing a file on a network share without mounting the share. On Windows, since SMB is built in, you can easily do that. On Linux, you can't. You can use smbclient and copy the file over to your system if it's on an SMB share, but nobody yet has provided a way to access a file on a network share from Linux without either mounting the share or copying the file over to the local computer first. I'm looking at Java RMI, but that involves certificates and so on and I'm still not sure if I will easily be able to put that much on a client system that is trying to run the program. Hal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/9a8b942f-8159-4572-9889-ee36ea2be...@halblog.com
Re: Using Files Without Mounting A Share From Another System
On Fri, 22 Apr 2011 15:42:56 -0400, Hal Vaughan wrote: On Apr 22, 2011, at 1:56 PM, Camaleón wrote: On Fri, 22 Apr 2011 13:03:00 -0400, Hal Vaughan wrote: (...) I need a way, on Linux, to access files on a network share, which could be SMB or NFS (or something else) without mounting the volume. For example, if I'm on System A and I have an executable on System B, and it's on a network share on System B, is there any way to run that executable without mounting that share as a volume on System A? Hum... I think it could be possible, just ensure that the file in the share has the proper rights (that is, it should be executable by the user). As for java files, you could create a launcher on the desktop pointing to the file: java -jar smb://path/to/jar/file.jar Does Java handle the SMB protocol on its own? I know I can't list a directory that way with ls, even with the Samba client package installed. Good question. Nowadays it should handle smb:// or other network protocol just the same it does with http:// but maybe it has auto-imposed some limitations on linux environments (at least under windows you can launch a java JAR that is stored in a network share) or is just the JAR file has to be prepared to be run over the network (IIRC, there is a jCIFS library to that precisely purpose). Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.04.23.10.44...@gmail.com
Re: Using Files Without Mounting A Share From Another System
On 23/04/11 12:44, Camaleón wrote: On Fri, 22 Apr 2011 15:42:56 -0400, Hal Vaughan wrote: On Apr 22, 2011, at 1:56 PM, Camaleón wrote: On Fri, 22 Apr 2011 13:03:00 -0400, Hal Vaughan wrote: (...) I need a way, on Linux, to access files on a network share, which could be SMB or NFS (or something else) without mounting the volume. For example, if I'm on System A and I have an executable on System B, and it's on a network share on System B, is there any way to run that executable without mounting that share as a volume on System A? Hum... I think it could be possible, just ensure that the file in the share has the proper rights (that is, it should be executable by the user). As for java files, you could create a launcher on the desktop pointing to the file: java -jar smb://path/to/jar/file.jar Does Java handle the SMB protocol on its own? I know I can't list a directory that way with ls, even with the Samba client package installed. Good question. Nowadays it should handle smb:// or other network protocol just the same it does with http:// but maybe it has auto-imposed some limitations on linux environments (at least under windows you can launch a java JAR that is stored in a network share) or is just the JAR file has to be prepared to be run over the network (IIRC, there is a jCIFS library to that precisely purpose). Greetings, Prgrams that I know which do this (eg emacs with tramp editing) use a temporary copy on local file. And it is the applicaton which deals with this, not the OS. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4db2d8c9.7090...@rail.eu.org
Re: Using Files Without Mounting A Share From Another System
On Apr 23, 2011, at 6:44 AM, Camaleón wrote: On Fri, 22 Apr 2011 15:42:56 -0400, Hal Vaughan wrote: On Apr 22, 2011, at 1:56 PM, Camaleón wrote: On Fri, 22 Apr 2011 13:03:00 -0400, Hal Vaughan wrote: (...) I need a way, on Linux, to access files on a network share, which could be SMB or NFS (or something else) without mounting the volume. For example, if I'm on System A and I have an executable on System B, and it's on a network share on System B, is there any way to run that executable without mounting that share as a volume on System A? Hum... I think it could be possible, just ensure that the file in the share has the proper rights (that is, it should be executable by the user). As for java files, you could create a launcher on the desktop pointing to the file: java -jar smb://path/to/jar/file.jar Does Java handle the SMB protocol on its own? I know I can't list a directory that way with ls, even with the Samba client package installed. Good question. Nowadays it should handle smb:// or other network protocol just the same it does with http:// but maybe it has auto-imposed some limitations on linux environments (at least under windows you can launch a java JAR that is stored in a network share) or is just the JAR file has to be prepared to be run over the network (IIRC, there is a jCIFS library to that precisely purpose). I tried, on the command line in Windows XP, dir \\server\directory and it works, but SMB/CIFS is built in to Windows. As far as I can tell, there is no equivalent on Linux unless you use smbclient. SMB is not built into Linux and it seems without smbclient, Linux cannot access an SMB share. I've been searching, and it looks like there's a CIFS class for Java, but it's not built-in to Java and is available at samba.org. I don't have to use SMB, I could have the server use NFS as well, but I can't find anything about reading an NFS share unless it's mounted. As best I can tell, unless you use a program like smbclient, scp, ftp, or rsync, there is no way to read any network share in Linux unless it's mounted. To make a program on a non-local volume available locally, you can either copy it to the local computer or mount the share. At least that's the best I can find out. It's kind of tough to Google this, since searches always turn up tutorials on how to mount a volume. Hal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/3c37ba06-3516-41d7-869e-0b6a5913b...@halblog.com
Re: Using Files Without Mounting A Share From Another System
On 04/23/2011 12:04 PM, Hal Vaughan wrote: I don't have to use SMB, I could have the server use NFS as well, but I can't find anything about reading an NFS share unless it's mounted. As best I can tell, unless you use a program like smbclient, scp, ftp, or rsync, there is no way to read any network share in Linux unless it's mounted. To make a program on a non-local volume available locally, you can either copy it to the local computer or mount the share. At least that's the best I can find out. It's kind of tough to Google this, since searches always turn up tutorials on how to mount a volume. I don't know how SMB work internally, but I wouldn't be surprised if mounting were just a convenience to ease access to files on the remote computer and to store credentials, but internally each access to a file in under a cifs-mounted path is exactly the same as an access via smbclient or other mount-less programs. Anyway, what's the problem with mounting? There is only one way to access files that all programs support: the filesystem. So I think it is not possible to find a general solution to your problem. Particular programs might have extra support, so it is possible to include SMB in some program and then it will not have to mount the remote directory. But that is specific to some program. Specific libraries may have extra features. Gnome has (or at least had) a virtual filesystem, and I believe it has SMB support, so any program using the Gnome API could transparently access SMB shares. -- Eduardo M KALINOWSKI edua...@kalinowski.com.br -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4db2f44c.7020...@kalinowski.com.br
Re: Using Files Without Mounting A Share From Another System
On Sat, 23 Apr 2011 11:04:20 -0400, Hal Vaughan wrote: On Apr 23, 2011, at 6:44 AM, Camaleón wrote: Does Java handle the SMB protocol on its own? I know I can't list a directory that way with ls, even with the Samba client package installed. Good question. Nowadays it should handle smb:// or other network protocol just the same it does with http:// but maybe it has auto-imposed some limitations on linux environments (at least under windows you can launch a java JAR that is stored in a network share) or is just the JAR file has to be prepared to be run over the network (IIRC, there is a jCIFS library to that precisely purpose). I tried, on the command line in Windows XP, dir \\server\directory and it works, but SMB/CIFS is built in to Windows. As far as I can tell, there is no equivalent on Linux unless you use smbclient. SMB is not built into Linux and it seems without smbclient, Linux cannot access an SMB share. I've been searching, and it looks like there's a CIFS class for Java, but it's not built-in to Java and is available at samba.org. Yep... and it's quite strange. I still don't know if it's a security measure or just a technical barrier that needs the use of another applications to be bypassed. In fact, I can run a .jar file over smb:// using Nautilus but this is what I get: 1/ Jar file is executed but it opens with file roller (archiver utility) 2/ When I try to change file permisson to make it executable I get an error (cannot change permissions to file.jar) All this done over a NTFS volume managed by a Windows host. Maybe a samba share over a linux filesystem (ext3/4/reiser/xfs...) gives different results... dunno :-? I don't have to use SMB, I could have the server use NFS as well, but I can't find anything about reading an NFS share unless it's mounted. As best I can tell, unless you use a program like smbclient, scp, ftp, or rsync, there is no way to read any network share in Linux unless it's mounted. To make a program on a non-local volume available locally, you can either copy it to the local computer or mount the share. At least that's the best I can find out. It's kind of tough to Google this, since searches always turn up tutorials on how to mount a volume. I can't tell as I've never used NFS shares but maybe is worth a try :-) Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.04.23.16.00...@gmail.com
Re: Using Files Without Mounting A Share From Another System
On Apr 23, 2011, at 11:46 AM, Eduardo M KALINOWSKI wrote: On 04/23/2011 12:04 PM, Hal Vaughan wrote: I don't have to use SMB, I could have the server use NFS as well, but I can't find anything about reading an NFS share unless it's mounted. As best I can tell, unless you use a program like smbclient, scp, ftp, or rsync, there is no way to read any network share in Linux unless it's mounted. To make a program on a non-local volume available locally, you can either copy it to the local computer or mount the share. At least that's the best I can find out. It's kind of tough to Google this, since searches always turn up tutorials on how to mount a volume. I don't know how SMB work internally, but I wouldn't be surprised if mounting were just a convenience to ease access to files on the remote computer and to store credentials, but internally each access to a file in under a cifs-mounted path is exactly the same as an access via smbclient or other mount-less programs. Anyway, what's the problem with mounting? I have several reasons for mounting that I'd rather not get into. The short version is that I'm self employed and if a client has had incompetent techs fsck up their LAN in the past and is scared of anything that looks at all different on their LAN, but they also want to pay me $500 - $1,500 a month, it's in my best interest to let them write me that monthly check. (Yes, I've tried educating them, but fear is a strong motivator against learning something that is different from what you are sure is true.) There are a couple other reasons, but that one is enough right there. There is only one way to access files that all programs support: the filesystem. So I think it is not possible to find a general solution to your problem. Particular programs might have extra support, so it is possible to include SMB in some program and then it will not have to mount the remote directory. But that is specific to some program. Unfortunately, I think you're right, but there are a lot of very knowledgeable people on this list, so I was hoping there might be something obscure someone knew about that I could use. This is a cross platform issue, since the executable has to work on Windows, OS X, and Linux. On Windows I can access the SMB share with no difficulty. I'm considering, for Linux and OS X, the idea of just using ssh with X forwarding and running the program on the server and displaying it on the client, but since the server only has 500 MB and 500 Mhz, I'd rather not use any resources on it that I don't have to. I'm also looking into creating a temporary mount point and deleting when it's done, but if there's a crash or something, that temporary mount point would remain, unless I put it in /tmp or something radical like that. Hal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/109e1565-2b5b-44b8-948d-2eb6827e5...@halblog.com
Re: Using Files Without Mounting A Share From Another System
On 04/23/2011 12:59 PM, Hal Vaughan wrote: I'm also looking into creating a temporary mount point and deleting when it's done, but if there's a crash or something, that temporary mount point would remain, unless I put it in /tmp or something radical like that. Couldn't you copy the file instead (possibly calling smbclient) to the temporary directory? -- Eduardo M KALINOWSKI edua...@kalinowski.com.br -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4db2fc31.1070...@kalinowski.com.br
Re: Using Files Without Mounting A Share From Another System
On Fri, Apr 22, 2011 at 01:03:00PM -0400, Hal Vaughan wrote: I now know I can use smbclient to read files on an SMB share without having to mount it, but I need to do more than that. I want to be able to access either Java classes or an executable on a shared volume on a server without having to mount the volume on the local system. (There are a couple reasons for not wanting to mount.) I know on Windows I can list the files on an SMB share on another system and access them using SMB/CIFS by just specifying the volume properly on the command line. I want to do something like that on Linux, but do more than just listing the files or copying them to the local computer. I need a way, on Linux, to access files on a network share, which could be SMB or NFS (or something else) without mounting the volume. For example, if I'm on System A and I have an executable on System B, and it's on a network share on System B, is there any way to run that executable without mounting that share as a volume on System A? Here's a possible workaround. It involves mounting, but as a regular user. I'd use sshfs. The remote server needs to have an ssh server running. Then you can run this: sshfs remoteserver:/some/path localdir Then you can ls localdir, or operate on any of the files there. If you use public key authentication and ssh-add, you can do this without needing to enter a password. I've never used this to access a non-linux machine, but in theory it should work on anything that is running an ssh server. -Rob -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110423195144.ga8...@aurora.owens.net
Re: Using Files Without Mounting A Share From Another System
On Apr 23, 2011, at 12:00 PM, Camaleón wrote: On Sat, 23 Apr 2011 11:04:20 -0400, Hal Vaughan wrote: On Apr 23, 2011, at 6:44 AM, Camaleón wrote: Does Java handle the SMB protocol on its own? I know I can't list a directory that way with ls, even with the Samba client package installed. Good question. Nowadays it should handle smb:// or other network protocol just the same it does with http:// but maybe it has auto-imposed some limitations on linux environments (at least under windows you can launch a java JAR that is stored in a network share) or is just the JAR file has to be prepared to be run over the network (IIRC, there is a jCIFS library to that precisely purpose). I tried, on the command line in Windows XP, dir \\server\directory and it works, but SMB/CIFS is built in to Windows. As far as I can tell, there is no equivalent on Linux unless you use smbclient. SMB is not built into Linux and it seems without smbclient, Linux cannot access an SMB share. I've been searching, and it looks like there's a CIFS class for Java, but it's not built-in to Java and is available at samba.org. Yep... and it's quite strange. I still don't know if it's a security measure or just a technical barrier that needs the use of another applications to be bypassed. In fact, I can run a .jar file over smb:// using Nautilus but this is what I get: Do you mean you could run the jar or that you tried to? 1/ Jar file is executed but it opens with file roller (archiver utility) 2/ When I try to change file permisson to make it executable I get an error (cannot change permissions to file.jar) Did you try to change permissions from the server itself or from the client? It sounds like you tried to change permissions from the client. All this done over a NTFS volume managed by a Windows host. Maybe a samba share over a linux filesystem (ext3/4/reiser/xfs...) gives different results... dunno :-? I think Linux might give better control over things like permissions. In my case, the server will be running Debian 6.x. Thanks for trying that -- I'm still searching and testing, but I haven't gotten anything to work and I need to create a test jar file I can work with. Hal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4da97253-e3c7-4415-b1a4-84f260d51...@halblog.com
Re: Using Files Without Mounting A Share From Another System
On Apr 23, 2011, at 12:20 PM, Eduardo M KALINOWSKI wrote: On 04/23/2011 12:59 PM, Hal Vaughan wrote: I'm also looking into creating a temporary mount point and deleting when it's done, but if there's a crash or something, that temporary mount point would remain, unless I put it in /tmp or something radical like that. Couldn't you copy the file instead (possibly calling smbclient) to the temporary directory? Actually, that's a good point and it would be a lot better than putting a mount point in there. I've just been so keen on the whole don't put it on the client system thing that I didn't think of that. It looks like I'll have to be taking a multi-part approach, using one way for Windows and another for Linux and OS X. And the few people that I deal with that have Linux on a desktop are more aware and don't freak at the idea of having more installed on their computer. And, in my experience, OS X users aren't nearly as tough to deal with in situations like this, either. (It really doesn't make sense -- but then fear often is irrational. I've seen small business owners that freak at the idea of anyone touching their router/firewall to add a static IP address or any port forwarding because their cousin or brother or son fscked up the network when he said he knew what he was doing and they freak at the idea of a small service provider like me installing software on their computer, but then they browse unsafe porn sites and install something off the Internet (saying, But it's on a professional looking website, so they must know what they're doing!) and they think there's no way they're doing anything dangerous.) Hal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/311b8b0d-0017-47db-8bbb-daaf7edb1...@halblog.com
Re: Using Files Without Mounting A Share From Another System
On Apr 23, 2011, at 3:51 PM, Rob Owens wrote: On Fri, Apr 22, 2011 at 01:03:00PM -0400, Hal Vaughan wrote: I now know I can use smbclient to read files on an SMB share without having to mount it, but I need to do more than that. I want to be able to access either Java classes or an executable on a shared volume on a server without having to mount the volume on the local system. (There are a couple reasons for not wanting to mount.) I know on Windows I can list the files on an SMB share on another system and access them using SMB/CIFS by just specifying the volume properly on the command line. I want to do something like that on Linux, but do more than just listing the files or copying them to the local computer. I need a way, on Linux, to access files on a network share, which could be SMB or NFS (or something else) without mounting the volume. For example, if I'm on System A and I have an executable on System B, and it's on a network share on System B, is there any way to run that executable without mounting that share as a volume on System A? Here's a possible workaround. It involves mounting, but as a regular user. I'd use sshfs. The remote server needs to have an ssh server running. Then you can run this: sshfs remoteserver:/some/path localdir Then you can ls localdir, or operate on any of the files there. If you use public key authentication and ssh-add, you can do this without needing to enter a password. I've never used this to access a non-linux machine, but in theory it should work on anything that is running an ssh server. That is mounting, but, as I mentioned in another email, clients that use Linux on a desktop are a lot easier to deal with on these things than Windows users. I still have to test on Windows to be sure that I can actually run a jar from an unmounted SMB share. I can operate on files like that, so I would think I can run a jar that way. sshfs sounds like a good idea and I'll look into it. That would work on both the Mac and Linux. Thanks! Hal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/9d508e39-7be0-4b99-b890-43db96c19...@halblog.com
Re: Using Files Without Mounting A Share From Another System
Hal Vaughan put forth on 4/22/2011 12:03 PM: I now know I can use smbclient to read files on an SMB share without having to mount it, but I need to do more than that. I want to be able to access either Java classes or an executable on a shared volume on a server without having to mount the volume on the local system. (There are a couple reasons for not wanting to mount.) I know on Windows I can list the files on an SMB share on another system and access them using SMB/CIFS by just specifying the volume properly on the command line. I want to do something like that on Linux, but do more than just listing the files or copying them to the local computer. I need a way, on Linux, to access files on a network share, which could be SMB or NFS (or something else) without mounting the volume. For example, if I'm on System A and I have an executable on System B, and it's on a network share on System B, is there any way to run that executable without mounting that share as a volume on System A? If you know the exact path to the file you can use scp to copy it locally and then execute the local copy. If you don't need to keep the binary, simply delete the local copy after use. Why is this? The remote filesystem contains execute permission for each file. Mounting the filesystem requires authentication. That authentication is required to determine execute permission. -- Stan -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4db1c11d.6070...@hardwarefreak.com
Re: Using Files Without Mounting A Share From Another System
On Fri, 22 Apr 2011 13:03:00 -0400, Hal Vaughan wrote: (...) I need a way, on Linux, to access files on a network share, which could be SMB or NFS (or something else) without mounting the volume. For example, if I'm on System A and I have an executable on System B, and it's on a network share on System B, is there any way to run that executable without mounting that share as a volume on System A? Hum... I think it could be possible, just ensure that the file in the share has the proper rights (that is, it should be executable by the user). As for java files, you could create a launcher on the desktop pointing to the file: java -jar smb://path/to/jar/file.jar Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2011.04.22.17.56...@gmail.com
Re: Using Files Without Mounting A Share From Another System
On Apr 22, 2011, at 1:56 PM, Camaleón wrote: On Fri, 22 Apr 2011 13:03:00 -0400, Hal Vaughan wrote: (...) I need a way, on Linux, to access files on a network share, which could be SMB or NFS (or something else) without mounting the volume. For example, if I'm on System A and I have an executable on System B, and it's on a network share on System B, is there any way to run that executable without mounting that share as a volume on System A? Hum... I think it could be possible, just ensure that the file in the share has the proper rights (that is, it should be executable by the user). As for java files, you could create a launcher on the desktop pointing to the file: java -jar smb://path/to/jar/file.jar Does Java handle the SMB protocol on its own? I know I can't list a directory that way with ls, even with the Samba client package installed. Hal -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/11735cf9-4a87-4a52-8d5a-6fd03eeca...@halblog.com
Re: Using Files Without Mounting A Share From Another System
Hi, Hal Vaughan wrote: Does Java handle the SMB protocol on its own? I know I can't list a directory that way with ls, even with the Samba client package installed. Yeah, I tried that too. I was thinking if I could list the files, then I might try to do a symbolic link. It seems odd that you can't use: \\server\share\file or //server/share/file [although the second option seemed more likely] -- Kind Regards AndrewM Andrew McGlashan Broadband Solutions now including VoIP -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4db245b0.4050...@affinityvision.com.au