Sunday, August 24, 2008

Easy File Sharing

Let's talk about setting up file sharing on Debian/Ubuntu, shall we?

Since I finished the pre-seeds I was working on, and I'm still on vacation for a few more days, I decided to really get to work on my Debian2Debian project I've been mulling over for a while. It needs simple file sharing.

The concept of the project is that there should be a simple Debian server which works really well with Debian clients, particularly in a home setting. At the center of this is easy file sharing .... Well, not exactly. The server setup is going to be static, so that can be complicated, but the clients need to recognize the shares automatically. So I've had a dilemma for a while.
  • Samba is easily the most elaborate system, and it offers automatic discovery, but scanning the "Windows Network" in Nautilus takes a long time, and I wanted to use something faster and simpler.
  • NFS is has the best pedigree on *nix, but it needs setup on the client (as far as I can tell ... I've been searching on this for a month on-and-off). If I can avoid setup on the clients, that would be best.
  • FTP is scary for me. Sorry. It has an awful history.
  • WebDAV using Apache seems doable, but I'm still looking into it, which is what this post is really about.
Right now, I'm looking at the gnome-user-share and gshare utilities on Gnome for some inspiration. The first seems to fit my bill, and spawns Apache WebDAV on a random port, then updates Avahi with notification. It also has stuff like Bluetooth that I'm not at all interested in, so I'm just going to script something at the server's startup.

The following folders will be shared by the server:
  • Documents
  • Music
  • Pictures
  • Videos
  • Backups
Sounds remarkably like the XDG Folders? Hmm. Could be. I'll look into localization of the sharing later. I may be able to use xdg-user-dirs-update to help me with that.

I need to get DAAP and DAPP on these folders after that. Rhythmbox will then just see and play the Music share. The new F-Spot should identify the Pictures share. How do I seamlessly share the videos? I'm working on that one.

If you want to easily share files with someone else on Debian, Ubuntu, or OS X, install gnome-user-share and configure it at System > Preferences > Personal File Sharing. It's so dead simple that I'm not even going to tell you what to do, I'm just going to give you the screenshot.
When you're finished, put the files you want to share in ~/Public. Your friend/S.O. can see them in Places > Network.

No comments:

Post a Comment

Other I' Been to Ubuntu Stories