2

I have two home computers. One is running 16.04 and the other had 14.04 installed. The 14.04 machine has since been upgraded to 18.04.

When it was 14.04 and 16.04, connecting the two computers directly with an Ethernet cable was a straightforward matter. I'd set static IPs via an dialog like the one below and I'd be ready.

enter image description here

It's not as straightforward with 18.04, apparently. Before my attempt to pair the two computers with the cable, I was using a Wired connection 1 to connect to the Internet on the 18.04 machine -- I'd just plug it in and I'd be online in seconds. After the pairing attempt, not only were the two machines not seeing each other on the private network as I was expecting, but Wired connection 1 is no longer connecting to the Internet when I switch to it.

Here is the dialog I'm struggling with on 18.04. As can be seen, it's different from the first image which is the dialog on both 14.04 and 16.04.

enter image description here

So how do I do it?

UPDATE: My intention is to connect the two computers together to arrange a fast transfer of files between them. Attempting to connect to the local network on the 18.04 machine throws an error Connection failed Activation of network connection failed.

As requested, the output of ps auxc | grep -i dns:

username 4032 0.0 0.0 382512 7448 ? Sl 09:41 0:00 gvfsd-dnssd

The output of ls -al /etc/resolv.conf:

lrwxrwxrwx 1 root root 39 Jun 2 07:59 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

And the output of cat /etc/resolv.conf:

nameserver 127.0.0.53
options edns0
Zero
  • 217
  • You can't use the same static IP connection profile to create your own local network, and use it for connecting to the general Internet. What is your goal? On the 18.04 machine, edit your question with the output from ps auxc | grep -i dns and ls -al /etc/resolv.conf and cat /etc/resolv.conf. – heynnema Jun 02 '19 at 13:40
  • My goal is to connect the two computers in order to transfer files between them. Otherwise I'll update the question with the output of ps aux when I get back to the machines. – Zero Jun 02 '19 at 13:52
  • @heynnema I've edited the question. Please check and advise. – Zero Jun 02 '19 at 14:33
  • @Graham How is this a duplicate? In that other question, the OP doesn't know how to set up a local Ethernet connection. My situation is I know how, and the evidence is in how I successfully connected a 14.04 and and a 16.04. The difference is the 18.04. – Zero Jun 02 '19 at 14:39
  • So am I correct in saying that you'd have to change ethernet cabling depending on whether you're trying to transfer files vs connecting to the Internet... and you're using two different connection profiles? – heynnema Jun 02 '19 at 14:40
  • @heynnema yes, that's correct. When I want to transfer files, I use the Ethernet cable, and I connect to the Internet without it. And yes, I'm to use a different connection profile for the Internet and local networking each. – Zero Jun 02 '19 at 14:43
  • How do you connect to the Internet without using an ethernet cable? Please describe your wiring in your network configuration. Do you have a 1G router/hub/switch? – heynnema Jun 02 '19 at 14:45
  • For connecting to the Internet, I pair my phone to the computer via Bluetooth and use that phone's Internet connection, but after first disconnecting from the local network or otherwise removing the Ethernet cable. – Zero Jun 02 '19 at 14:48
  • Do you have wireless cards on both machines? – heynnema Jun 02 '19 at 14:50
  • The 16.04 is a desktop. The 18.04 is a laptop. So I believe the laptop has a wireless card but the desktop doesn't. Right now, I'm typing this on the 16.04 desktop, but I'm not connected to the Internet via Bluetooth, but via USB to the phone (I use the Bluetooth on the 18.04 laptop). Like I said in my question, I can't get online or private network on the 18.04 cause its networking no longer works. – Zero Jun 02 '19 at 14:57
  • 1
    Rather than constantly swapping ethernet cables, and using different connection profiles, and moving your phone from USB on 16.04 and bluetooth on 18.04... how about something like this... connect the phone to 18.04... open nm-connection-editor and create a new ethernet profile... go to the IPv4 tab... enable "Share to other computers". Then on 16.04 create a standard ethernet connection profile with dhcp. Connect the cable. This should work without having to swap cables, or connection profiles, and having to move your phone. You may have to install dnsmasq-base to get this all to work – heynnema Jun 02 '19 at 15:02
  • OK. I'll try that. But that's about connecting to the Internet, which wasn't my question. The question is how to network the two computers locally with the Ethernet cable, not to share an Internet connection, but to transfer files? – Zero Jun 02 '19 at 15:07
  • With my idea, both computers can talk, and/or have Internet. You just enable folder sharing on 16.04 and/or 18.04, and you can transfer files using drag and drop. – heynnema Jun 02 '19 at 15:09
  • When you bring up folder sharing, you're talking about NFS, which is actually the very first approach that I tried. But NFS doesn't work with encrypted directories, as I learned with my question https://unix.stackexchange.com/questions/522192/nfs-mount-on-client-not-matching-whats-exported-on-the-server – Zero Jun 02 '19 at 15:23

