Autostart

131 views
Skip to first unread message

Cary Honeywell

unread,
Oct 31, 2023, 1:04:25 AM10/31/23
to gq...@googlegroups.com
I have GQRX successfully running on a Raspberry Pi 3 with Debian Jammy. However I can't get the OS to run the startup program on reboot. I tried using "@reboot /home/rd/GQRXautomaticstart.sh" even though the script runs perfectly from the command line.

What am I missing?

_ Cary _

David Taylor

unread,
Oct 31, 2023, 5:27:44 AM10/31/23
to gq...@googlegroups.com
Just a guess, but perhaps add a 30-seconf delay before running the program.
Perhaps it depends on services which are no yet started? Does the shell
include a "cd" to the appropriate space?

Cheers,
David
--
SatSignal Software - Quality software for you
Web: https://www.satsignal.eu
Email: david-...@blueyonder.co.uk
Twitter: @gm8arv

Cary Honeywell

unread,
Oct 31, 2023, 12:38:37 PM10/31/23
to gq...@googlegroups.com
Thanks David.

I tried putting a delay inside the script and that didn't work. I remember that I could also do it in the @reboot line but, for the life of me, I can't remember the syntax.

_ Cary _


--
You received this message because you are subscribed to the Google Groups "Gqrx SDR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gqrx+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gqrx/9b894dc1-9c19-4d55-a550-990801633b83%40gmail.com.

Thomas D. Dean

unread,
Oct 31, 2023, 6:13:54 PM10/31/23
to gq...@googlegroups.com
On 10/31/23 09:38, Cary Honeywell wrote:
> Thanks David.
>
> I tried putting a delay inside the script and that didn't work. I
> remember that I could also do it in the @reboot line but, for the life
> of me, I can't remember the syntax.
>
> _ Cary _
>
>
> On Tue, Oct 31, 2023 at 5:27 AM David Taylor <sats...@gmail.com
> <mailto:sats...@gmail.com>> wrote:
>
> On 31/10/2023 05:04, Cary Honeywell wrote:
> > I have GQRX successfully running on a Raspberry Pi 3 with Debian
> Jammy. However
> > I can't get the OS to run the startup program on reboot. I tried
> using "@reboot
> > /home/rd/GQRXautomaticstart.sh" even though the script runs
> perfectly from the
> > command line.
> >
> > What am I missing?
> >
> > _ Cary _

Does redirecting outout from the script somewhere help?

>
> Just a guess, but perhaps add a 30-seconf delay before running the
> program.
> Perhaps it depends on services which are no yet started?  Does the
> shell
> include a "cd" to the appropriate space?
>
> Cheers,
> David
> --
> SatSignal Software - Quality software for you
> Web: https://www.satsignal.eu <https://www.satsignal.eu>
> Email: david-...@blueyonder.co.uk
> <mailto:david-...@blueyonder.co.uk>
> Twitter: @gm8arv
>
> --
> You received this message because you are subscribed to the Google
> Groups "Gqrx SDR" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to gqrx+uns...@googlegroups.com
> <mailto:gqrx%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/gqrx/9b894dc1-9c19-4d55-a550-990801633b83%40gmail.com <https://groups.google.com/d/msgid/gqrx/9b894dc1-9c19-4d55-a550-990801633b83%40gmail.com>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Gqrx SDR" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to gqrx+uns...@googlegroups.com
> <mailto:gqrx+uns...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/gqrx/CAJzCOgtBJWirL3iYZoikig0FxCxuMEO_VsO_%3Do6fqAYiU-oBQQ%40mail.gmail.com <https://groups.google.com/d/msgid/gqrx/CAJzCOgtBJWirL3iYZoikig0FxCxuMEO_VsO_%3Do6fqAYiU-oBQQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Cary Honeywell

unread,
Oct 31, 2023, 7:01:28 PM10/31/23
to gq...@googlegroups.com
Thomas: Thanks for the input. No. I doesn't seem to matter. 

And I found the line I used with Ubuntu on an X-86  box:  @reboot sleep 20 && (script file)

_ Cary _


To unsubscribe from this group and stop receiving emails from it, send an email to gqrx+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gqrx/1ae0d31a-b683-41f7-9b39-d777c8129987%40wavecable.com.

Klets kous

unread,
Nov 1, 2023, 6:39:27 AM11/1/23
to Gqrx SDR
Second attempt for a reply ...

Goodmorning,
You can start a program  automatically by using systemd.
Mainly this consists of two files that you have to create yourself.
The first is under etc/systemd/system and must have the extension   .service i.e. myfilename.service
You can choose any name, maybe  startGQRX.service.
This is a possible content of such a file ,
with no guarantee that it will work, but that's how I start my own program in an RPI


First file

[Unit]
Description=Starting GQRX
After=multi-user.target

[Service]
Restart=always
Type=idle
ExecStart=/home/pi/scripts/startGQRX.sh
ExecStop=/usr/bin/killall -9 startGQRX.sh
[Install]
WantedBy=multi-user.target


Save your file
Assigning permissions to the file:

sudo chmod +x startGQRX.service

Second file ( script)


Goto  /home/pi/scripts
 Make a new file with extension .sh  
 i.e.   startGQRX.sh
 
 Content :
 
 #!/bin/bash
echo  Starting GQRX
echo

In this line must come you startscript ,I thought it was :
/home/rd/GQRXautomaticstart.sh

Save your file and give permissions.

sudo chmod +x startGQRX.sh

Then you must initiate systemd with this 2 commands ( in your terminal)

sudo systemctl daemon-reload.
sudo systemctl enable startGQRX.service

Now you can reboot your RPi and see if it works.


Further command systemd:

sudo systemctl status startGQRX    ( status)

sudo systemctl start startGQRX    ( manual start)

sudo systemctl stop startGQRX    ( manual stop)


I I hope this helps. You can find a lot on YouTube about systemd.


This is what I get when querying status by systmctl status

startRPItracker.service - Opstarten RPItracker
   Loaded: loaded (/etc/systemd/system/startRPItracker.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2023-10-22 14:17:12 CEST; 1 weeks 2 days ago
 Main PID: 708 (startRPItracker)
    Tasks: 8 (limit: 3862)
   CGroup: /system.slice/startRPItracker.service
           ├─708 /bin/bash /home/pi/scripts/startRPItracker.sh
           ├─728 sudo /home/pi/pigpio-master/EXAMPLES/C/ADSN/Y.A.T_1.1
           └─747 /home/pi/pigpio-master/EXAMPLES/C/ADSN/Y.A.T_1.1

okt 22 14:17:12 raspberrypi systemd[1]: Started Opstarten RPItracker.
okt 22 14:17:12 raspberrypi startRPItracker.sh[708]: RPI Tracker wordt gestart.
okt 22 14:17:12 raspberrypi sudo[728]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/home/pi/pigpio-master/EXAMP
okt 22 14:17:12 raspberrypi sudo[728]: pam_unix(sudo:session): session opened for user root by (uid=0)


Have fun , Luc  on4aol



Op woensdag 1 november 2023 om 00:01:28 UTC+1 schreef Cary Honeywell:
Reply all
Reply to author
Forward
0 new messages