su USER -c 'your_command &'
Saturday, May 5, 2012
How to run a unix command as a USER on startup?
To run a unix command on startup you may use the command below (add it to the /etc/rc.local file):
How to make stable $PATH when using sudo command?
To make your sudo commands works with the $PATH of your logged-in user you just type the following command and then close all your terminals and login again:
echo "alias sudo='sudo env PATH=$PATH'" >> ~/.bashrc
Subscribe to:
Posts (Atom)