View network folders within applications [Solved]

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
BeakersHelper

View network folders within applications [Solved]

Post by BeakersHelper »

Hello to everyone,

I am very new to Linux Mint, and Linux in general (only installed it yesterday) and have a very simple question I hope someone can help me with.

I have a network drive connected to my router and I can add the share folder as a network place using the [Connect to server] option from the [Places] main menu.

The folder name is 'share on hs-dhgl205'

From the main desktop, I can browse the contents of this folder and open files. However, if I am running an application, I cannot see that folder in the window browser. For example, I would like to import some photos into F-Spot Photo Manager but I cannot see the network drive in the list of places.

Could someone please explain what I am doing wrong.
Thank you
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.
gn2

Re: View network folders within applications

Post by gn2 »

When you try to browse the network drive you need to have "Mounted" it first by accessing it through Places > Network in the Menu.
There should now be a network folder icon for your connected NAS share showing on the desktop.
Now application file browsers should be able to "see" it and it should be listed in Places.
When you "unmount" the network drive from the right-click options on the NAS share desktop icon, it's like disconnecting it.
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: View network folders within applications

Post by altair4 »

You're not doing anything wrong. That's the way it's designed to work. Why it's designed to work that way is the big question. You've got two options:

(1) The process you've described is performed by invoking, behind the scenes, gvfs-mount. It actually creates a mount point at:
/home/your_user_name/.gvfs

To complicate matters it's in what is called a "hidden" directory ( the "." in front of the gvfs name indicates a "hidden" directory ). To see the file in Nautilus you need to change it's properties. Nautilus > Edit > Preferences > Views > Show hidden files and backup files. To complicate matters more , some applications can natively see these hidden files, some may need to be configured to see them, and other will never see them. I don't know about F-Spot. See if F-Spot can access /home/your_user_name/.gvfs

(2) I think you can create a symbolic link from that hidden directory to a "real" directory. Then all your applications will be able to see them. Embarrassingly, I'm not very good at that so perhaps others can give you some direction on that.

Why the good developers created a hidden mount point remains a mystery.
Last edited by altair4 on Wed Dec 30, 2009 9:24 am, edited 1 time in total.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Locuust

Re: View network folders within applications

Post by Locuust »

There's also a slightly more involved process where you can mount a smb network share to the filesystem using the samba client and some other package... but I can't seem to find my notes on it. The only bad point is that it requires the password for the share to be entered as clear text within fstab if I remember correctly (if you want it to mount at boot that is). The advantage is that it will be mounted where you want it and any application problems should go away.

http://www.cyberciti.biz/tips/how-to-mo ... linux.html
http://www.cyberciti.biz/faq/configure- ... -etcfstab/

and a solution to the password thing -
http://anothersysadmin.wordpress.com/20 ... tial-file/
User avatar
Midnighter
Level 6
Level 6
Posts: 1327
Joined: Tue May 22, 2007 1:52 pm
Location: Western Australia

Re: View network folders within applications

Post by Midnighter »

The "simplest" way to mount it locally so all apps can see and use the folder is to install Smb4k and use it to mount it, where it will be mounted under your home directory, ie. /username/home/smb4k/sharename
Locuust

Re: View network folders within applications

Post by Locuust »

Why the good developers created a hidden mount point remains a mystery.
That's like asking why to this day there are still windows apps that have problems with extra long pathnames. I got a chuckle recently when I had to download a util from MS to uninstall one of their packages because the uninstaller that came with it would crash if the path was too long. It just sounded good at the time or was a temporary measure that became permanent I imagine is how it most often goes. And then everyone generally just grows to "accept" the way it is.
The "simplest" way to mount it locally so all apps can see and use the folder is to install Smb4k and use it to mount it, where it will be mounted under your home directory, ie. /username/home/smb4k/sharename
Ahh I saw that too when I was searching. Just didn't have any experience with it. I'll have to check it out sometime.
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: View network folders within applications

Post by altair4 »

I used to use smb4k in my KDE days and I agree that it does the mount point correctly. After not using it for a while I was helping someone over the phone with it one day and darn - what did they do to it. It doesn't work quite the way it did in KDE 3.5 . I couldn't figure it out - at least not over the phone. He had it installed on a Gnome system and perhaps it works better in it's native KDE environment.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
BeakersHelper

Re: View network folders within applications

Post by BeakersHelper »

I have just returned from a day out with my family and I was really pleased to see that I had several replies to my post.

After reading the various posts, I learned a few new things about working in a Linux environment.

gn2: I appreciate the clarification about how to ensure a drive is mounted before trying to access that location from within an application.

altair4: thank you for confirming that I was not 'doing anything wrong' and explaining where to find the mount points. I was not aware of the /home/user/.gvfs location.
Following your suggestion, I can confirm that F-Spot can see the folder /home/user/.gvfs. Furthermore, within this folder I can see the network share and access the photos via that link.

I also tried your second suggestion by creating a link to the ./gvfs folder and placing it in the home folder. Unfortunately this did not make the share visible as a place but I can still access the network share via the ./gvfs folder which was visible within the F-Spot import window.

Locuust: thank you for your suggestion. I haven't looked into this yet but I will have a read through the threads you linked.

Midnighter: I appreciate your suggestion of installing smb4k. I did google this to look into it further and the first thing I noticed was that it is for KDE. The additional post by altair4 suggested this may not work under Gnome. Shame if that is the case but I haven't confirmed that yet.

I would just like to thank everyone again for your replies and suggestions.

Best wishes
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: View network folders within applications

Post by altair4 »

Midnighter: I appreciate your suggestion of installing smb4k. I did google this to look into it further and the first thing I noticed was that it is for KDE. The additional post by altair4 suggested this may not work under Gnome. Shame if that is the case but I haven't confirmed that yet.
I didn't mean to imply that smb4k would not work under gnome. Previous smb4k's did. I just wasn't smart enough to figure out how to use it over the phone and not installed on my system. Sorry for the confusion.

Oh, and glad it worked out. :wink:
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
BeakersHelper

Re: View network folders within applications

Post by BeakersHelper »

Hi Altair4,

sorry for mis-quoting you. I think I confused your comment with several threads I read when I googled smb4k for Gnome.

best regards
Locked

Return to “Beginner Questions”