Run command when user osmc starts

Hello guys,

Im sorry for interrupting your amazing work but Im on the rops. Couldnt find a solution in houres. Please help me
When osmc is started, the user “osmc” should lunch the command:

sshfs user@xx.xx.xx.xx:/home/user/XXX /home/osmc/tt

I tried with .profile / .bashrc / .bash_login / .bash_profile . It only works when I loggin with ssh as osmc. But i really need to do this when the GUI is starting! and do it as user “osmc”

Please help me :wink:

Try adding this in /etc/rc.local just before the exit 0 line:

sudo -u osmc sshfs user@xx.xx.xx.xx:/home/user/XXX /home/osmc/tt

If it’s a command that doesn’t immediately exit after being run you will need to put & at the end as well.

Thank you a lot!!! I will try it in some minutes

Mate your the best!!! its so f***** porno :sunglasses: I added a sleep 20 before, so it waits for openvpn to connect. and i learned something new! its so awesome!!! OSMC is bloody amazing!!! Keep up the fantastic work guys!!! so nice its works… i really cant say enought TY!