Automount user filesystem on console login only
At my work I'm faced with a challenge. It has been decided that we're moving to a Linux desktop environment. Basically it's a cluster of RedHat Enterprise Virtualisation (RHEV) servers running VDI's for all our users. They can then connect to the console of a running VDI and start working.
Now all that is working fine, but there is still one challenge left. I'm asked to configure the systems that a user specific directory is mounted when the user logs in to the console. (So, that's logs in to Gnome in practice). The problem is that if, for example, I use ssh to connect to the machine, the directory should not be mounted. Hence I can't use .profile or automount to perform the mount.
Then I tried running a script on gnome login to perform the mount, using udisks, but since the filesystem to mount is an NFS share, udisks is not of much help.
I could of course add all these user specific entries to fstab and make them user mountable, but since we have about 1000 users (with several 10s changing every week) that's not really a workable solution.
Any suggestions on how I can get this to work?