Mounted Samba shares don't show up on desktop [SOLVED]

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
Nomin
Level 3
Level 3
Posts: 104
Joined: Sat Dec 21, 2013 7:21 pm

Mounted Samba shares don't show up on desktop [SOLVED]

Post by Nomin » Mon Aug 20, 2018 8:18 am

In Mint 18.3 mounted Samba shares showed up on desktop along with mounted local drives. They don't do that in 19.0 anymore, and I only have local drives there. I can add the Network icon, but would prefer to have my network drives as separate icons on my desktop.

I copied all the share drive icons from /mnt folder to the desktop with CTRL+SHIFT+ALT dragging. Is this the preferred method to get them to show up on desktop?
Last edited by Nomin on Mon Sep 24, 2018 10:13 am, edited 1 time in total.

altair4
Level 19
Level 19
Posts: 9236
Joined: Tue Feb 03, 2009 10:27 am

Re: Mounted Samba shares don't show up on desktop

Post by altair4 » Mon Aug 20, 2018 12:57 pm

I'm not sure I understand how you are mounting these samba shares but:

Anything - and I mean anything ... local partitions to remote samba shares - will display a mount icon if the mount point is under /media or in your home directory. If they are mounted anywhere else they will not. Based on your post they are mounted under /mnt. Change the mount point to be under /media.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

Nomin
Level 3
Level 3
Posts: 104
Joined: Sat Dec 21, 2013 7:21 pm

Re: Mounted Samba shares don't show up on desktop

Post by Nomin » Mon Aug 20, 2018 5:50 pm

altair4 wrote:
Mon Aug 20, 2018 12:57 pm
I'm not sure I understand how you are mounting these samba shares but:

Anything - and I mean anything ... local partitions to remote samba shares - will display a mount icon if the mount point is under /media or in your home directory. If they are mounted anywhere else they will not. Based on your post they are mounted under /mnt. Change the mount point to be under /media.
Mounting via fstab, forgot to mention that.

Yes, they were mounted at /mnt, but changing the mount point to /media fixed it, thanks! Strange that mounting worked fine in /mnt in 18.3, but not anymore.

Also strange that local drives are mounted under /mnt but shares on /media. Is there a reason for that?

altair4
Level 19
Level 19
Posts: 9236
Joined: Tue Feb 03, 2009 10:27 am

Re: Mounted Samba shares don't show up on desktop

Post by altair4 » Tue Aug 21, 2018 6:45 am

Things ( local partitions or shares ) are mounted where you tell them to mount - unless you use the file manager to mount in which case they mount to /media/$USER/XXX for partitions and /run/user/$UID/gvfs for shares.

Based on forum posts it appears that the application Disks has a proclivity to mount things under /mnt then adds a gvfs helper called x-gvfs-show that forces the mount to appear on the desktop just as if they were mounted under /media. It is a convoluted kind of logic to me. It is however a confirmation of a long held opinion that application design should never be done by software developers but by subject area experts.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

Nomin
Level 3
Level 3
Posts: 104
Joined: Sat Dec 21, 2013 7:21 pm

Re: Mounted Samba shares don't show up on desktop

Post by Nomin » Tue Aug 21, 2018 7:39 am

altair4 wrote:
Tue Aug 21, 2018 6:45 am
Things ( local partitions or shares ) are mounted where you tell them to mount - unless you use the file manager to mount in which case they mount to /media/$USER/XXX for partitions and /run/user/$UID/gvfs for shares.

Based on forum posts it appears that the application Disks has a proclivity to mount things under /mnt then adds a gvfs helper called x-gvfs-show that forces the mount to appear on the desktop just as if they were mounted under /media. It is a convoluted kind of logic to me. It is however a confirmation of a long held opinion that application design should never be done by software developers but by subject area experts.
That made me lol for real :) It is indeed strange that the mount points vary so much depending on the mounting method. From end-user POV it would be clearest if all local and shared drives would mount under one folder on all systems by default, perhaps under separate sub-folders (e.g. /media/local/XXX and /media/shared/XXX) if necessary.

Thanks again for help, was an easy fix after all and I learned something new!

Nomin
Level 3
Level 3
Posts: 104
Joined: Sat Dec 21, 2013 7:21 pm

Re: Mounted Samba shares don't show up on desktop

Post by Nomin » Sat Aug 25, 2018 8:19 am

Now I get the issue that I need to run sudo mount -a to get the drives to mount, although I have them in fstab. How do I ensure that the network drives are automatically mounted on startup?

altair4
Level 19
Level 19
Posts: 9236
Joined: Tue Feb 03, 2009 10:27 am

Re: Mounted Samba shares don't show up on desktop

Post by altair4 » Sat Aug 25, 2018 12:09 pm

When you ask a question in a forum where they let anyone answer you have to deal with the responders prejudices.

So ... I'll give you two methods - depending on why you want them mounted at boot:

[1] This method will not automount at boot. It will mount them through the file manager when needed with a simple click: On Demand CIFS Mounting of Shares: viewtopic.php?f=42&t=222087

Short version: Add two more options to your cifs line in fstab: user,noauto

Since your mount point is now under /media this method will make the link on the side panel of your file manager "actionable" by an ordinary user ( the "user" option ). Click on it to mount. Click on it again to unmount.

[2] This method basically runs mount -a automatically.

** Create a file at /etc/network/if-up.d/fstab

** Add this to it:

Code: Select all

#!/bin/sh
mount -a
** Make the file executable:

Code: Select all

sudo chmod +x /etc/network/if-up.d/fstab
The problem here is that fstab is being run before the network stack in Mint is up and operational. Option [1] will be done after you log in so the network should be up by then. Option [2] directs the system to issue a "mount -a" only after the network is up.

I personally use option [1] which is why I listed it first......
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

Nomin
Level 3
Level 3
Posts: 104
Joined: Sat Dec 21, 2013 7:21 pm

Re: Mounted Samba shares don't show up on desktop

Post by Nomin » Mon Sep 24, 2018 10:13 am

altair4 wrote:
Sat Aug 25, 2018 12:09 pm
The problem here is that fstab is being run before the network stack in Mint is up and operational. Option [1] will be done after you log in so the network should be up by then. Option [2] directs the system to issue a "mount -a" only after the network is up.
Ah that was my suspicion, thanks for confirming. I prefer method two so I don't have to edit any of my scripts due to mount point change. A bit late, but thanks again for help!

Post Reply

Return to “Other networking topics”