Connecting 2 PCs, and file sharing

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

Connecting 2 PCs, and file sharing

Postby GeordieJedi » Thu Apr 11, 2013 6:21 pm

Hi all.

Ok, I'm wanting to share files between my two PCs.
(However, I reckon I've now overthought this. And I'm thinking round in circles).

For example,

I have 2 PCs (1 x desktop 1 x laptop). My laptop has become my main machine however, my
desktop has most of my data on it (music and photos in particular).

I would like to know the best way to connect and transfer files between the two machines
(preferably via a GUI).

E.G. I have new photos on my laptop and I'd like to transfer them to the desktop PC.
But I need to do this visually so that I can compare the two directories and just copy
what I need to across.

1.How do I connect my two PCs and and share my files ?
Can I use my router (downstairs) via wifi to connect both machines together ?

2.How do I transfer my files between my two PCs ?
Samba, SSH, remote desktop ? Ethernet cable ?


Useful Info

2 PCs both running Ubuntu 12.04 + KDE
1 x laptop
1 x desktop

Both PCs are located upstairs (next to each other), and use wifi to connect to the
internet via a (router which is downstairs).

Both PCs are not connected to one another.



Thanks in advance for any help.
User avatar
GeordieJedi
LXF regular
 
Posts: 337
Joined: Thu Jun 14, 2007 10:36 pm
Location: North East England

Postby nelz » Thu Apr 11, 2013 6:39 pm

If they are both connected to the router, they re potentially connected to one another. You could set up NFS or Samba to share directories, but for your needs, Unison may be a simpler option.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8579
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby bobthebob1234 » Thu Apr 11, 2013 9:34 pm

If they can ping each other then happy days

I just install ssh (server) on all my machines then I can just use sftp://hostname and boom i'm in. Access any file and no faffing with samba or the like.
For certain you have to be lost to find the places that can't be found. Elseways, everyone would know where it was
User avatar
bobthebob1234
LXF regular
 
Posts: 1373
Joined: Thu Jan 03, 2008 9:38 pm
Location: A hole in a field

Re: Connecting 2 PCs, and file sharing

Postby GregS » Thu Apr 11, 2013 10:41 pm

GeordieJedi wrote:Hi all.

Ok, I'm wanting to share files between my two PCs.
(However, I reckon I've now overthought this. And I'm thinking round in circles).

For example,

ave 2 PCs (1 x desktop 1 x laptop). My laptop has become my main machine however, my
desktop has most of my data on it (music and photos in particular).

I would like to know the best way to connect and transfer files between the two machines
(preferably via a GUI).

I have seen advertised a USB crossover cable that makes a second PC appear as a removable drive on the host PC. For a one-off connection you appear to want, that may be the less complex solution.
User avatar
GregS
 
Posts: 98
Joined: Thu Aug 03, 2006 3:54 am
Location: Oz

Postby Dutch_Master » Thu Apr 11, 2013 11:34 pm

But he has to spend money, whereas the earlier solution is free :P

Anyway, given that both run Linux, connecting via NFS isn't a major obstacle. And configuring NFS isn't that difficult, using Webmin ;) (even I can manage that :P)
Dutch_Master
LXF regular
 
Posts: 2471
Joined: Tue Mar 27, 2007 1:49 am

Postby dandnsmith » Fri Apr 12, 2013 8:41 am

With Ubuntu 12.04, wouldn't CIFS be the easiest - there isn't really anything to set up (unlike there used to be for SAMBA)?
Derek
dandnsmith
LXF regular
 
Posts: 316
Joined: Fri Apr 15, 2005 10:01 am
Location: Berks, UK

Postby wyliecoyoteuk » Fri Apr 12, 2013 11:38 am

CIFS is Samba.
The sig between the asterisks is so cool that only REALLY COOL people can even see it!

*************** ************
User avatar
wyliecoyoteuk
LXF regular
 
Posts: 3466
Joined: Sun Apr 10, 2005 10:41 pm
Location: Birmingham, UK

Postby dandnsmith » Sat Apr 13, 2013 7:17 am

Apologies for my lack of understanding - caused by moderately recent use of the term CIFS instead of SAMBA, as if they were different. I should have researched it.
Derek
dandnsmith
LXF regular
 
Posts: 316
Joined: Fri Apr 15, 2005 10:01 am
Location: Berks, UK

Postby wyliecoyoteuk » Sat Apr 13, 2013 9:57 am

No Probs.
CIFS is the new name for the SMB protocol.
Blame Microsoft. :)
The sig between the asterisks is so cool that only REALLY COOL people can even see it!

*************** ************
User avatar
wyliecoyoteuk
LXF regular
 
Posts: 3466
Joined: Sun Apr 10, 2005 10:41 pm
Location: Birmingham, UK

Postby purplepenguin » Mon Apr 15, 2013 4:14 pm

I like sshfs.

When I was new to Linux I was terrified by NFS/samba. I found sshfs to be really easy and stuck with it. It connects my XBMC to my mediaserver.
So it looks like I'm back to LinuxMint again. Why you ask? Because my machine smell nicer.

I'm not too sure I'd want a Mint and Cinnamon muffin with my brew though. Guess I'm lucky they don't run my local bakery.
purplepenguin
LXF regular
 
Posts: 133
Joined: Wed Oct 05, 2011 2:19 pm
Location: Blissfully at the Command Line

Postby GeordieJedi » Mon Apr 15, 2013 8:39 pm

So can I get the (remote ?) HDD's/directories to show up like an external drive or a regular old HDD partition ?
(via a GUI). How would I achieve that ?

When I use network manager on my machines, they each see the SSID of the router.
Do I need to get the IP address of the machine that I want to connect to and then try to connect that way ?
Using what programme ?

Also, I had read (in an old LXF special) that NFS wasn't the best solution nower-days as it's insecure ??
Which seems a shame, as it looks like a good solution.


Thanks for the help so-far.
User avatar
GeordieJedi
LXF regular
 
Posts: 337
Joined: Thu Jun 14, 2007 10:36 pm
Location: North East England

Postby Dutch_Master » Mon Apr 15, 2013 10:27 pm

Yes, NFS is inherently insecure (hence the existence of sshfs) but on a local network (with decent, modern router) still a viable option... (I use it too :P)

Basic steps:
  • edit the file /etc/exports on the server (the machine where the shared folder resides) and allow export of the directory to named clients, or all clients.
  • edit the file /etc/fstab on the client (where the directory is to show up) to add the NFS share like a partition. The mount point for this "partition" needs to exist!
  • reboot both.
  • Double-click the Computer icon (on Debian, may have a different name in other distro's) and then double-click the icon for the NFS share. It now opens in a new window.


Read the man-page for NFS for studying various options.
Code: Select all
man nfs
Dutch_Master
LXF regular
 
Posts: 2471
Joined: Tue Mar 27, 2007 1:49 am


Return to Help!

Who is online

Users browsing this forum: No registered users and 2 guests