lazarus78
Posts: 236
Joined: Thu Jul 25, 2013 5:16 pm

Access another systems files, but run them locally

Fri Nov 01, 2013 9:36 pm

Ive been trying for the past week to achieve this, but everything either doesn't work, or lacking in any descriptive information, which is basically just as effective as not working.

What I need is to be able to access the files on another machine (Running Debian) but I need to maintain the Raspberry's GUI (Running Raspbian). The Raspberry is going to display an HTML file controlled by a custom script for various things (Unrelenting to topic).

How can I achieve this? Is there no simple thing that says "Hey, I want to access your files."? I've tried setting up nfs and sshfs, I've followed several guides regarding both, all resulting in absolutely nothing but wasted time.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5129
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Access another systems files, but run them locally

Fri Nov 01, 2013 10:10 pm

lazarus78 wrote: ...
What I need is to be able to access the files on another machine (Running Debian) but I need to maintain the Raspberry's GUI (Running Raspbian). The Raspberry is going to display an HTML file controlled by a custom script for various things (Unrelenting to topic).
...
Can you clarify what what you mean by "access the files" (eg. read? write? execute?).
Do you wish to do this without having to login to the other machine?
Is the Pi the "server" or "client" for your access requirement?
For example, if I login via ssh (within the desktop) from one Pi to another Linux box with X-forwarding enabled I could run a browser on the other machine that would display an HTML file stored on that machine on the Pi's desktop. Probably not quite what you want though.
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, A+ and a B2) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

lazarus78
Posts: 236
Joined: Thu Jul 25, 2013 5:16 pm

Re: Access another systems files, but run them locally

Thu Nov 07, 2013 4:27 am

I have a debian machine i want to act as a "server". The Pi is the client. It will be accessing (Mainly read, but lets assume complete access, security isn't an issue) on the "server". At this point, I don't really care if login is necessary, but I would prefer that yes, the Pi needs to log in to the "server". (I still need to be able to use the GUI)

IE, file1.html is on the "server" and the Pi needs to be able to display it on its browser (Midori or Chromium). That is the minimum of the minimum of which I need.

Ive tried SSH, but i cant launch midori or chromium because Im technically not doing anything on the Pi except user a terminal as a window to the "server". I tried mounting the "server"s drive like I did for network storage, but that didn't work. I tried setting up NFS, but the directions i found (several different ones) are vague and non descriptive, so I coulnd't get that to work. I even tried SSHFS, but similar result as the NFS.

It has just been very frustrating because this is a simple clickity clack on Windows and you are done, but Linux seems to have 200 steps and 10 different applications necessary with lots of configuration which is rarely documented well.

User avatar
rpdom
Posts: 15452
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Access another systems files, but run them locally

Thu Nov 07, 2013 6:34 am

NFS is the way you want to go. It's not that hard to set up once you know how.

The Server would need an NFS server package installed. Then you decide which part(s) of the file system you want to share. You then add a line to /etc/exports and activate it by restarting nfs (the lazy way) or by using the exportfs command.

As an example, on my server I share /var/www/ so I can update my local web site from whichever PC I happen to be using at the time (you could use any directory in the file system). I want to be able to read and write this area from any user on any computer on my home network (192.168.1.0). The files on the server will be owned by user/group 33 (www-data) unless the user is root.

I set up this line in /etc/exports:

Code: Select all

/var/www	192.168.1.0/24(rw,sync,no_root_squash,all_squash,anonuid=33,anongid=33,no_subtree_check,insecure)
Then I activate it with "exportfs -a".

On my Pi (and other computers) I add the following to /etc/fstab (the server is called "rincewind")

Code: Select all

rincewind:/var/www  /var/www   nfs  defaults,retry=0   0 0
Make user the directory /var/www/ exists on the local machine, then "mount /var/www".

(Assume all above commands are run as root, using either sudo, or by su - root.
It has just been very frustrating because this is a simple clickity clack on Windows and you are done, but Linux seems to have 200 steps and 10 different applications necessary with lots of configuration which is rarely documented well.
Perhaps you are just familiar with the Windows way of doing it, so it seems second nature to you. I would be totally lost if I tried to do anything of the above on a Windows machine. As for 200 steps/10 applications - well, I've shown above that it doesn't need that. There may be 10 different applications that *could* do it, but you don't *need* them all. :)

User avatar
DeeJay
Posts: 2027
Joined: Tue Jan 01, 2013 9:33 pm
Location: East Midlands, UK

Re: Access another systems files, but run them locally

Thu Nov 07, 2013 8:09 am

lazarus78 wrote:What I need is to be able to access the files on another machine (Running Debian) but I need to maintain the Raspberry's GUI (Running Raspbian). The Raspberry is going to display an HTML file controlled by a custom script for various things (Unrelenting to topic).
It seems to me that you need to run a webserver on the Debian machine.
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: Access another systems files, but run them locally

Thu Nov 07, 2013 8:18 am

DeeJay wrote:
lazarus78 wrote:What I need is to be able to access the files on another machine (Running Debian) but I need to maintain the Raspberry's GUI (Running Raspbian). The Raspberry is going to display an HTML file controlled by a custom script for various things (Unrelenting to topic).
It seems to me that you need to run a webserver on the Debian machine.
This would be what I would do, unless you actually need to modify the page from the Pi.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

lazarus78
Posts: 236
Joined: Thu Jul 25, 2013 5:16 pm

Re: Access another systems files, but run them locally

Mon Nov 11, 2013 6:05 pm

rpdom wrote: Perhaps you are just familiar with the Windows way of doing it, so it seems second nature to you. I would be totally lost if I tried to do anything of the above on a Windows machine. As for 200 steps/10 applications - well, I've shown above that it doesn't need that. There may be 10 different applications that *could* do it, but you don't *need* them all. :)
Personally I think there are things a GUI interface does far better then command line. Such as this, in windows is a simple "Right click, properties, share" and more or less the file or folder or whole partition is open to the network.

I am indeed very familiar with Windows. Started with 3.1 when i was 2 years old. (Opening everything i could was the highlight of my day). It just feel like there's tons of things you have to do for the simplest thing, though I understand that is mainly attributed to windows trying to be an all-in-wonder OS where as Linux is only what you need.

Thanks for the breakdown of NFS, your explanation is far easier then anything Ive read in the past few weeks.

DeeJay wrote: It seems to me that you need to run a webserver on the Debian machine.
Now that you mention it... you are right... that would work far better... Man i feel stupid. Thanks for the slap on the head.

Return to “Beginners”