I wanted to just type in "op25" from home directory in terminal without having to cd all the time. I tried the instructions here https://www.hagensieker.com/wordpress/2018/07/17/op25-for-dummies/
QuoteIn the comments below Mr. Alex Bowman found an easier way to launch the program. Create an alias in Linux so that you just type "op25" (without the quotes) into the terminal from any directory.
sudo nano .bashrc
Then paste in the following lines.
#OP25 alias
alias op25='bash /home/john/op25/op25.sh'
Be sure your path is right about. Note my path of /home/john. Yours is different unless your name is John, of course.
Now hit Ctl key plus X, then hit Y to save. Restart the terminal and you should now be able to launch OP25 just by typing OP25. It works like a champ. I tried it.
That's it. I hope I made this easier for someone.
the correct directory for me is 'bash /home/ddejr/op25/op25/gr-op25_repeater/apps/op25.sh'
Did that and failed ???
Quoteddejr@ddejr-pc:~$ op25
bash: op25: command not found
ddejr@ddejr-pc:~$ sudo nano .bashrc
ddejr@ddejr-pc:~$ op25
bash: op25: command not found
ddejr@ddejr-pc:~$
Instructions from the article are :
1) create little shell script called op25.sh with such content:
#! /bin/sh
cd /path/to/the/op25/op25/gr-op25_repeater/apps
./rx.py –args 'rtl' -N 'LNA:47' -S 2400000 -f 857.2625e6 -o 25000 -q -2 -T trunk.tsv -V -2 -U 2> stderr.2
2) make it executable
sudo chmod +x /path/to/the/op25.sh
3) create alias
sudo nano ~/.bashrc
Then paste in the following lines.
#OP25 alias
alias op25='bash /path/to/the/op25.sh'
did OP restart bash?
when the alias command has run- it should work.
check by listing the aliases!
(type alias) and look for it in alphabetical order.
I didn't know to exec bash. I did exec bash after editing it in bash, it worked. I did two entries into bash and didn't need to make one shell script executable. Thanks! :)