You are not logged in.

#1 2019-01-24 11:21:35

mealejan
Member
Registered: 2014-02-13
Posts: 11

How to start a systemd mount process on user login

Hi,

I am trying to start an automount service after user login of a webdav resource.
I followed the instructions on this site:
https://wiki.archlinux.org/index.php/Davfs2
But as my home folder is decrypted at login the services don't work.
Any solutions?

Best regards!

Offline

#2 2019-01-24 11:36:17

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

Re: How to start a systemd mount process on user login

Try to change TimeoutSec variable in your mnt-webdav-service.mount.
...or add this service on the user level not system.
...or add this line
After=systemd-user-sessions.service
in the [Unit]-section of your service.

Last edited by Lupo Alberto (2019-01-24 11:45:34)

Offline

#3 2019-01-24 13:18:25

mealejan
Member
Registered: 2014-02-13
Posts: 11

Re: How to start a systemd mount process on user login

Thank you very much for your answer. I have tried all your suggestions but:

The TimoutSec did not work as the home folder wasn't decrypted and mounted yet (done by PAM).
Adding the service to the user level did not work (moving it to ~/.config/systemd/user/) as only root is able to mount
After=systemd-user-sessions.service did not work as it seems to be started before login.

Any other suggestions?

Last edited by mealejan (2019-01-24 13:19:12)

Offline

#4 2019-01-25 06:39:05

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

Re: How to start a systemd mount process on user login

mealejan wrote:

Any other suggestions?

I could make some suggestions if I see some logs and configs.

Last edited by Lupo Alberto (2019-01-25 06:39:51)

Offline

#5 2019-01-25 11:05:44

mealejan
Member
Registered: 2014-02-13
Posts: 11

Re: How to start a systemd mount process on user login

In the end I decided to mount the folders outside my home directory and create a symlink to it. Thank you for your help.

Offline

Board footer

Powered by FluxBB