I've had my first dabble with bash and got a working script going for each user on session start which checks if a NAS share is mounted and if it is unmounts it and mounts as the current user. This works great but now I have a problem, on the first "Switch User" the script is executed as the session for the new user starts. Switching back however the drive is mounted as the previous user, running the script works so it appears that what works for the session start (.config/autostart) doesn't handle this user switching and I guess that makes sense.
Question is, how to run my little script again when a session restarts for each user after a "Switch User" happens?
0 Answers