![]() |
how to set my own commands?
hi all,
so running xmonad i like to be able to launch things direct from dmenu or a command prompt. how would i set it up so that when i run, say, minecraft in the command prompt it runs the command java -jar /home/USER/Downloads/minecraft? would i have to make a script in /bin? or is there anything else i should be doing? thanks |
Users' script are usually placed in the user home directory under $HOME/bin. This is not a rule, but many systems already include $HOME/bin in $PATH so that you can avoid to add it manually. On the other hand if you want to make your scripts available to other users, you should put them in a common location as /usr/local/bin.
In this particular case, since your command is a one-liner, you can simply define an alias Code:
alias minecraft='java -jar /home/USER/Downloads/minecraft'Edit: sorry, I just noticed the /home/USER spec in your command line, so I guess this must be available to all users. In this case it would be better to put a script inside /usr/local/bin. If you want to change USER with the actual username, it should read Code:
java -jar /home/$USER/Downloads/minecraftCode:
function minecraft { |
aaaahh alias >.<
completely forgot about that thanks :) |
| All times are GMT -5. The time now is 03:30 AM. |