You are not logged in.
I have such a setup that when I am at home my laptop mounts at boot some network shares (samba) using following model:
//x.x.x.x/share /media/share cifs auto,x-systemd.automount,credentials=/path/to/credentials,vers=3.0,uid=1000,gid=1000,iocharset=utf8,_netdev,sec=ntlmv2 0 0
My problem is than whenever I am not at home the system tries to mount this shares and thunar is unresponsive. This is also affecting other apps like atril and the such.
Can somebody recommend me something here? Is there a different way to make the mount? can I, eventually, script it somehow to be mounted only when in my home network?
Thanks a lot.
Offline
Have a look at using the NetworkManager Dispatcher to conditionally map mounts based on network location. The above link is a link to an example script in the Arch wiki.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
A suggestion ... and it all depends on why you want this to automount.
If you were to take your existing fstab declaration and replace auto,x-systemd.automount with noauto,user two things would happen:
[1] The share will not automount at boot at all.
[2] But what will happen is that since it's mounted under /media ( will also work if mounted under your home directory ) a link will be placed on the left side panel of Thunar that becomes actionable to an ordinary user.
Click on that link and the system will go to fstab to see how to mount it then mount it. You can then right click to unmount if desired.
You will however need to go into Thunar first to mount the resource before any other application can use it.
Offline
Thank you both for the sugestions!
[1] The share will not automount at boot at all.
[2] But what will happen is that since it's mounted under /media ( will also work if mounted under your home directory ) a link will be placed on the left side panel of Thunar that becomes actionable to an ordinary user.
...
You will however need to go into Thunar first to mount the resource before any other application can use it.
this could be interesting, as a sudo mount -a if i land directly in the terminal is not such an effort... the problem is that it will generate apps to hand when getting in and out of the home network...
Have a look at using the NetworkManager Dispatcher to conditionally map mounts based on network location. The above link is a link to an example script in the Arch wiki.
This is very interesting. I am replying so late that I had another dilema: at home I have 3 active networks (LAN & Wifi 2.4 and 5 GHz) and I also switch between them: LAN in the docking station, 5GHz in the room near the modem, 2,4GHz in the room with the repeater.
So I took the challenge to adapt the scripts for this given situation. I am running some final tests and eventually I will share the results with you.
Best regards,
Vlad
Offline
[ Generated in 0.008 seconds, 7 queries executed - Memory usage: 533.63 KiB (Peak: 534.47 KiB) ]