1 Answers1

2

Brief outline for an alternate way to accomplish file transfers, without cable and connection profile changes, and more...

  • connect your phone to the 18.04 computer with bluetooth
  • on 18.04, open nm-connection-editor and create a new ethernet connection profile
  • go to the IPv4 tab and enable "Share to other computers"
  • go to the 16.04 computer
  • create a standard ethernet connection profile with dhcp
  • connect an ethernet cable between the two computers
  • note: you may have to reboot one/both computers at this time
  • enable Folder Sharing on one/both computers (use the Public folder if you wish)
  • transfer files using drag and drop
  • reach the Internet from either computer

note: you may have to install dnsmasq-base in 18.04 to get this all to work

heynnema
  • 70,711
  • When you bring up folder sharing, you're talking about NFS, which is actually the very first approach that I tried. But NFS doesn't work with encrypted directories, as I learned with my question https://unix.stackexchange.com/questions/522192/nfs-mount-on-client-not-matching-whats-exported-on-the-server – Zero Jun 02 '19 at 15:27
  • I don't know how/if encryption effects this idea... that's a new twist... but with Folder Sharing, no explicit NFS mounts are required. Just get Properties on the PUBLIC folder, enable sharing. Eh... you might just try my idea and see what happens. Report back. – heynnema Jun 02 '19 at 15:33
  • @Duos status please... – heynnema Jun 02 '19 at 21:55
  • Ah, that was my upvote for providing me with valuable new information previously unknown to me. I now accept your answer as a solution that promises to work since I'm now at the last step -- enabling folder sharing. I'm having difficulties getting either Personal File Sharing or Samba (both being new to me) to work but no problem, I should be able to get through on my own. I'll then make another attempt with NFS (new to me also) and the Public folder. Many, many thanks, man. – Zero Jun 02 '19 at 22:12
  • @Duos great news! Did you have to install dnsmasq-base? For folder sharing, just get Properties on the folder, and enable sharing there. – heynnema Jun 02 '19 at 22:27
  • Very good, very good, very good. dnsmasq-base was already installed on the 18.04 but I was unable to get either Personal File Sharing or Samba to work. However, NFS worked like magic, and apparently the Public folder was the missing link. That the first two file sharing options are so difficult to set up — I think it's a good thing. I've realized they offer far weaker access control than NFS. – Zero Jun 03 '19 at 08:51
  • @Duos You have to open ports on your firewall for Samba, and you have to smbpasswd -a username and add a password. That should get Public folder sharing to work, and it all working. So I take it that you like this setup now? – heynnema Jun 03 '19 at 12:32
  • Eh? That Samba needs a port opened is something that wasn't mentioned in all the tutorials that I was following. In any case, about this setup, I won't be using it permanently. I only needed it to backup the 14.04 to the 16.04, update the 14.04 to 18.04, then move 14.04's files from the 16.04 to their new home on 18.04, which has been successful. – Zero Jun 03 '19 at 13:37