Script for GPREDICT with rigctl in Ubuntu

Im new to Linux. I had a neat little command line script in Windows to start hamlib and GPredict that would enable rig control on my FT-991a.

I need to replicate this in Ubuntu 23.04 but have no idea how. I have GP installed and working and I have the command line to get to my radio through hamlib. I just need help writing the script to start it all together.

rigctl -m 1035 -r /dev/ttyUSB0

Like I said im kind of a “newbie” so be patient. Thanks for the help.

Im posting my windows script to hopefully help someone else.

start C:\Ham\GPredict\gpredict.exe
start C:\Ham\GPredict\hamlib\bin\rigctld.exe -v -r \.\com3 -m 1035 -s 38400 -t 4532 -C “serial_speed=38400,stop_bits=2,rts_state=ON,dtr_state=OFF,serial_handshake=None”

writing a short shell script with the command lines you want to launch is pretty straight forward.
open a text editor and save to something like in the homedir.

rigctld -v -r /dev/ttyUSB0 -m 1035 -s 38400 -t 4532 -C “serial_speed=38400,stop_bits=2,rts_state=ON,dtr_state=OFF,serial_handshake=None” &
killall rigctld

assuming that the same rigctl line works in linux, I’m a bit hesitant on the serial_speed=38400 as it’s already set with -s 38400.
make sure it has exec flags: chmod 0755
when you want to launch it open a terminal and run ./
it launches rigctld in background, it will still output information in the terminal you launched it in, then run gpredict. when gpredict exits it will kill rigctld and the script is done.

Thank you very much for your help. The serial_speed command did cause some issues but I was able to figure it out. Here is what worked…

rigctld -v -r /dev/ttyUSB0 -m 1035 -s 38400 -t 4532 -C stop_bits=2,rts_state=ON,dtr_state=OFF,serial_handshake=None &
killall rigctld

Thanks Again!

1 Like