The next time you log in, that will be in your $PATH (except in lxde for some reason).
Then create a simple shell script in your ~/bin using nano ~/bin/xbmc
. The 1st line should be a shebang line to tell the shell what to use for an interpreter:
Then either enter commands to cd
to whatever directory and then a line for whatever you want to run, or in some cases you can simply put a full path to the binary.
After you create that file do chmod +x ~/bin/xbmc
to make your xbmc script executable.
Assuming that you relogged in since you created your ~/bin, you can simple type xbmc
to run it.
Note that if a command or binary needs sudo prefix and you are a user other than pi, use sudo visudo
to add another line if you want to avoid typing a password for sudo:
Code: Select all
pi ALL=(ALL) NOPASSWD: ALL
efflandt ALL=(ALL) NOPASSWD: ALL