Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-08-18 06:58:59

beje
Member
From: Austria
Registered: 2018-11-30
Posts: 16

Trying to mount not available network shares is killing thunar...

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

#2 2020-08-18 10:42:00

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 7,116

Re: Trying to mount not available network shares is killing thunar...

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.

Offline

#3 2020-08-19 17:51:46

Morbius1
Member
Registered: 2014-07-05
Posts: 20

Re: Trying to mount not available network shares is killing thunar...

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

#4 2020-09-15 15:56:31

beje
Member
From: Austria
Registered: 2018-11-30
Posts: 16

Re: Trying to mount not available network shares is killing thunar...

Thank you both for the sugestions!

Morbius1 wrote:

[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...

ToZ wrote:

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

Board footer

Powered by FluxBB