Trigger shell command on login

I am running Shinyproxy, and I would like a shell command to run when a user logs in. (Or tries to launch a certain app.) This is needed to prepare certain apps for “new users” - for instance, if the volume mounting in the app specs requires the user to have a “home folder” where files can be saved. In this case I would like to trigger the command
when the user logs in on Shinyproxy. Can this be done somehow?

It depends a lots on how you start shinyproxy (on host machine or in container) and where you need to open folders… Probably you can get this with proper volumes and directly from R shiny app using system commands…

Giving just a idea. More details are needed for real solution.