(solved)photo file sharing

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
manny433

(solved)photo file sharing

Post by manny433 »

Hello
I have two computers both running Linux MInt(MInt 8 and 9) in home network and would like to learn how to share files(photos) between both pcs.Thanks.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11461
Joined: Tue Feb 03, 2009 10:27 am

Re: photo file sharing

Post by altair4 »

Open Nautilus
Right Click on /home/your_user_name/Pictures
Select "Sharing Options"
Select "Share this folder", "Allow other people to write..", and "Guest access"
Select "Create share"
It will ask you if you want it to modify permissions - you do.
Done

Now go to the other machine, open Nautilus > Network and see if you can find the "pictures" share.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
grimdestripador
Level 6
Level 6
Posts: 1051
Joined: Fri Feb 16, 2007 2:26 am

Re: photo file sharing

Post by grimdestripador »

1) Have the same username on both computers.
2) Choose NFS / Samba / or SSH for sharing.

With NFS (Unix Network File System) you can share a directory by right clicking your "photos" folder in your home directory, choosing sharing, and adding the share. Same goes for samba (windows sharing), but it might need to install some packages.

On the othercomputer, look up mounting NFS shares into your /etc/fstab file.

Or just use ssh to copy the entire directory,

(you must sudo apt-get install openssh-server)

copy from a remote machine to my machine:
scp user@192.168.1.100:/home/remote_user/Desktop/file.txt /home/me/Desktop/file.txt

copy from my machine to a remote machine:
scp /home/me/Desktop/file.txt user@192.168.1.100:/home/remote_user/Desktop/file.txt

copy all file*.txt from a remote machine to my machine (file01.txt, file02.txt, etc.; note the quotation marks:
scp "user@192.168.1.100:/home/remote_user/Desktop/file*.txt" /home/me/Desktop/file.txt

copy a directory from a remote machien to my machine:
scp -r user@192.168.1.100:/home/remote_user/Desktop/files /home/me/Desktop/.
altair4
Level 20
Level 20
Posts: 11461
Joined: Tue Feb 03, 2009 10:27 am

Re: photo file sharing

Post by altair4 »

grimdestripador wrote:1) Have the same username on both computers.
That's not a requirement for samba. In fact I would recommend the opposite.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
manny433

Re: photo file sharing

Post by manny433 »

altair4 wrote:Open Nautilus
Right Click on /home/your_user_name/Pictures
Select "Sharing Options"
Select "Share this folder", "Allow other people to write..", and "Guest access"
Select "Create share"
It will ask you if you want it to modify permissions - you do.
Done

Now go to the other machine, open Nautilus > Network and see if you can find the "pictures" share.
In network all i see is "Windows Network" icon.
altair4
Level 20
Level 20
Posts: 11461
Joined: Tue Feb 03, 2009 10:27 am

Re: photo file sharing

Post by altair4 »

manny433 wrote:In network all i see is "Windows Network" icon.
And what error message do you get when you double click the "Windows Network" icon?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
Pilosopong Tasyo
Level 6
Level 6
Posts: 1432
Joined: Mon Jun 22, 2009 3:26 am
Location: Philippines

Re: photo file sharing

Post by Pilosopong Tasyo »

Once you establish a shared folder from the server, you could just use the smb:// notation in Nautilus' location bar to directly open the folder from the client computer.

For example:
  • Server name = manny433desktop
    Shared folder = Pictures
On the client computer, put this in Nautilus' location bar and hit enter:
  • smb://manny433desktop/Pictures
o Give a man a fish and he will eat for a day. Teach him how to fish and he will eat for a lifetime!
o If an issue has been fixed, please edit your first post and add the word [SOLVED].
altair4
Level 20
Level 20
Posts: 11461
Joined: Tue Feb 03, 2009 10:27 am

Re: photo file sharing

Post by altair4 »

The previous post reminded me of one potential problem.

The Ubuntu installer has a bad habit of creating by default an internal machine name based on your login user name.

Also by default Samba will use that internal machine name as the netbios name that it broadcasts to the network.

In this case if your login username is manny433, then your netbios name would be manny433-desktop which would render your machine invisible to the network because it's longer that 15 characters. ( It's that extra dash that pushes it over the edge )

There's an easy way to fix this in samba itself it this is the issue.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
Pilosopong Tasyo
Level 6
Level 6
Posts: 1432
Joined: Mon Jun 22, 2009 3:26 am
Location: Philippines

Re: photo file sharing

Post by Pilosopong Tasyo »

altair4 wrote:There's an easy way to fix this in samba itself it this is the issue.
Is the easy fix shortening the machine name in the /etc/hostname file?
o Give a man a fish and he will eat for a day. Teach him how to fish and he will eat for a lifetime!
o If an issue has been fixed, please edit your first post and add the word [SOLVED].
altair4
Level 20
Level 20
Posts: 11461
Joined: Tue Feb 03, 2009 10:27 am

Re: photo file sharing

Post by altair4 »

Pilosopong Tasyo wrote:
altair4 wrote:There's an easy way to fix this in samba itself it this is the issue.
Is the easy fix shortening the machine name in the /etc/hostname file?
You know there's a right way to do this and a wrong way to do this and I can never remember what it is. There are two files you can edit and if you choose the wrong one you won't be able to use gksu or sudo anymore.

I avoid the issue entirely and use smb.conf itself to change the name that appears on the network. Just add the following line to the [global] section of smb.conf:

Code: Select all

netbios name = something_15_characters_or_less
Then restart samba:

Code: Select all

sudo service smbd restart
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Locked

Return to “Beginner Questions”